diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-21 12:54:31 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-21 12:54:31 +0000 |
commit | 2ca1861621c0797979a2a528a35fc578300f02e3 (patch) | |
tree | bcb356eb8265adfb12b21d4282ccd319ed8a53d7 | |
parent | 316b30960e7819cfb091424f546d0a41afd721da (diff) |
Targeted include
10 files changed, 29 insertions, 12 deletions
diff --git a/document/src/vespa/document/bucket/bucketid.cpp b/document/src/vespa/document/bucket/bucketid.cpp index e1396c1a0e0..8554450fb22 100644 --- a/document/src/vespa/document/bucket/bucketid.cpp +++ b/document/src/vespa/document/bucket/bucketid.cpp @@ -59,11 +59,14 @@ void fillStripMasks(BucketId::Type * masks, uint8_t maxBits) } - struct Initialize { - Initialize() { - BucketId::initialize(); - } - }; +struct Initialize { + Initialize() { + BucketId::initialize(); + } +}; + +Initialize _initializeUsedMasks; + } void BucketId::initialize() { @@ -151,4 +154,4 @@ operator>>(nbostream &is, BucketId &bucketId) } // document template class vespalib::Array<document::BucketId>; -VESPALIB_HASH_SET_INSTANTIATE_H(document::BucketId, document::BucketId::hash);
\ No newline at end of file +VESPALIB_HASH_SET_INSTANTIATE_H(document::BucketId, document::BucketId::hash); diff --git a/fastos/src/vespa/fastos/timestamp.h b/fastos/src/vespa/fastos/timestamp.h index ee5b29e0baf..6c0d410a41a 100644 --- a/fastos/src/vespa/fastos/timestamp.h +++ b/fastos/src/vespa/fastos/timestamp.h @@ -1,8 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/fastos/types.h> -#include <vespa/fastos/mutex.h> +#include <cstdint> #include <limits> #include <string> diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h index d13ccbabe3c..57ad3a0cc46 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/raw_document_meta_data.h @@ -5,6 +5,7 @@ #include <vespa/document/base/globalid.h> #include <vespa/document/bucket/bucketid.h> #include <persistence/spi/types.h> +#include <cassert> namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h index 5056a3ced5b..49a0f44a175 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/removedocumentsoperation.h @@ -3,6 +3,7 @@ #include "feedoperation.h" #include "lidvectorcontext.h" +#include <map> namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.h b/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.h index 88328953377..070e9ce0c46 100644 --- a/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.h +++ b/searchcore/src/vespa/searchcore/proton/feedoperation/wipehistoryoperation.h @@ -2,6 +2,7 @@ #pragma once #include "feedoperation.h" +#include <vespa/fastos/timestamp.h> namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp index 40106e5b332..581933efcb7 100644 --- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp +++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp @@ -8,6 +8,7 @@ #include <vespa/documentapi/messagebus/messages/removedocumentreply.h> #include <vespa/documentapi/messagebus/messages/updatedocumentreply.h> #include <vespa/vespalib/stllike/hash_set.h> +#include <vespa/fastos/thread.h> #include <vespa/log/log.h> LOG_SETUP(".proton.persistenceengine.persistenceengine"); diff --git a/searchlib/src/vespa/searchlib/docstore/idatastore.h b/searchlib/src/vespa/searchlib/docstore/idatastore.h index f45aa404f9e..c8744da84a8 100644 --- a/searchlib/src/vespa/searchlib/docstore/idatastore.h +++ b/searchlib/src/vespa/searchlib/docstore/idatastore.h @@ -4,10 +4,10 @@ #include <vespa/vespalib/data/databuffer.h> #include <vespa/vespalib/stllike/string.h> -#include <vespa/vespalib/stllike/hash_map.h> #include <vespa/searchlib/docstore/ibucketizer.h> #include <vespa/searchlib/util/memoryusage.h> #include "data_store_file_chunk_stats.h" +#include <vespa/fastos/timestamp.h> namespace search { diff --git a/staging_vespalib/src/vespa/vespalib/util/rusage.h b/staging_vespalib/src/vespa/vespalib/util/rusage.h index d41b7961097..1b157b92605 100644 --- a/staging_vespalib/src/vespa/vespalib/util/rusage.h +++ b/staging_vespalib/src/vespa/vespalib/util/rusage.h @@ -3,6 +3,7 @@ #include <vespa/vespalib/stllike/string.h> #include <vespa/fastos/timestamp.h> +#include <sys/resource.h> namespace vespalib { diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.cpp b/vespalib/src/vespa/vespalib/util/time_tracker.cpp index 2636d3c7301..d8b1f8740a7 100644 --- a/vespalib/src/vespa/vespalib/util/time_tracker.cpp +++ b/vespalib/src/vespa/vespalib/util/time_tracker.cpp @@ -2,9 +2,20 @@ #include "time_tracker.h" #include "stringfmt.h" +#include <cassert> namespace vespalib { +TimeTracker::TimeTracker(uint32_t max_level_in) + : _tasks(), + _current_level(0), + _max_level(max_level_in) +{ } + +TimeTracker::~TimeTracker() { + assert(_current_level == 0); +} + void TimeTracker::build_stats_string(const std::vector<Task> &tasks, uint32_t level, vespalib::string level_name, vespalib::string &out) diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.h b/vespalib/src/vespa/vespalib/util/time_tracker.h index afbec786488..f31ba4305de 100644 --- a/vespalib/src/vespa/vespalib/util/time_tracker.h +++ b/vespalib/src/vespa/vespalib/util/time_tracker.h @@ -31,9 +31,8 @@ private: static std::vector<Task> &find_tasks(std::vector<Task> &tasks, uint32_t level); public: - explicit TimeTracker(uint32_t max_level_in) - : _tasks(), _current_level(0), _max_level(max_level_in) {} - ~TimeTracker() { assert(_current_level == 0); } + explicit TimeTracker(uint32_t max_level_in); + ~TimeTracker(); uint32_t level() const { return _current_level; } uint32_t max_level() const { return _max_level; } void open_task(const char *name); |