diff options
author | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-05-23 08:37:54 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-05-23 11:26:36 +0000 |
commit | 60b628f977102f905b67f23d765cf19e49fa21db (patch) | |
tree | 5e58abcb9cddb3385251a08a26d7b14e0f2167b1 /searchcorespi | |
parent | bbc62a7d9f6a0ec4e0eaafff3213dfebc49898a8 (diff) |
Move RcuVector and relevant support classes to vespalib
Having RCU support available across all our C++ modules open up
new opportunities for optimizations.
This changes the following:
- `RcuVector` moved from `searchlib` to `vespalib`
- `MemoryUsage` moved from `searchlib` to `vespalib`
- Introduce a simplified, more generic `GrowStrategy` in `vespalib`
used by the moved `RcuVector` which does not have any notion of
documents. Existing searchlib `GrowStrategy` gets a simple function
to convert to this generic strategy.
Diffstat (limited to 'searchcorespi')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h | 4 | ||||
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/index_manager_explorer.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h b/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h index f7eed750842..e25a3ef7b64 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h +++ b/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h @@ -5,7 +5,7 @@ #include <vespa/searchcommon/common/schema.h> #include <vespa/searchcorespi/index/indexsearchable.h> #include <vespa/searchlib/common/serialnum.h> -#include <vespa/searchlib/util/memoryusage.h> +#include <vespa/vespalib/util/memoryusage.h> #include <vespa/vespalib/stllike/string.h> namespace search @@ -35,7 +35,7 @@ struct IMemoryIndex : public searchcorespi::IndexSearchable { /** * Returns the memory usage of this memory index. */ - virtual search::MemoryUsage getMemoryUsage() const = 0; + virtual vespalib::MemoryUsage getMemoryUsage() const = 0; /** * Returns the memory usage of an empty version of this memory index. diff --git a/searchcorespi/src/vespa/searchcorespi/index/index_manager_explorer.cpp b/searchcorespi/src/vespa/searchcorespi/index/index_manager_explorer.cpp index 4764aeef8ee..63a63b0159d 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/index_manager_explorer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/index_manager_explorer.cpp @@ -26,7 +26,7 @@ insertDiskIndex(Cursor &arrayCursor, const DiskIndexStats &diskIndex) } void -insertMemoryUsage(Cursor &object, const search::MemoryUsage &usage) +insertMemoryUsage(Cursor &object, const vespalib::MemoryUsage &usage) { Cursor &memory = object.setObject("memoryUsage"); memory.setLong("allocatedBytes", usage.allocatedBytes()); |