--
cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0 by Jorg Brown <jorg@google.com>:
Add union padding to AsTree, to avoid issues on 32-bit MSVC 2015 compilers
alignas() causes compiler errors as per https://godbolt.org/z/vaTKjn
This change uses explicit padding to achieve what we want: https://godbolt.org/z/Mfjhhj
PiperOrigin-RevId: 353211413
--
b1ac7430ffdefe58c01b29e9acd182cda4630e1d by Jorg Brown <jorg@google.com>:
Make the casting functions flat() and ring() be static_cast, rather than reinterpret_cast.
PiperOrigin-RevId: 353149543
--
c37a6761c31720317c8b0b7db62b693643a88586 by Abseil Team <absl-team@google.com>:
Integrate CordRepRing logic into cord (but do not enable it)
PiperOrigin-RevId: 353135656
--
2007fd3045ed6285106795cf8f2e6d792922f5e8 by Abseil Team <absl-team@google.com>:
Fix a typo in the description of ::equal_range(). The correct return is actually a half-open range [first, last).
PiperOrigin-RevId: 353122213
--
6683fa2ba7271dd1f575bd7742d97f47a034c9d2 by Abseil Team <absl-team@google.com>:
Integrate CordRepRing logic into cord (but do not enable it)
PiperOrigin-RevId: 353121763
GitOrigin-RevId: cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0
Change-Id: I6635163cd634706f5462c4065aa278e6bf193a72
--
3b43586da865534cf86401d2cae09c65c60b8474 by Abseil Team <absl-team@google.com>:
Introduce CordRepRingReader class
PiperOrigin-RevId: 353070937
--
0bff6e4bcca34fdd1e6610da5fb3c37fd49b2940 by Abseil Team <absl-team@google.com>:
Fix docstring typo "Exmaple" -> "Example"
PiperOrigin-RevId: 352927688
--
1ef4e0a1100cfa7bc9d9e8f155acf0e469348b56 by Abseil Team <absl-team@google.com>:
Refactor tree initialization of ChunkIterator and CordReader
PiperOrigin-RevId: 352916786
--
919c3eb175b87294184a405785eef4fab520d47e by Abseil Team <absl-team@google.com>:
Disable `preserve_most` when compiling with sanitizers.
PiperOrigin-RevId: 352890630
GitOrigin-RevId: 3b43586da865534cf86401d2cae09c65c60b8474
Change-Id: I8a733494b353af69a46862a4019a7f9b40148f49
--
642ab296a2c9629c44f3f2ce6911cd2488bcf416 by Derek Mauro <dmauro@google.com>:
Remove an obsolete check in CMakeLists.txt
PiperOrigin-RevId: 352852564
--
ce78cb96bcfd162737dbcf35005da3d1d6a3486b by Abseil Team <absl-team@google.com>:
Clarify that the calling *thread* must have locked the mutex in order to unlock
it.
PiperOrigin-RevId: 352801804
--
24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:
Fixes failing CMake string comparisons
https://cmake.org/cmake/help/latest/policy/CMP0054.htmlFixes#791
PiperOrigin-RevId: 352791054
--
0ac10bc3f4dca2c4c4b51d7b8196a2eaee9537a1 by Abseil Team <absl-team@google.com>:
Introduce CordRepRing class
This change introduces the CordRepRing class that implements all the lower level / internal implementation for upcoming CordRepRing ring buffer support in cord.
PiperOrigin-RevId: 352771994
--
4bd36dda61760785844f0f29f26d90cc18046f75 by Abseil Team <absl-team@google.com>:
Optimize InlineData representation for cord sampling (cordz)
This CL changes InlineData to allow us to store a (future) Cordz Info pointer directly into the inline representation:
- make InlineData a class that provides a public API to set the active union members (tree or chars) and safely access that data.
- change 'tree' and 'profiled' bits to be the 2 least significant bits, allowing us 62 continquous bits for storing a Cordz Info pointer.
PiperOrigin-RevId: 352642411
--
dc55ba71bbce0e6a83e05a453990c51ac3d68426 by Mark Barolak <mbar@google.com>:
Add unit test coverage for the mutating overload of absl::AsciiStrToLower.
PiperOrigin-RevId: 352626006
GitOrigin-RevId: 642ab296a2c9629c44f3f2ce6911cd2488bcf416
Change-Id: I6c5929dd830d3c630e14e7fd5387fc3e25a69100
--
a0491c8d790972cd80e2d720fe1fdf5f711a6f1a by Greg Falcon <gfalcon@google.com>:
Stop directly accessing CordRepFlat data via CordRep::data.
The old pattern of access breaks the `CordRep` type abstraction; since `CordRep::data` is not in general guaranteed to contain the chunk's data, we shouldn't access it that way.
This incidentally adds an assertion check (via the flat() accessor) that the CordRep is indeed flat on each such access, but a manual inspection of the code, as well as the fact that this code currently works, suggest that this is always true.)
PiperOrigin-RevId: 351592344
--
f40c3b43ca5b1d7e23cd45f1ffac1783105ac1a3 by Abseil Team <absl-team@google.com>:
Revert 18abb2902b9f06c63a968b24d3dda785ebf99a22
PiperOrigin-RevId: 351523518
--
18abb2902b9f06c63a968b24d3dda785ebf99a22 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 351512412
--
9b881602d45e95e06089792c7627cd56528a255a by Abseil Team <absl-team@google.com>:
Keep time's global state in a cacheline-aligned structure.
Keeping the global state as separate global variables results in two issues:
1) False sharing with adjacent global data (e.g., cycle clock source), since
the global fields are updated every O(10usec).
2) The hot global fields (e.g., seq and samples) can reside on different
cache lines.
To fix this, simply wrap the global data in a ABSL_CACHE_ALIGNED structure.
This is similar to what we do for MutexGlobals.
PiperOrigin-RevId: 351389466
GitOrigin-RevId: a0491c8d790972cd80e2d720fe1fdf5f711a6f1a
Change-Id: Ie0fa80112043381cd37c84e2ab2b7334839f54b5
--
1609589925459c2c0b2a17912c0d65227f709db9 by Abseil Team <absl-team@google.com>:
Clarify the "Potential Mutex deadlock" reason message.
PiperOrigin-RevId: 351367862
--
88bf28863db2c2d2d48767c3e4dfab6a48bdff79 by Abseil Team <absl-team@google.com>:
Print CPU number is fault handler.
This CL adds code to print CPU number inside the fault handler. This is only supported on Linux. The CPU number is also a hint only. There is no guarantee that it is indeed the CPU on which a fault happened.
PiperOrigin-RevId: 351238373
--
66a9c8e44b5744fec1ca0d7b8db7e1d50772d9a2 by Samuel Benzaquen <sbenza@google.com>:
Add better error message for ODR violations of flags.
PiperOrigin-RevId: 351197423
--
6efd1efb341563148dd43255aaa4bf959dfd9554 by Chris Kennelly <ckennelly@google.com>:
Assume bitwise builtins are available on GCC.
These are long-standing builtins but are not consistently detected by
ABSL_HAVE_BUILTIN.
PiperOrigin-RevId: 350814036
GitOrigin-RevId: 1609589925459c2c0b2a17912c0d65227f709db9
Change-Id: Ied3fd2f135187f2c316b403fba45f3bbaea54138
--
b927776da818c674a674e46a7bbbdd54170a0ad3 by Todd Lipcon <tlipcon@google.com>:
Include priority in the calculation of mutex waiter equivalence
This changes the behavior of the absl::Mutex wait list to take into account
waiter priority when creating "skip chains". A skip chain on the wait list
is a set of adjacent waiters that share some property and enable skipping
during traversal.
Prior to this CL, the skip chains were formed of waiters with the same
wait type (e.g. exclusive vs read) and Condition. With this CL, the priority
is also taken into account.
This avoids O(n) behavior when enqueueing a waiter onto a wait list where
the oldest waiter is at a lower priority than the waiter to be enqueued.
With the prior notion of equivalence class, a skip chain could contain
waiters of different priority, so we had to walk the linked list one-by-one
until finding the appropriate insertion point. With the new equivalence
class computation, we can skip past all of the equivalent waiters to find
the right insertion point.
This gives a substantial improvement to the enqueue performance in the
case where there's already a waiter at lower priority.
Note that even though this code path isn't a hot one, it's performed while
holding the Mutex's spinlock, which prevents other threads from unlocking
the Mutex, so minimizing the time under the critical section can have
"knock-on" throughput benefits.
Notable performance differences:
name old cpu/op new cpu/op delta
BM_MutexEnqueue/multiple_priorities:0/threads:4 8.60µs ± 7% 8.69µs ± 6% ~ (p=0.365 n=19+20)
BM_MutexEnqueue/multiple_priorities:0/threads:64 8.47µs ± 5% 8.64µs ±10% ~ (p=0.569 n=19+20)
BM_MutexEnqueue/multiple_priorities:0/threads:128 8.56µs ± 3% 8.55µs ± 6% ~ (p=0.563 n=17+17)
BM_MutexEnqueue/multiple_priorities:0/threads:512 8.98µs ± 8% 8.86µs ± 4% ~ (p=0.232 n=19+17)
BM_MutexEnqueue/multiple_priorities:1/threads:4 6.64µs ±10% 6.45µs ± 4% ~ (p=0.097 n=20+17)
BM_MutexEnqueue/multiple_priorities:1/threads:64 15.2µs ± 8% 9.1µs ± 4% -39.93% (p=0.000 n=20+17)
BM_MutexEnqueue/multiple_priorities:1/threads:128 22.3µs ± 6% 9.4µs ± 4% -57.82% (p=0.000 n=20+17)
BM_MutexEnqueue/multiple_priorities:1/threads:512 61.5µs ± 3% 10.1µs ± 8% -83.53% (p=0.000 n=20+20)
name old time/op new time/op delta
BM_Mutex/real_time/threads:1 19.6ns ± 4% 19.8ns ±11% ~ (p=0.534 n=17+17)
BM_Mutex/real_time/threads:112 120ns ±17% 122ns ±14% ~ (p=0.988 n=20+18)
BM_MutexEnqueue/multiple_priorities:0/threads:4 5.18µs ± 6% 5.23µs ± 6% ~ (p=0.428 n=19+20)
BM_MutexEnqueue/multiple_priorities:0/threads:64 5.06µs ± 5% 5.18µs ±10% ~ (p=0.235 n=19+20)
BM_MutexEnqueue/multiple_priorities:0/threads:128 5.16µs ± 3% 5.14µs ± 6% ~ (p=0.474 n=17+17)
BM_MutexEnqueue/multiple_priorities:0/threads:512 5.40µs ± 8% 5.32µs ± 5% ~ (p=0.196 n=20+18)
BM_MutexEnqueue/multiple_priorities:1/threads:4 3.99µs ±10% 3.88µs ± 3% ~ (p=0.074 n=20+17)
BM_MutexEnqueue/multiple_priorities:1/threads:64 8.48µs ± 9% 5.41µs ± 3% -36.20% (p=0.000 n=20+16)
BM_MutexEnqueue/multiple_priorities:1/threads:128 12.2µs ± 6% 5.6µs ± 4% -54.43% (p=0.000 n=20+17)
BM_MutexEnqueue/multiple_priorities:1/threads:512 32.1µs ± 3% 5.9µs ± 8% -81.45% (p=0.000 n=20+20)
...
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:32 1.69µs ± 4% 1.66µs ± 2% -1.91% (p=0.000 n=20+20)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:48 1.90µs ± 2% 1.82µs ± 2% -4.09% (p=0.000 n=20+19)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:64 2.19µs ± 2% 1.80µs ± 1% -17.89% (p=0.000 n=20+20)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:96 2.18µs ± 5% 1.81µs ± 1% -16.94% (p=0.000 n=17+19)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:128 2.18µs ± 1% 1.91µs ± 2% -12.33% (p=0.000 n=19+20)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:192 2.27µs ± 2% 1.89µs ± 1% -16.79% (p=0.000 n=20+19)
BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:256 2.36µs ± 2% 1.83µs ± 1% -22.25% (p=0.000 n=20+19)
PiperOrigin-RevId: 350775432
--
e7812590e5dbd75d21e2e8762713bd04c0353ef6 by Todd Lipcon <tlipcon@google.com>:
Fix test timeouts for sequence_lock_test on TSAN
PiperOrigin-RevId: 350680903
--
3090d8154d875f3eabce48876321ae8d6a197302 by Todd Lipcon <tlipcon@google.com>:
Add benchmarks for Mutex performance with multiple priorities
This adds a new benchmark to mutex_benchmark which forces threads to go
through the slow "Enqueue" path. The benchmark runs with varying numbers
of threads and with/without the presence of a lower-priority waiter.
PiperOrigin-RevId: 350655403
GitOrigin-RevId: b927776da818c674a674e46a7bbbdd54170a0ad3
Change-Id: If739e5e205f0d3867661a52466b8f64e7e033b22
--
e86453648e05d9bf30ff97a68fba8ce5134ee1c9 by Abseil Team <absl-team@google.com>:
Fix compilation in C with clang on windows with -Wundef flag
PiperOrigin-RevId: 350545275
GitOrigin-RevId: e86453648e05d9bf30ff97a68fba8ce5134ee1c9
Change-Id: I029538298ff894d5798b9c6f488af7aa1a3ec2a7
--
9d120df9deffb80c2102ac5048bb18c0cf5b9506 by Derek Mauro <dmauro@google.com>:
Delete LTS.md
Update links to point to https://abseil.io/about/releases and
https://github.com/abseil/abseil-cpp/releases instead.
PiperOrigin-RevId: 350239792
--
43790be723cc11169a559e25b2198ee07a63722c by Derek Mauro <dmauro@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 350188087
GitOrigin-RevId: 9d120df9deffb80c2102ac5048bb18c0cf5b9506
Change-Id: Ieb9bd31a3af06e64a3d49f8b233daafe7827f733
--
4e789887c5e2d3e531499c6c761a10bf60272969 by Abseil Team <absl-team@google.com>:
Remove a branch from MutexDelay.
Store the mutex sleep limit in the static so that it's not calculated every
time. Remove num_cpus from the static data because it's not used anymore. The
size of static data is 2 QWORDS after this change.
PiperOrigin-RevId: 350069849
GitOrigin-RevId: 4e789887c5e2d3e531499c6c761a10bf60272969
Change-Id: Ic374c63c8a7011b5f8931459e44a7841d4b2a2e6
--
465461299a9814aca325fee599cefbfe462f12fe by Abseil Team <absl-team@google.com>:
Optimize trivially copyable flags with a sequence lock
PiperOrigin-RevId: 349602779
--
73f39f959e21121684a51887243abad0814a335e by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 349590869
--
6b3106fa66b8f075a39a1a8f3265ae132b7e2c84 by Abseil Team <absl-team@google.com>:
Remove ABSL_DLL from `log_prefix_hook` and `abort_hook`.
PiperOrigin-RevId: 349560499
--
bb0d295e699a509f3284145e025d00036b70dbb2 by Abseil Team <absl-team@google.com>:
Tiny docstring fix
A small edit to make "use of this is useful" a little less redundant. :)
PiperOrigin-RevId: 349445689
GitOrigin-RevId: 465461299a9814aca325fee599cefbfe462f12fe
Change-Id: I08cc4091b8b95b68188cb9168ac622dacc5fa688
--
7c15492a46380679651a4291bb284980901d04b1 by Andy Getzendanner <durandal@google.com>:
Add some internal hooks for ABSL_RAW_LOG and do a bit of tidying up.
PiperOrigin-RevId: 348836291
--
9a438cdcf2bd8d2b7ab27f4955432abf0d087672 by Evan Brown <ezb@google.com>:
Fix a bug affecting b-tree extract() when there are multiple keys in the container that are equivalent to the lookup key.
In that case, we are supposed to extract the first such key in the container - [reference](https://en.cppreference.com/w/cpp/container/multiset/extract), but we were extracting the first one we found (which was not necessarily the first in the container).
Also, optimize internal_lower_bound to not keep searching all the way to the leaf if it finds an equivalent key on an internal node and we can't have multiple equivalent keys for the lookup key.
PiperOrigin-RevId: 348822858
--
b5e34c3af3f52815dbca3c6858c26fa8f385a408 by Abseil Team <absl-team@google.com>:
Fix misleading comment.
Ignored object can be either deallocated or leaked.
PiperOrigin-RevId: 348705960
--
64fd9e8c0684bfe86f50161b0e0e9077bb96e05c by Christian Blichmann <cblichmann@google.com>:
Minor cleanups:
- Sorting using declarations
- Changing the format of a NOLINT statement
PiperOrigin-RevId: 348641845
GitOrigin-RevId: 7c15492a46380679651a4291bb284980901d04b1
Change-Id: Ia1ccd844586bd3dced2466651f1175d40caf3d7a
--
be02479c8f5ddf18f0d711e86648a2a0a9823fb6 by Gennadiy Rozental <rogeeff@google.com>:
Suppress MSVC warning about unused return value
PiperOrigin-RevId: 348624511
--
10e6da15e34d84d314fc1eca1bcdeb96538a04d1 by Derek Mauro <dmauro@google.com>:
Add additional information to README.md
PiperOrigin-RevId: 348562436
--
57283e13d221d9a3f6678a1c6db1a41b4421b938 by Jorg Brown <jorg@google.com>:
Tweaks for better AArch64 support under MSVC
PiperOrigin-RevId: 348518028
--
48cb64ed90c71db6342dcf478a03bbb419b98500 by Christian Blichmann <cblichmann@google.com>:
Internal change
PiperOrigin-RevId: 348480642
GitOrigin-RevId: be02479c8f5ddf18f0d711e86648a2a0a9823fb6
Change-Id: I3614bf846ad1b99e34f507346da1252c6bbc13ba
--
b95862447354428f62ae1627cf526e42ca0b7a9d by Christian Blichmann <cblichmann@google.com>:
Minor cleanups:
* Sorting using declarations
* Changing the format of a NOLINT statement
PiperOrigin-RevId: 348448885
--
954a4375fb09267e55dfda345605b9aca54998b0 by Abseil Team <absl-team@google.com>:
Enable some more Emscripten tests.
Requires setting -s PRINTF_LONG_DOUBLE=1 in a recent build.
PiperOrigin-RevId: 348043610
GitOrigin-RevId: b95862447354428f62ae1627cf526e42ca0b7a9d
Change-Id: I517c94a5fd0feb9b99823dc8552d28fa598723fe
--
0b13723ab1ca5231950c3ef76e57c415ce36d9d2 by Abseil Team <absl-team@google.com>:
Fix documentation typo
PiperOrigin-RevId: 348003868
--
2ad4875258ffd604b19f57d7cfbb9f9a093ff880 by Derek Mauro <dmauro@google.com>:
Add missing #include <assert.h>
Note: This file is sometimes used from C so we can't use <cassert>
PiperOrigin-RevId: 347931562
--
4d0c777a3645bddea9d0d6c49ec8ef3afea8c0b7 by Chris Kennelly <ckennelly@google.com>:
Use unsigned types for BitMask helper functions.
Additionally, explicitly perform narrowing cast. T will always have fewer than
2^32 bits.
PiperOrigin-RevId: 347913413
--
80c44b0b066485a25baff56d475b67be2ad027e7 by Abseil Team <absl-team@google.com>:
Stash errno for a larger scope.
Also adjust the test to account for EXPECT_* possibly modifying errno as well.
PiperOrigin-RevId: 347899763
GitOrigin-RevId: 0b13723ab1ca5231950c3ef76e57c415ce36d9d2
Change-Id: I9e7c0e5d45ac778644f3ad72d215378a8cf8a7d4
--
dab5caab05d89d03066ef92584660688595a3aaf by Mark Barolak <mbar@google.com>:
Add absl::Status and absl::StatusOr to absl/README.md
Import of https://github.com/abseil/abseil-cpp/pull/863
PiperOrigin-RevId: 347857368
--
1ca3c7a96417cd6e6d62f4dc36fd5ddaa61cfa20 by Chris Kennelly <ckennelly@google.com>:
Leverage integer power-of-2 functions and bit counting library in Abseil.
PiperOrigin-RevId: 347816486
--
e5cbe05879fd65dce7875e2e0105331a1615d89b by Chris Kennelly <ckennelly@google.com>:
Mitigate narrowing warning on MSVC.
If sizeof(x) <= sizeof(uint32_t), no truncation occurs when casting to
uint32_t, but the compiler cannot always determine this.
PiperOrigin-RevId: 347696526
--
079dff64cb175d282d9e22dfb4a522199ffdae2e by Benjamin Barenblat <bbaren@google.com>:
Avoid libgcc -NaN narrowing bug
When testing -NaN parsing, avoid narrowing -NaN from double to float.
This avoids a bug in libgcc
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98251).
PiperOrigin-RevId: 347654751
--
2e78a7634865aeef6765e1f447e96cf8d9985059 by Chris Kennelly <ckennelly@google.com>:
Mark popcount helpers as inline.
These are conditionally constexpr, so we need to add inline to cover the
non-constexpr builds to avoid ODR violations.
PiperOrigin-RevId: 347620138
--
437fbb363aea1654179f102dcdd607ec33c1af1e by Chris Kennelly <ckennelly@google.com>:
Use explicit narrowing cast.
This is never invoked in practice, but compilers with -Wimplicit-int-conversion
may trigger when sizeof(T) > sizeof(uint16_t) prior to determining this never
runs.
PiperOrigin-RevId: 347609857
GitOrigin-RevId: dab5caab05d89d03066ef92584660688595a3aaf
Change-Id: I6296ddffe7ec646f8ce121138f21e1e85a2cff4b
--
f0456157cdc6cef6dbb5d2f99f9dc3ca0e213fab by Abseil Team <absl-team@google.com>:
Improve flag_benchmark reproducibility, test multiple threads
This adds multiple threads to the flags benchmark, and also uses some
linker magic to ensure that the defined flags are mapped to a consistent
alignment regardless of other code changes in the benchmark binary.
The benchmark performance in multiple threads is somewhat sensitive to
the alignment of the FlagImpl class, depending on whether the flag value
and the absl::Mutex are on the same cacheline or different ones. Making
all flags be cacheline-aligned would probably waste too much memory,
so this CL instead just makes the memory alignment consistent within the
tests.
PiperOrigin-RevId: 347536882
--
a019646d306b9497a1eba7efa5e2c4c651d9979d by Derek Mauro <dmauro@google.com>:
Fix other comments in node_hash_set.h
PiperOrigin-RevId: 347462975
--
66a4b39fe84a3e81935ad08ee76291df13d1d5e6 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 347436244
--
52f4d18c2c4439d26428f64ac4de41e6183919ee by Mark Barolak <mbar@google.com>:
container: fix introduction for node_hash_set.h
Import of https://github.com/abseil/abseil-cpp/pull/861
PiperOrigin-RevId: 347432772
GitOrigin-RevId: f0456157cdc6cef6dbb5d2f99f9dc3ca0e213fab
Change-Id: I629f27e5b9584d92b0a42284c1acf708779bad3f
--
751781aa5b9e998f84a8a7e00789c80d3338730e by Abseil Team <absl-team@google.com>:
Fix attributes.h compilation with -Wundef flag in C
PiperOrigin-RevId: 347394915
--
66070a8166b0e1a61236b954d07fbb378f4f990b by Abseil Team <absl-team@google.com>:
Revert the usage of variant<> in Cord iterator and reader.
The introduction of the variant may lead to some missed compiler optimizations.
PiperOrigin-RevId: 347384869
GitOrigin-RevId: 751781aa5b9e998f84a8a7e00789c80d3338730e
Change-Id: Ibf1190d498a6f968f2ea9b89467ccfb5224dafa8
--
0bfa836596a9c787a2f0bdc283011dd1f6810c6e by Benjamin Barenblat <bbaren@google.com>:
Ignore missing CPU frequency on more architectures
Linux on MIPS, PA-RISC, RISC-V, and SystemZ doesn’t expose the nominal
CPU frequency via /sys, so don’t worry if `NominalCPUFrequency` returns
1.0 on those platforms.
Some POWER machines expose the CPU frequency; others do not. Since we
can’t predict which type of machine the tests will run on, simply
disable testing for `NominalCPUFrequency` on POWER.
PiperOrigin-RevId: 347079873
--
492b6834ed4a07cbc3abccd846f7e37d8c556ee5 by Benjamin Barenblat <bbaren@google.com>:
Use ABSL_HAVE_THREAD_LOCAL macro instead of copying code
Reduce code duplication by checking the ABSL_HAVE_THREAD_LOCAL macro
instead of copying code from base/config.h.
PiperOrigin-RevId: 347079561
--
8d656efce4da9cb032094377e58493d98427a536 by Abseil Team <absl-team@google.com>:
Rollback
PiperOrigin-RevId: 347078779
--
221bc69ec6dd7e2777ffcff6942584f979ef6382 by Abseil Team <absl-team@google.com>:
Add flag for 'shallow subcord' feature for experimental ring buffer rollout
There is a potential trade-off of CPU cost vs over-sharing cord data for subcord of large cords. This flag allows making subcords shallow for ringbuffers (with a potential larger waste of referenced source cords), which allows us to make subcord fast for this apps that do no persist (unmodified / plain copied) sub cords.
This change also introduces constants for the default settings, intended to keep the internal cord settings concistent with external flags.
PiperOrigin-RevId: 347053271
--
00a56c24293566734009f6bf2169a83fb37a35ba by Abseil Team <absl-team@google.com>:
Revert the usage of variant<> in Cord iterator and reader.
The introduction of the variant may lead to some missed compiler optimizations.
PiperOrigin-RevId: 347053041
--
c7b7b5ed7e3ab46b1e75b80f1a7de0bda26c8f70 by Chris Kennelly <ckennelly@google.com>:
Release library for integer power-of-2 functions and bit counting.
PiperOrigin-RevId: 347035065
--
5a035c0d9840b251967f9e7039fc6a4e01dd52f3 by Abseil Team <absl-team@google.com>:
Restructure Cord::ChunkIterator for future ring buffer support.
PiperOrigin-RevId: 346890054
GitOrigin-RevId: 0bfa836596a9c787a2f0bdc283011dd1f6810c6e
Change-Id: I3a58e2a44cb4c6f2116c43e2a4ccbc319d3ccecf
--
6e9f93888bbe6718997ed90bbd049f1f3572b066 by Abseil Team <absl-team@google.com>:
Fix status to be safe for self move assignment.
PiperOrigin-RevId: 346815392
--
35cae74a977f258e81dfbe925fb5a34cb6632036 by Gennadiy Rozental <rogeeff@google.com>:
Eliminate unnecessary access to the global vars.
PiperOrigin-RevId: 346777168
--
e7e786c243069060f5d6c1c945decb4b0b83f95b by Andy Getzendanner <durandal@google.com>:
Internal change.
PiperOrigin-RevId: 346685656
--
4ccd41c48f1a83cfa20b3ea534f743dd7d788376 by Abseil Team <absl-team@google.com>:
Move CordRep Ref() and Unref() logic into cord_internal.h
This change moves Ref() and Unref() logic out of cord.cc into cord_internal. The main purpose is to make upcoming ring buffer changes easier to isolate from existing cord.cc code. Notice that this removes the nullptr check from Unref() and now requires it to be non null (which held true most times). We may need to rethink if the 'unref unlikely one' is the common case: are cordreps most likely shared? This may be something between 'root' and non root nodes, i.e., is it more likely for leaf / flat nodes in large cords to be shared than top level cordreps being shared? Vice versa? Benchmarks say that we mostly shouldn't care, the caveat being that atomic ops seem more expensive on upcoming archs (arcadia) so we should error on the side of an extra IsOne() branch saving us single owned atomic ops.
PiperOrigin-RevId: 346676121
--
f0babab103b9e60d61ba09482d468985e43eceb3 by Samuel Benzaquen <sbenza@google.com>:
Fix iterator based constructor and `.insert` members to only require
EmplaceConstructible as the standard specifies.
PiperOrigin-RevId: 346616707
--
8f48eedda02277f9c96a88ed7726e34b557cce20 by Evan Brown <ezb@google.com>:
Fix a bug in binary_search_impl when there's a transparent, three-way comparator that has different equivalence classes for different lookup types.
Add a new can_have_multiple_equivalent_keys method to share the common logic for these cases.
PiperOrigin-RevId: 346605948
--
649183cb3cc9383431de9c81fb1c0f885d4001ae by Abseil Team <absl-team@google.com>:
Add benchmark for accessing a Duration flag.
PiperOrigin-RevId: 346594843
--
fefdb046520871af63ce2229e2f7cccfc0483dea by Abseil Team <absl-team@google.com>:
Restructure CordReader for upcoming ring buffer changes.
PiperOrigin-RevId: 346410642
--
8b2f50e7da0ebab06ead5f94e366e984ca23cb6a by Abseil Team <absl-team@google.com>:
Wire in an internal-only flag to toggle upcoming ring buffer changes on/off for experimentation.
PiperOrigin-RevId: 346199111
GitOrigin-RevId: 6e9f93888bbe6718997ed90bbd049f1f3572b066
Change-Id: I8f34866b25a79209cb5448bbb28dd3044111d2e9
--
ff793052bd01e1e4fcf639f94d7c30c4855a9372 by Evan Brown <ezb@google.com>:
Roll forward of btree_iterator refactoring.
PiperOrigin-RevId: 346116047
--
17984679f16e3e2139b0f14fa76f4a6ca16a3ef9 by Chris Kennelly <ckennelly@google.com>:
Extend absl::StrContains to accept single character needles.
Single characters are more efficient to search for. Extending this API allows
the abseil-string-find-str-contains Clang Tidy to include this pattern.
The C++ committee has adopted http://wg21.link/P1679 for inclusion in C++23.
PiperOrigin-RevId: 346095060
--
ef20b31c501b1dcaa25e244fd8f8aa43dec09bd6 by Jorg Brown <jorg@google.com>:
Internal change for cord ring
PiperOrigin-RevId: 346087545
--
b70f2c1cb77fc9e733a126e790967d45c5fd1dc7 by Derek Mauro <dmauro@google.com>:
Release layout_benchmark
PiperOrigin-RevId: 345968909
--
3a0eda337ee43622f92cfe14c2aa06f72dc71ee5 by Derek Mauro <dmauro@google.com>:
Release raw_hash_set_probe_benchmark
PiperOrigin-RevId: 345965969
--
abffdb4bb241a2264cb4e73a6262b660bb10447d by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 345733599
--
7c9e24a71188df945be17fe98f700bdb51f81b16 by Derek Mauro <dmauro@google.com>:
Release hash_benchmark
PiperOrigin-RevId: 345721635
--
d68f33f17f9a8cd3f6da8eee3870bdb46402cdc8 by Derek Mauro <dmauro@google.com>:
Release raw_hash_set_benchmark
PiperOrigin-RevId: 345708384
--
6e6c547d4d1327b226c0ffe8ff34d0aa103ce24b by Abseil Team <absl-team@google.com>:
Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor
PiperOrigin-RevId: 345548260
--
1532424deda97d468444c217cc0fa4614099c7c1 by Evan Brown <ezb@google.com>:
Rollback btree_iterator refactoring.
PiperOrigin-RevId: 345543900
GitOrigin-RevId: ff793052bd01e1e4fcf639f94d7c30c4855a9372
Change-Id: I719831981fd056de41939f9addfee3d85e3b49b2
--
8ebcdcac49f299156a8fd4a77501a258050960e8 by Evan Brown <ezb@google.com>:
In btree_iterator, refactor a bit and update a couple of comments.
PiperOrigin-RevId: 345491436
--
421d3b9b5cf484811b9514436ce83f797e109145 by CJ Johnson <johnsoncj@google.com>:
Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor
PiperOrigin-RevId: 345479151
--
88f36a132b2038cb276ed1ad4d9764adb1fc78e6 by CJ Johnson <johnsoncj@google.com>:
Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor
PiperOrigin-RevId: 345433064
--
e55c9b4e7c578c1c4f2df65b1991041c283a97d9 by Chris Kennelly <ckennelly@google.com>:
Internal change
PiperOrigin-RevId: 345388181
--
e2284c4e77ff1ebc3009e5bf520524c552226d8a by Chris Kennelly <ckennelly@google.com>:
Internal change
PiperOrigin-RevId: 345357514
--
1c496a2ae07ce98578614155d63ef2ea4de5e518 by Chris Kennelly <ckennelly@google.com>:
Mark string lookup functions noexcept.
PiperOrigin-RevId: 345275012
GitOrigin-RevId: 8ebcdcac49f299156a8fd4a77501a258050960e8
Change-Id: I0ccb57d210b543270769e1378de38bf0922f8745
--
7b6a68aa92dcc7247236d1a1813914e035383bf8 by Abseil Team <absl-team@google.com>:
Use atomic exchange to mark completion in absl::once_flag
This prevents a potential for a missed wakeup if one thread marks
itself as a waiter while another thread is completing the invocation.
PiperOrigin-RevId: 344946791
--
ddff21d1dde08d1368d8be5fca81b154e78be2fc by Abseil Team <absl-team@google.com>:
Add missing string_view include. This is currently used transitively through the cord header.
PiperOrigin-RevId: 344845266
GitOrigin-RevId: 7b6a68aa92dcc7247236d1a1813914e035383bf8
Change-Id: Ia24e98a1df832fc4cb491d888fdf21182b5954f4
--
d85f04af95a6fdafb102f7dc393d78d4431b47e5 by Abseil Team <absl-team@google.com>:
Internal change for cord ring
PiperOrigin-RevId: 344541196
--
1ff57908e31a09ec0c98d8316da1263092cc3a1c by Abseil Team <absl-team@google.com>:
Fix typo in comment.
PiperOrigin-RevId: 344214280
GitOrigin-RevId: d85f04af95a6fdafb102f7dc393d78d4431b47e5
Change-Id: I58b3c28f62a5d10dd665b17d58a121f371e1260a
--
fcedaa5714efab8738446fa21620b827a40a3458 by Derek Mauro <dmauro@google.com>:
Uses Wyhash in the implementation of absl::Hash for hashing sequences
of more than 16 bytes on some platforms.
Due to the per-process randomization of the seed used by absl::Hash, users
should not notice this change, other than possibly getting better performance.
This change only affects platforms where absl::uint128 is implemented
with an intrinsic (and where sizeof(size_t)==8) since Wyhash relies on
fast 128-bit multiplication for speed.
PiperOrigin-RevId: 343956735
--
085e108c760084f19caa21dbeb2118de2be3f8f0 by Abseil Team <absl-team@google.com>:
Internal change for cord ring
PiperOrigin-RevId: 343919274
--
4c333278ad14d6692f203074b902506008ad624a by Jorg Brown <jorg@google.com>:
Minimize strings_internal::StringConstant further, by removing the need for the compiler to instantiate a compile-time class function.
PiperOrigin-RevId: 343878568
--
71c3c8c7b7821b67997e3d5345aaec67f93f266f by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 343838259
GitOrigin-RevId: fcedaa5714efab8738446fa21620b827a40a3458
Change-Id: Ifb91895a82d11e743acd42fe97ab7fb70712b7df
--
1f91ba7fcb79244fce1fe448c1d31fb5b0580584 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 343511158
--
8dcd61fed44f4e56044aa4a899cc3124117fa21f by Abseil Team <absl-team@google.com>:
refactors result_of so it doesn't unnecessarily break in C++20 mode
std::result_of was deprecated in C++17 and removed in C++20. This CL
adds an implementation detail so it transparently continues to work
when external users turn up to C++20 or later.
The implementation is derived from C++17's specification of result_of
[depr.meta.types][1].
[1]: https://timsong-cpp.github.io/cppwp/n4659/depr.meta.typesFixes#649
PiperOrigin-RevId: 343395432
GitOrigin-RevId: 1f91ba7fcb79244fce1fe448c1d31fb5b0580584
Change-Id: Id5d9c55dc7547737bade48a15f2f5740f414d811
--
03700706d80f0939e2b5b8c02a326f045b643730 by Abseil Team <absl-team@google.com>:
Reduced latency and code-size of some InlinedVector methods:
1. Simpler fast path for push_back/emplace_back.
2. Do not inline slow path of push-back/emplace_back.
3. Simplify resize implementation.
Performance:
A simple benchmark that does the following per iteration:
```
push_back on an InlinedVector<int64>
push_back on an InlinedVector<bool>
```
Sees iteration time go from 4.3ns to 2.8ns and code size shrink from 1129 bytes to 175 bytes.
PiperOrigin-RevId: 343335635
--
16f74277a9e8bf228c164b053da8b8098f76de62 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 343332753
--
886b6d5d0244783d309e34f03c21710f411e3cb3 by Abseil Team <absl-team@google.com>:
Optimize `Status::Status`: When creating a status, we currently create an empty struct first, then assign fields. This is suboptimal: https://screenshot.googleplex.com/5HqDuFBKUEqrVgy.
Relevant Benchmarks:
```
BM_StatusCopyError_Deep/threads:1 26.9ns ±13% 21.2ns ±16% -21.46% (p=0.000 n=15+15)
BM_StatusCopyError_Deep/threads:2 32.0ns ±30% 25.6ns ±37% -20.17% (p=0.004 n=15+14)
BM_StatusCopyError_Deep/threads:4 37.4ns ±84% 30.6ns ±58% -18.26% (p=0.029 n=15+15)
BM_StatusCopyError_Deep/threads:8 47.2ns ±33% 33.5ns ±56% -28.91% (p=0.000 n=15+14)
```
PiperOrigin-RevId: 343303312
--
2f9d945654292e8e52cad410fa41dae794cff42c by Abseil Team <absl-team@google.com>:
Set SOVERSION for the installed libraries
PiperOrigin-RevId: 343287682
--
600bbfffe91cfbdc60b43cdad5619258298d0b0d by Abseil Team <absl-team@google.com>:
Fix a typo in a comment (than -> that)
PiperOrigin-RevId: 343187724
--
310c82cd97b3f1f0d1ee93a0ee2b0aee828b2a93 by Abseil Team <absl-team@google.com>:
Simplify unaligned memory access functions.
The #ifdef to produce calls to __sanitizer_unaligned_load16 etc were needed in past versions of this code, when we were lying to the compiler about the alignment of the loads/stores, by using a reinterpret_cast.
However, a year ago, absl switched to simply use memcpy. Sanitizers support this correctly by default, nothing extra is required.
PiperOrigin-RevId: 343159883
--
bdf6fcf99180c371fda6ba8af82fd44656e372fa by Gennadiy Rozental <rogeeff@google.com>:
Migrate usage flags to global variables instead of modeling them as Abseil Flags.
Also introduce new semantic for --help=substring command line argument.
PiperOrigin-RevId: 343019883
GitOrigin-RevId: 03700706d80f0939e2b5b8c02a326f045b643730
Change-Id: I4ad40dfa9606f8b8bfb2d91fd09e327105311bfb
--
77e2a9c277721f23a8df983c1efc6ed97c167964 by Derek Mauro <dmauro@google.com>:
Simplify an internal piece of CityHash to remove the conflicting
definition of uint128
PiperOrigin-RevId: 342906008
--
593dbb6d5fd32cc5d31e3ba1eda02e8ddeaeaaf6 by Gennadiy Rozental <rogeeff@google.com>:
Skip retired flags in GetAllFlags output.
This is a bug fix. We should not have released this interface producing retired flags. There should be no observable difference for the users who should not care about retired flags.
PiperOrigin-RevId: 342889378
--
bb77e07abff4dbd0a9c97eb85ee85cb39b84d04a by Abseil Team <absl-team@google.com>:
Extract `find_first_not_full` outside of the raw_hash_set.
This function is used in the following scenarios:
0. [relatively hot] insert, when actual new element is added.
1. [relatively cold] resize (explicit or on capacity grow)
2. [relatively cold] copy constructor
3. [cold] rehash on insert/erase (aka cache) use cases
Resize typically mitigated by `reserve` in performance critical cases. Rehashing happen relatively rare, when hash table become polluted with deleted slots.
We keep `find_first_not_full` in header, so that compiler still can inline it, when necessary (most notably in insert use case).
This reduce binary size since only one copy of this function will be present in the binary for all tables where the function is not inlined (at least in one case).
PiperOrigin-RevId: 342736300
GitOrigin-RevId: 77e2a9c277721f23a8df983c1efc6ed97c167964
Change-Id: I3fe9d054c66049bb598ea35c45fc800b1cdaa9b6
--
92811d3307196b2810bdc3c7e50ef9544db3f23b by CJ Johnson <johnsoncj@google.com>:
Refactor InlinedVector's OverheadTest.Storage test to be easier to understand and modify in the future
PiperOrigin-RevId: 342718098
--
cf3f2af201775f9c4e68dd2f9806126aecbd0748 by Abseil Team <absl-team@google.com>:
Implement `reserve` more explicit to avoid calling `rehash`.
`reserve` is much more widely used method and doesn't need extra logic present in `rehash`.
E. g., accidental `t.reserve(0)` on non empty table shouldn't cause rehashing, which was a case before this change.
It also remove some unnecessary computations from `reserve`.
Was:
```
GrowthToLowerboundCapacity 2x
NormalizeCapacity 1x
bitwise | 1x
n == 0 && capacity_ == 0 1x
n == 0 && size_ == 0 1x
n == 0 1x
|| 1x
m > capacity_ 1x
overall branches 6x
(GrowthToLowerboundCapacity 2x, NormalizeCapacity 1x, rehash 3x)
```
Now:
```
GrowthToLowerboundCapacity 1x
NormalizeCapacity 1x
bitwise | 0x
n == 0 && capacity_ == 0 0x
n == 0 && size_ == 0 0x
n == 0 0x
|| 0x
m > capacity_ 1x
overall branches 3x
(GrowthToLowerboundCapacity 1x, NormalizeCapacity 1x, reserve 1x)
```
PiperOrigin-RevId: 342714022
--
c2ab8c1e4091ff685110c81bae12e3567e0cded3 by Abseil Team <absl-team@google.com>:
Remove `reset_growth_left` call, which already happen in `initialize_slots`.
PiperOrigin-RevId: 342701073
--
3f41ccb70afabec8bc0dcfcca3e3ac918726bb92 by Derek Mauro <dmauro@google.com>:
Use memmove instead of memcpy in situations where the source and
destination may point to the same buffer
Note that the OSS Abseil code never calls CUnescapeInternal with
leave_nulls_scaped=true, so there is no bug in the OSS code.
Fixes#844
PiperOrigin-RevId: 342633781
--
57afb2c307b008b9f9daaa736b49c066e0075e39 by Abseil Team <absl-team@google.com>:
Add absl::Round() for absl::Duration as a complementary to Floor, Ceil and Trunc. Rounding halfway cases away from zero as std::round() does.
PiperOrigin-RevId: 342610871
--
c49754ecddb9339eff60b826dc17b3b459333bc0 by Abseil Team <absl-team@google.com>:
Add absl::Round() for absl::Duration as a complementary to Floor, Ceil and Trunc. Rounding halfway cases away from zero as std::round() does.
PiperOrigin-RevId: 342594847
--
b51bd29233aaee6ef241de984635356d26c93e4d by Abseil Team <absl-team@google.com>:
Move `ConvertDeletedToEmptyAndFullToDeleted` to cc file.
This function is cold and only used when table become polluted with deleted slots.
So this shouldn't negatively affect performance and considered safe.
This change is reducing linkage and binary size.
PiperOrigin-RevId: 342319685
--
acb83c004d14e563a3b47dcfcb6c5508bee6408f by Abseil Team <absl-team@google.com>:
Fix indentation in uniform_int_distribution.h.
PiperOrigin-RevId: 342297575
GitOrigin-RevId: 92811d3307196b2810bdc3c7e50ef9544db3f23b
Change-Id: I4fbaf4aab122d5c939ae9a3ef46ee8cca3df75e6
--
a1b28d83d60f96e14487f093566f12ba07f92732 by Mark Barolak <mbar@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 342270204
--
3d99c08b7e2ee23050f64965f09881b54821cdd0 by Mark Barolak <mbar@google.com>:
Fix a Windows DLL breakage that is causing all sub-libraries to be compiled as DLL dependencies instead of stand-alone DLLs.
See https://github.com/abseil/abseil-cpp/issues/796 for the bug report.
Import of https://github.com/abseil/abseil-cpp/pull/797
PiperOrigin-RevId: 341892182
GitOrigin-RevId: a1b28d83d60f96e14487f093566f12ba07f92732
Change-Id: I7d70f07492bfa9b657ec280a4f005c1ee893594c
--
197bd3e5e315f408bdc2f7111a0652be7f47609f by Jorg Brown <jorg@google.com>:
ConvertibleToStringView wastes a lot of cycles initializing a std::string
member that it never uses. This CL restricts ConvertibleToStringView to just
the cases that don't nned a std::string member, and uses an additional StrSplit
overload to catch when users pass a temporary string.
This makes StrSplit() 0-30% faster depending on the use case.
PiperOrigin-RevId: 341378221
GitOrigin-RevId: 197bd3e5e315f408bdc2f7111a0652be7f47609f
Change-Id: Id863f2a3d298ed5a086ac912afab42dc30601be5
--
76c5eb1cf346a1a64e0a5e2edf032546d600075a by Andy Getzendanner <durandal@google.com>:
Fix stacktrace on aarch64 architecture. Fixes#805
Import of https://github.com/abseil/abseil-cpp/pull/827
PiperOrigin-RevId: 340886173
--
28f48f7bcadd4681854cddb0a7736d26d7dab000 by Andy Getzendanner <durandal@google.com>:
Some attribute cleanups in and around statusor:
* mark statusor_internal::Helper::Crash ABSL_ATTRIBUTE_NORETURN
* add ABSL_INTERNAL_UNREACHABLE to ABSL_INTERNAL_LOG when severity is FATAL
* create ABSL_INTERNAL_UNREACHABLE to wrap __builtin_unreachable and __assume(0)
* use ABSL_ATTRIBUTE_NONNULL instead of __builtin_unreachable in statusor_internal::PlacementNew (https://godbolt.org/z/n691fa)
PiperOrigin-RevId: 340868438
--
33905d1d2d01eb6f81b04abaf24170bfebb6df09 by Andy Getzendanner <durandal@google.com>:
moved deleted functions to public for better compiler errors.
Import of https://github.com/abseil/abseil-cpp/pull/828
PiperOrigin-RevId: 340863976
--
5e502222dfc3f5a0ef146535a9e16c743b005092 by Jorg Brown <jorg@google.com>:
ConvertibleToStringView wastes a lot of cycles initializing members just to reset them immediately after. Only initialize the string storage when needed. This makes StrSplit() 0-30% faster depending on the use case.
PiperOrigin-RevId: 340732039
GitOrigin-RevId: 76c5eb1cf346a1a64e0a5e2edf032546d600075a
Change-Id: I2ba1f717c4eaad384cd0a22694fd05f9e6a2d8fa
--
bc21467e5507ca041dcd1162cb524d2a01fd17d6 by Abseil Team <absl-team@google.com>:
Fix mistakes in license boilerplate:
- randen_detect.cc had a space removed
- arg_test.cc had a truncated header
PiperOrigin-RevId: 340484448
GitOrigin-RevId: bc21467e5507ca041dcd1162cb524d2a01fd17d6
Change-Id: I654080c9c84f28017384a3f30bcb17d7cf43b881
--
dce086fa6e045bed433c664f95a6581b7ffb2d98 by Abseil Team <absl-team@google.com>:
fix spelling error "fulfil" -> "fulfill"
PiperOrigin-RevId: 339898016
--
10faa4546b69d8a07f949bc03dd9671231232ad0 by Abseil Team <absl-team@google.com>:
Clarify comments on variant::emplace
PiperOrigin-RevId: 339897241
--
0d02261a7a8b9c11e3a4e76dfedf4d95590e2419 by Derek Mauro <dmauro@google.com>:
Use thread_local for ThreadIdentity storage on Apple platforms
that support it
PiperOrigin-RevId: 339698124
GitOrigin-RevId: dce086fa6e045bed433c664f95a6581b7ffb2d98
Change-Id: I8c668b33c805fd5231ceb285652c80f312e5a33a
--
0e3e8be75b3ab243991c9b28a27623d86e4511e6 by Abseil Team <absl-team@google.com>:
Add constructor overloads with signature (Mutex*, const Condition&) to MutexLock, ReaderMutexLock, WriterMutexLock, ReleasableMutexLock, MaybeMutexLock.
These overloads call Mutex::LockWhen, Mutex::ReaderLockWhen, Mutex::WriterLockWhen.
Using the guard classes with these new constructors replaces both manual LockWhen/Unlock sequences and the less-efficient, but popular current pattern of "absl::MutexLock lock(&mu); mu.Await(cond);".
PiperOrigin-RevId: 339480213
--
ff999bc08360f5bd95557147c97b0e7b200fe3a8 by Jorg Brown <jorg@google.com>:
ConvertibleToStringView wastes a lot of cycles initializing members just to reset them immediately after. Only initialize the string storage when needed. This makes StrSplit() 0-30% faster depending on the use case.
PiperOrigin-RevId: 339479046
--
0a773bfb8bc141433a41388731357001fdb34881 by Derek Mauro <dmauro@google.com>:
Remove the compiler upgrade fiasco inducing -Weverything -Werror.
Switch to a curated set of warnings that may be expanded in the future.
PiperOrigin-RevId: 339472677
--
eab54e3e11b126283d33f64c914b200038d215a4 by Abseil Team <absl-team@google.com>:
Change execute permission to match presence of the shebang
remove execute permission for cmake_common.sh
add execute permission for conanfile.py
PiperOrigin-RevId: 339453550
--
7f9726fb605ed20f17f3e221dbce0df03d6904c6 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 339385761
--
f3210dbee3e8a719cf31706963721722203f90e0 by Derek Mauro <dmauro@google.com>:
Switch clang compiler detection to use to the Bazel supported mechanism
When Abseil launched, we relied on the compiler string "llvm",
which we manually set when we used the automatic crosstool generation
by using the environment variable BAZEL_COMPILER. Today, Bazel detects
clang and automatically sets the compiler string to "clang".
Fixes#732
PiperOrigin-RevId: 339360688
--
413211f59e5e671bf5774efa63ab4df185c74248 by Abseil Team <absl-team@google.com>:
Minor comment clarifications and cosmetic tweaks.
PiperOrigin-RevId: 339344301
GitOrigin-RevId: 0e3e8be75b3ab243991c9b28a27623d86e4511e6
Change-Id: Ia5b7224cd3d274c79ec7f5514fef63014f458f0f
--
e5b45b15c19e85aaa33430ac2bd45fcc2e52dad5 by Greg Falcon <gfalcon@google.com>:
Add extra tests exercising ShiftLeft() at boundary conditions, to guard against logic errors in our memory bounds checking.
PiperOrigin-RevId: 339326030
--
cdfde78815ca016a57f90f53d08c3335bd355f30 by Evan Brown <ezb@google.com>:
Fix a bug in b-tree erase() and count() in which we weren't accounting for cases where the comparator is heterogeneous and has different equivalence classes for different lookup types.
Optimize equal_range to avoid comparisons when possible.
PiperOrigin-RevId: 339270230
--
b4aa337c156fa91f74f25c676c679ae146311968 by Derek Mauro <dmauro@google.com>:
Fix execution of the cmake build scripts when not on Kokoro
PiperOrigin-RevId: 339131253
--
fa3d1f602f711be72fde6b5f29d6341b9b5f8a2c by Derek Mauro <dmauro@google.com>:
Update Docker container used for Alpine Linux testing
PiperOrigin-RevId: 339074246
GitOrigin-RevId: e5b45b15c19e85aaa33430ac2bd45fcc2e52dad5
Change-Id: I2cc3adc4de3493203c8a944aedee40efa54af0c0
--
730bb88bee556aa11fa19aa33e1434cb6fa78985 by Evan Brown <ezb@google.com>:
Support missing allocator-related constructors in b-tree. See [reference](https://en.cppreference.com/w/cpp/container/set/set).
Also use allocator_traits::select_on_container_copy_construction() to get allocator for copy construction.
PiperOrigin-RevId: 339058322
--
b6cc121689ae3e452d1db2d66122cb198d25142b by Derek Mauro <dmauro@google.com>:
Fix more sign-compare warnings
PiperOrigin-RevId: 339057920
--
0e2c62da1dcaf6529abab952bdcc96c6de2d9506 by Abseil Team <absl-team@google.com>:
Add missing <limits> include
PiperOrigin-RevId: 339054753
--
d5a9ec2d1e40fe6359e720942e4955009ee415ec by Derek Mauro <dmauro@google.com>:
Stop disabling sign-compare warnings for non-test targets.
Our users complain about these.
This does not catch issues in header-only libraries (like btree.h)
but we may work on those in the future
PiperOrigin-RevId: 338967089
--
0c062c542a4c61ea0f65d25811827c0858e3adde by Abseil Team <absl-team@google.com>:
Improve cache-locality for ThreadIdentity and PerThreadSynch.
This is a change based on an observation in RPC benchmarks that shows
significant cycles being spent in waking up a thread, 99.8% of which
was on cache misses. Investigating this a bit more, it turns out to
be due to sharing the cache line with the waiter state.
To fix this issue, the following changes are introduced:
- Reorder fields in PerThreadSync so that it fits in a single cache line
The size of this structure was 80 bytes before this change.
Note: Manually inspected all booleans to make sure they are not modified by
multiple threads concurrently.
PiperOrigin-RevId: 338852058
--
a90d6f2b2346385017e32dd8ae1b5ca691a5863f by Derek Mauro <dmauro@google.com>:
Delete GCC 4.9 test script. It is no longer supported
PiperOrigin-RevId: 338779452
--
7274008d4757e88869110be9db39d03d911ae2b5 by Abseil Team <absl-team@google.com>:
Fix the usage example in which SetFlag should take a pointer.
PiperOrigin-RevId: 338744529
GitOrigin-RevId: 730bb88bee556aa11fa19aa33e1434cb6fa78985
Change-Id: Iff99594c4022e60e482a392d334b376c7ae8883e
--
017c3924d21132085bc20c9be0ae469bfbf2c56c by Gennadiy Rozental <rogeeff@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 338723934
--
8b08c23d7b05232e283b1388cee3eb5bebc2d9c4 by Derek Mauro <dmauro@google.com>:
Add script to test GCC floor (the minimum version of GCC we support,
currently the GCC 5 series)
PiperOrigin-RevId: 338708581
--
afa440ac7c843126b4f99b89ebc071dda1d85a4d by Abseil Team <absl-team@google.com>:
Fix typo in documentation of StatusOr::value_or() ('of' -> 'if').
PiperOrigin-RevId: 338690089
--
97d5008865327fc36b942b96de0d0cacfb909df5 by Derek Mauro <dmauro@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 338568224
--
da5e09a7fedb3217329465d9206b7cbc6677176b by Abseil Team <absl-team@google.com>:
Add `absl_btree_prefer_linear_node_search`
Allow keys of `btree_set`, `btree_map`, `btree_multiset`, and `btree_multimap`
to opt-in to linear search (instead of binary search). Linear search was
used previously for arithmetic types with `key_compare` of `std::greater`
or `std::less`.
For example, this would be useful for key types that wrap an integer
and define their own cheap `operator<()`.
```
class K {
public:
using absl_btree_prefer_linear_node_search = std::true_type;
...
private:
friend bool operator<(K a, K b) { return a.k_ < b.k_; }
int k_;
};
absl::btree_map<K, V> m; // Uses linear search
assert((absl::btree_map<K, V>::testonly_uses_linear_node_search()));
```
PiperOrigin-RevId: 338476553
--
c56ead7ce6b0a5ad32e3a42904c686448a69451e by Gennadiy Rozental <rogeeff@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 338419417
GitOrigin-RevId: 017c3924d21132085bc20c9be0ae469bfbf2c56c
Change-Id: I1199f3ae917280a3ef20ccc6038abbe34d96ec0b
--
d09230db053c544c2dc7fd7d95d1ebe4302071e9 by Abseil Team <absl-team@google.com>:
Move testonly_uses_linear_node_search to BtreeNodePeer
PiperOrigin-RevId: 338210523
--
7b11c945dbba7a354103c194877eba240f7f0cbc by Derek Mauro <dmauro@google.com>:
Allow pinning to a GoogleTest commit to make the build reproducible
Allow using a cached copy of the commit to avoid depending on GitHub
PiperOrigin-RevId: 338115715
--
8414f496c570a6398744da8324e158b39a2e3d92 by Andy Getzendanner <durandal@google.com>:
Generate a pkg-config file per absl_cc_library.
PiperOrigin-RevId: 337986219
GitOrigin-RevId: d09230db053c544c2dc7fd7d95d1ebe4302071e9
Change-Id: Iae398ab8ad5c0c6833abd01aa5198315f5b6fa99
--
77c85460dc3c46593b231c5161ac55273bb0c7ef by Abseil Team <absl-team@google.com>:
Support int128 in SimpleAtoi.
PiperOrigin-RevId: 337946262
--
0be53049ccf8309650e4e22f23b290e5f75ee828 by Gennadiy Rozental <rogeeff@google.com>:
Update build scripts to use --mount instead of --volume to mount the host data into a container.
This is somewhat more verbose, but more readable and flexible. More importantly this is what docker documentation is recomending to use now.
PiperOrigin-RevId: 337898761
--
3bc877f1679fdf61ecbf4365287a0403cfc9b53e by Samuel Benzaquen <sbenza@google.com>:
Add Cord constructor for constinit instances.
PiperOrigin-RevId: 337871148
--
8b87701892b9c325e78ad4e8e4f16b785a744622 by Chris Kennelly <ckennelly@google.com>:
Use the address of kSeed, rather than its value.
We initialize kSeed with &kSeed, so these are equivalent, but kSeed requires a
load from memory while &kSeed can be formed as a RIP-relative lea.
PiperOrigin-RevId: 337868415
GitOrigin-RevId: 77c85460dc3c46593b231c5161ac55273bb0c7ef
Change-Id: I3d06c18a123f1be29dad5801e8625952dc41cd95
--
498800727a35cd00c199e653c2a8e34dc3322b54 by Derek Mauro <dmauro@google.com>:
Fixes CMake dependency issues and adds `-Wl,--no-undefined` to avoid
these issues in the future.
Fixes#817
PiperOrigin-RevId: 337615527
--
a14b214a50a095d0c10c9d7a9e98ab1bd3b3976b by Samuel Benzaquen <sbenza@google.com>:
Minor compatibility fix for a version of gcc 5.5
PiperOrigin-RevId: 337561733
--
89a65c211e626bd30c046f79d0df9cc4a7d7c792 by Gennadiy Rozental <rogeeff@google.com>:
Internal change
PiperOrigin-RevId: 337436891
--
d30c05c850ead352dad5ea0dc32942feb2942986 by Abseil Team <absl-team@google.com>:
Place STL exception functions underneath the ABSL_HAVE_EXCEPTIONS #ifdef.
The STL exception functions are not present in the Android NDK, so Abseil fails to build as part of ANGLE in AOSP. This CL places the various STL exception throwing functions inside #ifdef ABSL_HAVE_EXCEPTIONS blocks so they are removed during Android builds since neither ANGLE nor the NDK support exceptions by default.
PiperOrigin-RevId: 337142938
GitOrigin-RevId: 498800727a35cd00c199e653c2a8e34dc3322b54
Change-Id: I17b02daaea145d1a8fdbfd098f0fa99e65c86d2d
--
4ee535c37f92cd45b8c9aa009e5c833265b3a0bb by Samuel Benzaquen <sbenza@google.com>:
Test and fix `insert(hint, node)`
PiperOrigin-RevId: 337122891
--
7b760ced555756fecbad702fedb697424dd65167 by Abseil Team <absl-team@google.com>:
Changed the minimum version of iOS and OSX for Abseil Podspec.
PiperOrigin-RevId: 336926756
GitOrigin-RevId: 4ee535c37f92cd45b8c9aa009e5c833265b3a0bb
Change-Id: I94e70f3342570c83b9965ca458a3f02eaa3efc0d