aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23183 from vespa-engine/havardpe/stop-passing-nullptrHåvard Pettersen2022-06-211-1/+3
|\ | | | | stop passing nullptr
| * stop passing nullptrHåvard Pettersen2022-06-211-1/+3
| |
* | too_big => throw_too_bigHenning Baldersheim2022-06-212-8/+8
| |
* | Inline hot path and keep error handling in .cpp file.Henning Baldersheim2022-06-212-31/+39
| |
* | Inline return AttrDFW::get_attribute() and clean up some old code with ↵Henning Baldersheim2022-06-211-32/+0
|/ | | | manual allocation.
* avoid unaligned accessHåvard Pettersen2022-06-202-6/+14
|
* enable making string handles directly from numbersHåvard Pettersen2022-06-163-0/+32
| | | | | used in peek/slice to avoid having to convert small numbers to strings before resolving the enum values.
* support VESPA_SHARED_STRING_REPO_NO_RECLAIM flagHåvard Pettersen2022-06-154-22/+78
|
* Merge pull request #23052 from vespa-engine/havardpe/common-memory-toolsHenning Baldersheim2022-06-132-95/+206
|\ | | | | common memory tools
| * use guards for unlikely casesHåvard Pettersen2022-06-131-8/+7
| |
| * common memory toolsHåvard Pettersen2022-06-102-95/+207
| |
* | shared string repo tweaksHåvard Pettersen2022-06-132-14/+17
|/ | | | | - 64 -> 256 partitions - 99999 -> 9999999 maximum small number
* fix undefined behavior in unit testsHåvard Pettersen2022-06-093-8/+26
|
* fix undefined behavior in unit tests -- WIPHåvard Pettersen2022-06-073-1/+12
|
* Remove test that invokes undefined pthread behaviorTor Brede Vekterli2022-06-072-12/+2
| | | | | | It is not well-defined to call a pthread function with a thread that is no longer valid. Remove test and add a precondition comment to the function that IDs must be valid.
* Remove vespalib::rmdir and vespalib::mkdirTor Egge2022-06-033-178/+23
|
* Merge pull request #22874 from ↵Tor Brede Vekterli2022-06-032-0/+7
|\ | | | | | | | | vespa-engine/vekterli/dump-stack-of-deadlocked-thread Let deadlock detector dump stack of potentially deadlocked threads
| * Let deadlock detector dump stack of potentially deadlocked threadsTor Brede Vekterli2022-06-022-0/+7
| | | | | | | | | | | | | | | | | | | | | | Enable cross-thread stack tracing as part of signal handler init code in both storage and proton daemons. Make deadlock detector parameters live configurable. Remove existing `restart` config definition annotations to reflect this. Remove dumping of bucket DB locks which hasn't really worked for a long time now.
* | Remove most use of vespalib::rmdir in vespalib. Deprecate vespalib::mkdir.Tor Egge2022-06-025-9/+14
|/
* Merge pull request #22788 from ↵Tor Brede Vekterli2022-06-026-26/+232
|\ | | | | | | | | vespa-engine/vekterli/add-cross-thread-stack-trace-dumping Add support for cross-thread stack dumping to vespalib
| * Really, really, really don't inline the backtrace-test functionTor Brede Vekterli2022-06-012-1/+2
| |
| * Ensure names are visible in backtrace by moving functions to a shared libraryTor Brede Vekterli2022-06-014-15/+35
| | | | | | | | Name resolving does not necessarily work for static functions.
| * No need to specify noinline for signal handler landing pad functionTor Brede Vekterli2022-06-011-3/+1
| |
| * Use compare_exchange to check and un-set pending signal handlerTor Brede Vekterli2022-06-011-3/+4
| |
| * Enable cross-thread stack tracing once for all testsTor Brede Vekterli2022-06-011-5/+5
| |
| * Simplify to just use seq_cst instead of rel/acq for signal handler completionTor Brede Vekterli2022-05-311-2/+2
| | | | | | | | Matches the use of seq_cst for the rest of the stack dumping logic.
| * Add support for cross-thread stack dumping to vespalibTor Brede Vekterli2022-05-304-26/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no existing API for conveniently getting the stack trace of any other thread than your own, so we have to turn things around a bit and make the target thread dump its own stack in a way that we can then safely access and return it. We allow for hooking SIGUSR2 at process startup time and use this as our dedicated stack dump signal internally. The process of stack dumping is then basically: 1. Caller sends SIGUSR2 to the target thread. This happens within a global mutex that ensures no other callers can attempt to dump stack at the same time. This is because we use a single, globally shared state between caller and target (the same signal handler function is used by all threads). 2. Caller acquire-polls (with 1ms sleep) for target thread signal handler completion. Fancy technologies such as mutexes and condition variables are not safe to use from within a signal handler and therefore cannot be used. 3. Target thread suddenly finds itself in Narnia (signal handler). Since the signal is the magical SIGUSR2, it proceeds to dump its stack frame addresses in a shared buffer. It then toggles completion, with release semantics, before returning to its regularly scheduled programming. 4. Caller exits poll-loop and assembles a complete stack trace from the frame addresses in the shared buffer, demangled and shiny. Signal-safe stack frame dumping currently uses Boost.Stacktrace, which is a header-only dependency and appears to use libunwind under the hood.
* | Merge pull request #22854 from vespa-engine/balder/inline-tensor-access-methodsHenning Baldersheim2022-06-022-10/+4
|\ \ | | | | | | - Optimize get_tensor_ref optimizing for no branches on happy path.
| * | - Optimize get_tensor_ref optimizing for no branches on happy path.Henning Baldersheim2022-06-012-10/+4
| | | | | | | | | | | | | | | - Also drop check for reference as that is done in the next called method. - Inline DirectTensorStore::get_tensor.
* | | Merge pull request #22851 from ↵Geir Storli2022-06-023-59/+14
|\ \ \ | | | | | | | | | | | | | | | | vespa-engine/toregge/convert-vespalib-rmdir-to-deprecated-shim Convert vespalib::rmdir to a deprecated shim.
| * | | Convert vespalib::rmdir to a deprecated shim.Tor Egge2022-06-013-59/+14
| | | |
* | | | Avoid huge amounts of cold code in hot path.Henning Baldersheim2022-06-021-0/+3
| | | |
* | | | If all else is equal the compiler will assume the if branch is more likely ↵Henning Baldersheim2022-06-021-10/+10
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than the else branch. This is based on experience since gcc 2.8 and til today, and is not a definitive truth. Just more likely. if (criteria) { most_likely_executed code } else { less_likely_executed code } While a single branched if is assumed less likely.
* | | When you have no special needs, you should just take the default allocator.Henning Baldersheim2022-06-012-1/+7
|/ /
* | vesapAndreas Eriksen2022-06-012-2/+2
| |
* | Avoid pulling in stringfmt.h in by moving code to .cpp file.Henning Baldersheim2022-05-312-2/+1
| |
* | Fix forward declarations.Tor Egge2022-05-311-1/+1
|/
* Avoid using vespalib::Identifiable.Henning Baldersheim2022-05-271-1/+1
|
* fix undefined behaviorHåvard Pettersen2022-05-271-1/+1
| | | | more testing means uncovering more undefined behavior
* Include searchcommon/attribut/config.h yourself and prepare for hiding large ↵Henning Baldersheim2022-05-251-0/+3
| | | | | | implementation. Add setters to vespalib::GrowStrategy.
* Merge pull request #22729 from ↵Henning Baldersheim2022-05-253-34/+45
|\ | | | | | | | | vespa-engine/balder/introduce-concept-of-minimum-capacity - Introduce the concept of minimal capacity for rcu vectors.
| * - Introduce the concept of minimal capacity for rcu vectors.Henning Baldersheim2022-05-243-34/+45
| | | | | | | | | | - This is to prevent shrinking down past what has been configured in proton.documentdb[].allocation.initialnumdocs - shrinking down past the configured value is not supported as that would counter the preallocation done to prevent resizing.
* | avoid undefined behavior in vespalib unit testsHåvard Pettersen2022-05-259-17/+27
| |
* | fix undefined behavior in messagebus unit testsHåvard Pettersen2022-05-251-1/+3
|/ | | | | also avoids hanging/leaving processes after running all unit tests with UBSAN without recovery.
* Reduce inclusion of rcuvector.hppHenning Baldersheim2022-05-232-1/+5
|
* Move calcNewSize to implementation file.Henning Baldersheim2022-05-232-7/+12
|
* - Stick to using GrowStragey everywhere.Henning Baldersheim2022-05-233-60/+20
| | | | - Store the full config in the rcu vector.
* Fold fastlib into vespalib and gc some unused code.Henning Baldersheim2022-05-2151-0/+171457
| | | | Also move some code only used by juniper up into juniper test module.
* Fold staging_vespalib into vespalibHenning Baldersheim2022-05-20143-1/+11006
|
* Use method static instead of global to enable use in other static/global ↵Henning Baldersheim2022-05-201-3/+8
| | | | constructions.