| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this point, a dynamic build might have resulted in some runtime
libraries being statically linked into shared objects and executables in
cases where "shared" runtime libraries were actually linker scripts that
linked static versions. This was the case with the MongoDB toolchain and
some distro toolchains, including those installed as updated compiler
versions in RHEL.
The effect of having runtime libraries statically linked was that
symbols from those libraries would end up scattered over the compiled
objects, increasing object sizes and slowing down server startup. Now,
whenever a dynamic build is selected, the user can choose whether to
create "shim" runtime libraries that wrap the static ones.
The default behavior remains as it was before, and dynamic runtime must
be enabled in order to use it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Interruptible and Mutex
This commit:
- Adds Listener hooks for Interruptible
- Expands Listener hooks for Mutex
- Updates the DiagnosticInfo and its tests to use the new hooks
- Removes stacktracing pieces from DiagnosticInfo and its tests
- Removes mongo::ConditionVariable entirely in favor of Interruptible
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a very low-level bare metal header, and should ideally
#include only std headers.
- Remove Decimal128 dependency from endian.h. Decimal128 doesn't
need endian conversions, and makes endian.h transitively include
several higher-level mongo specifics. Current conversions are
underspecified and mathematically incorrect or at least ambiguous.
They swap the order within each of the low64 and high64 fields,
but don't swap them with each other. This is behavior needed only
by one spot in db/pipeline/value.cpp to deserialize NumberDecimal,
so we can just inline the behavior there and remove it from
endian.h.
- Remove MONGO_CONFIG_BYTE_ORDER from config.h. The running compiler
holds the ultimate truth on what the target endianness is
(available via _BYTE_ORDER_). We should not read it from a config
header. The names exported into C++ code for the endian
possibilities can be changed to line up with those in C++20's
std::endian {big,little,native} enum. This eliminates the
Scons<=>C++ bridge protocol of "1234" and "4321" magic numbers.
Scons will talk to the compiler, not directly to the code.
- Use enum expressions (including if constexpr) rather than #if for
branching on endianness. This makes bit-rot of unexecuted paths
less likely, and is just cleaner C++.
- Remove bswap_slow variants. All supported compilers have builtin
bswap operations. Can reduce to a simple MSVC vs GCC branching.
All compilers have a builtin, so remove the bswap_slow"
implementation.
- Don't need all the push_macro / pop_macro stuff, or really any
macros at all. Just rely on inline C++ functions. These optimize to
the same thing.
- Don't need ByteOrderConverter or IntegralTypeMap traits either.
Simpler metaprogramming based only on sizeof will work fine.
All in all we can remove about 400 lines of old code here and
shave some low-level edges off of the dependency graph.
- benchmark
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mongo/base library.
|
| |
|
|
|
|
| |
functions.
|
| |
|
| |
|
|
|
|
| |
changeable at runtime.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Alignment, aliasing and endian safe read write primitives in the form
of DataView and DataCursor primitives. These primitives provide safe
reads and writes with explicit endian variants that funnel through
std::memcpy to provide defined behavior.
Support for a safe packed struct idiom is also provided in the
encoded_value_storage class.
|
|
|
|
|
|
|
|
|
| |
runtime
Do not make direct calls to backtrace, backtrace_symbols or backtrace_symbols_fd,
which are present in Solaris 11 but not in Solaris 10. Instead, see if they are
available in a loaded library (which will be libc.so.1) at runtime and either
call them or call an emulation.
|
|
|
|
|
|
|
| |
For the Solaris/SmartOS build, do not make direct calls to posix_fadvise,
which is present in Solaris 11 but not in Solaris 10. Instead, see if
it is available in a loaded library (which will be libc.so.1) at runtime
and either call it or call an emulation. The emulation is a no-op.
|
|
|
|
|
|
|
|
| |
For the Solaris/SmartOS build, do not make direct calls to strcasestr,
which is present in Solaris 11 but not in Solaris 10. Instead, see if
it is available in a loaded library (which will be libc.so.1) at runtime
and either call it or call an emulation. Use the emulated version on
Windows, which is also missing this function.
|
| |
|
| |
|
| |
|
|
|
|
| |
time
|
|
Implementations for Windows compatible with Server 2003 and later, using the Interlocked* functions.
Implementations for gcc-compatible compilers targeting x86_64 (AMD64/IA-32e) using inline assembly.
Implementations for gcc-compatible compilers supporting __sync_val_compare_and_swap targeting x86
(IA-32), using a mix of inline assembly and __sync_val_compare_and_swap.
No implementation for older GCC compilers targeting x86 (IA-32), including the default compiler on RHEL5.
Unit test included, for correct single-threaded semantics.
|