--
83e4cdf03a4d702b30e69204060de09e462e23c6 by Greg Falcon <gfalcon@google.com>:
Revert the crc addition to RefcountAndFlags, and restore related comments to their original state.
In development, the implementation of SetExpectedCrc() changed, and there is no longer a need to track the CRC status in the refcount.
Since the distinction between IsOne() and IsMutable() is subtle *and unused*, removing it now can help avoid subtle bugs in the future. This distinction can always be added back later, if it proves necessary.
Keep the reserved bit for now; all it costs is one extra mask instruction in the refcount checks, and space for extra state in Cord is always hard to find.
PiperOrigin-RevId: 408647038
--
ee67585cf66954176615271f50f8b278119dd138 by Greg Falcon <gfalcon@google.com>:
Implement Cord::SetExpectedChecksum() and Cord::ExpectedChecksum().
SetExpectedChecksum() will store a uint32_t out-of-band alongside a Cord's data. This value persists through copies and assignments. Mutating operations on a Cord cause the value to be forgotten. ExpectedChecksum() retrieves the stored value, if present.
This API is intended for storing a CRC32C checksum alongside data, allowing checksums to be passed through dataflows and validated at the final step. However, this API is agnostic to the meaning of the stored value. No CRC32C validation is performed by these new APIs.
This implementation adds a new CordRep node, CordRepCrc. A CordRepCrc may (currently) only live at the top of a tree. This allows traversal logic to be agnostic to these nodes, instead putting the needed branches at the mutation level. This also implements the property requested from API review, that any mutation is guaranteed to permanently forget the stored CRC.
PiperOrigin-RevId: 408611221
--
a86f592402b37c854ebdc77d2b9b425451a7a675 by Martijn Vels <mvels@google.com>:
Move 'ExtractResult' into CordRep
The result of an extract operation is logically identical for any tree implementation, and having a single type makes 'tree independent' implementation in cord.cc more concise.
PiperOrigin-RevId: 408332408
--
baa7647e21db59a87f75af9cac62172ce38a0f71 by Abseil Team <absl-team@google.com>:
Replace usages of `assert` macros with `ABSL_HARDENING_ASSERT`.
PiperOrigin-RevId: 408272133
--
c7658133d8662c39fa5035fc93a364c7c3d327e0 by Martijn Vels <mvels@google.com>:
Add CordRepBtree::ExtractAppendBuffer
PiperOrigin-RevId: 407944179
--
5775100363b5890ebfe710fadebf040445eab991 by Martijn Vels <mvels@google.com>:
Add CordRepConcat::ExtractAppendBuffer
PiperOrigin-RevId: 407932968
--
9f520ba1600a93352c78f644a369c7c76195ee86 by Greg Falcon <gfalcon@google.com>:
Add cordz tracking for crc nodes.
This also adds a new kSetExpectedChecksum method to the list of tracked methods. This is presently unused but will be used soon.
PiperOrigin-RevId: 407884120
GitOrigin-RevId: 83e4cdf03a4d702b30e69204060de09e462e23c6
Change-Id: I134ace2d87215813eaa60a282996a33884676c06
--
5e45aadfb89e366dedd1fcad5034a76c5c10ad76 by James Y Knight <jyknight@google.com>:
Correct the conditions for std::{optional,variant,any} availability on Apple platforms.
Before XCode 12.5, the availability declarations incorrectly excluded one release on which the features were in fact available. This was corrected in 7fb40e1569
Unfortunately, we cannot simply switch abseil to the corrected versions, as that will cause build failures when using the older XCode toolchain. So, we check the version, and choose the correct set of versions for the toolchain in use.
PiperOrigin-RevId: 407667302
--
376fa06cde048e536e9447336b27bebf598ed4ea by Greg Falcon <gfalcon@google.com>:
Cord implementation change: Add a new CordRepCrc node type.
This is an implementation detail that will allow storing expected CRCs alongside cord data. This node is intended only to live at the top of Cord trees.
PiperOrigin-RevId: 407587140
GitOrigin-RevId: 5e45aadfb89e366dedd1fcad5034a76c5c10ad76
Change-Id: Iea3ca001c0cbb4deec8286b5581b30dc172a9918
--
9f6ef337f282272bc098330c9ccacd9d39155db4 by Abseil Team <absl-team@google.com>:
Make DestroyElements an empty function if the value types are trivially deconstructible.
PiperOrigin-RevId: 407345743
--
a639bbf6f22446d6ba3da9e2c205e26cda4bebc5 by Derek Mauro <dmauro@google.com>:
Add ctest --output-on-failure to the CMake install test
PiperOrigin-RevId: 407333671
--
54d0577fa6ba1159c6a86410ae185c52f4afaff6 by Derek Mauro <dmauro@google.com>:
Fix Android build of elf_mem_image.cc
PiperOrigin-RevId: 407331032
GitOrigin-RevId: 9f6ef337f282272bc098330c9ccacd9d39155db4
Change-Id: I7e13f01cd804aec50f280ac25934c9ec48ef3c5f
--
f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b by Martijn Vels <mvels@google.com>:
Add common [container.requirements] type definitions to `CharRange` and `ChunkRange`
The presence of these allow these range classes to be used in various utility functions which require some minimum type of container. For example, this change allows tests to use `EXPECT_THAT(cord.Chunks(), ElementsAre(...))`
PiperOrigin-RevId: 406941278
--
0c195f073632e21d9a4bce158047b2ba8551c2d1 by Evan Brown <ezb@google.com>:
Use explicit exponential growth in SubstituteAndAppendArray.
PiperOrigin-RevId: 406931952
--
afb043bccd809a55cab78abadb7548a057d9eda0 by Jorg Brown <jorg@google.com>:
Use longer var names in macro to avoid clang-tidy warning
PiperOrigin-RevId: 406930978
--
80397e2604e6b3d929a34742c3a32581b34d3ac4 by Martijn Vels <mvels@google.com>:
Add future kAppendBuffer and kPrependBuffer API trackers for Cordz sampling
PiperOrigin-RevId: 406912759
--
e910ce919ef83933f08a690e8b7325c7cc5b6d5d by Martijn Vels <mvels@google.com>:
Implement Prepend(string_view) in terms of PrependArray(string_view, MethodIdentifier).
PiperOrigin-RevId: 406891665
--
c9cff43d4c0568ed01f2fca0f6ef038ae03112b5 by Martijn Vels <mvels@google.com>:
Add 'Rebuild' logic to CordRepBtree
There are btree hostile scenarios where an application could perform repeated split/insert/merge operations on a cord leading to a tree exceeding the maximum height. While this should be rare in practice, this change adds a Rebuild() method that will rebuild a tree with a 100% fill factor, and we will invoke this rebuild when a tree exceeds the maximum height. This basically follows the similar 'balance' logic in Concat trees (although the latter is common in Concat uses)
PiperOrigin-RevId: 406875739
--
5b2b8fb88f1ebfdc1c670088152da2cb2ea4c376 by Martijn Vels <mvels@google.com>:
Add 'in place' enabled RemoveSuffix
An in-place RemoveSuffix is more efficient than SubTree() as it can directly modify privately owned nodes and flats allowing easy re-use of free capacity in right-most flats that may turn into Substring edges when using SubTree.
PiperOrigin-RevId: 406431230
--
f09903c0a3d7344f59aaf1380a16ea10829217d4 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 406430373
--
9957af575c33bb18dc170572a4ee8cc5901df6b2 by Greg Falcon <gfalcon@google.com>:
Initial groundwork to allow storing checksum data inside CordRep instances.
This uses a RefcountAndFlags bit that was reserved for this purpose, and will be leveraged in a follow-up change to allow attaching checksums to a Cord's value.
This change splits RefcountAndFlags::IsOne() into two distinct operations:
* IsOne(): This returns true when the associated CordRep is not shared with other threads. This is useful for functions that consume CordRep instances; for example, code that consumes an unshared CordRep can assume ownership of its children without modifying those refcounts.
* IsMutable(): This returns true when the associated CordRep reference is not shared with other threads, *and* does not store an associated checksum value. This is useful for functions that modify a CordRep's contents: code may modify the bytes of a mutable-unshared CordRep without fear of races with other threads, or of invalidating a stored checksum.
The tricky part of this CL is ensuring that the correct choice between IsMutable() and IsOne() was made at each point. An incorrect application of IsOne() could lead to correctness bugs in the future. Code conditioned on IsOne() may delete the CordRep in question, or assume ownership of its children, but must not modify the CordRep's data without explicitly adjusting the CRC.
PiperOrigin-RevId: 406191103
--
686544814079e5ab6d4593cca0c068b510be400a by Martijn Vels <mvels@google.com>:
Reduce the size in the LargeString test when running with Sanitizers
PiperOrigin-RevId: 406186945
--
735b4490bdb695c35731f06ce4b8de14ce2be6ed by Alex Strelnikov <strel@google.com>:
Release absl::SimpleHexAtoi.
PiperOrigin-RevId: 406143188
GitOrigin-RevId: f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b
Change-Id: Ic6527ac40fa03ea02ca813e8bb7868a219544de4
--
05a099a580753f8e96cee38572e94dcdc079361b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405966217
--
c6b81e9ebc183d8389f14ecd091c8bad08cfe0aa by Abseil Team <absl-team@google.com>:
Add `inline_element_size` to hashtablez (so that we can compute the weighted load factors properly e.g., in b/187896534).
PiperOrigin-RevId: 405917711
--
3e3673de4e54e4142c54b09e1644dfa3de4bb296 by Abseil Team <absl-team@google.com>:
align indent of code comment in mutex.h
PiperOrigin-RevId: 405871997
--
2248301a5b14f8d2be5b2e9088f3528a353ea491 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 405639236
--
bc7d3c56fdad3dde4b89324af142529f2afe5f1b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405508045
--
66472387276ef02505d99195747be862768bb35b by Laramie Leavitt <lar@google.com>:
Also use uint8_t golden values in randen_test.cc
This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.
PiperOrigin-RevId: 405484423
GitOrigin-RevId: 05a099a580753f8e96cee38572e94dcdc079361b
Change-Id: I3dd5b0cfdb98d6e1ab02266194ba67d15428c2f8
--
30bbe72e8c32d8680bbe6c8473a884d485e9f684 by Laramie Leavitt <lar@google.com>:
Convert randen golden test to use byte arrays.
PiperOrigin-RevId: 404948438
--
4690d9ebd2c518708ad155e913b2140ebdf01234 by Laramie Leavitt <lar@google.com>:
Add golden tests for internal::ExplicitSeedSeeq against stable std:: random URBGs.
PiperOrigin-RevId: 404912608
--
52e9b24276ee3a21cc8a026f9d152ef8ced7f507 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 404861043
--
9e966a2a680970fd27d927cc6420e333b1378b1e by Abseil Team <absl-team@google.com>:
Roll back import of CCTZ from GitHub.
PiperOrigin-RevId: 404343587
--
9c4eedec00105b8288c0b91d96434aea08b8e3c3 by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 404314597
--
f171375fd7bec35cc34815be8faf5e000828b7bb by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 404098156
GitOrigin-RevId: 30bbe72e8c32d8680bbe6c8473a884d485e9f684
Change-Id: Ic7b5a3c0659e321e2f642800930a8de014253e2a
--
b008f3aaab60f1f0eb5987b50336543cca7151be by Martijn Vels <mvels@google.com>:
Enable Cord Btree as the default Cord implementation.
The Cord Btree implementation has been extensively tested by google. This changes makes the Cord Btree implementation the default implementation. This change should have no impact on current use cases and does not effect any public API or behavior.
PiperOrigin-RevId: 403966449
--
3d82052b5819d1244942c59d5cb4e51d75ada287 by Derek Mauro <dmauro@google.com>:
Add missing CMake alias for gmock_main.
Remove unused variable ABSL_TEST_COMMON_LIBRARIES
Fixes#709Fixes#1043
PiperOrigin-RevId: 403950358
--
86695f6d06915b56d807303c37ee81487998cd58 by Abseil Team <absl-team@google.com>:
FunctionRef is cheaper to construct than a std::function, and the argument is only used during the call, so this is safe. This has the added advantage of allowing the caller to provide a non-movable callable, which can't be converted to a std::function.
PiperOrigin-RevId: 403457615
--
196c1109ba519d4ff00c856bbb4bff754468359f by Abseil Team <absl-team@google.com>:
Internal optimization.
PiperOrigin-RevId: 403413291
GitOrigin-RevId: b008f3aaab60f1f0eb5987b50336543cca7151be
Change-Id: I1665f0efd484f53e0ed22d8940ef2fa60b03cc5b
--
58affd6378c47993f5408f7b8a8863fa5bcc2c47 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 403120541
--
27dc5d5f87bca6254585cca69058c14e0a2f3ce6 by Chris Kennelly <ckennelly@google.com>:
Prefetch while hashing.
While we may not need to access the cacheline *ctrl_ is on once we've computed the hash, we can begin to resolve the TLB required for the hashtable's heap allocation simultaneously with computing the hash value for the key.
PiperOrigin-RevId: 402954725
GitOrigin-RevId: 58affd6378c47993f5408f7b8a8863fa5bcc2c47
Change-Id: Id04297de823ad5c5a867c46065fa3a9ef0ada3dd
--
566c422ef23a01a71ca7a02d15a3f23ab5135f47 by Abseil Team <absl-team@google.com>:
Fix a bug in the right shift of negative numbers for the no_intrinsic code path
If the right shift was greater than or equal to 64 bits the the most significant 64 bit would always be initialized to zero. The code now initializes the most significant int64 to all ones if the architecture does arithmetic rights shifts and the number was negative.
PiperOrigin-RevId: 402407698
GitOrigin-RevId: 566c422ef23a01a71ca7a02d15a3f23ab5135f47
Change-Id: I01c57a87a91a2c89f62bb952661e3a5dcdca6234
--
17141711ee419daa597a9f31e73721f80143e55a by Gennadiy Rozental <rogeeff@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 401384949
--
ac48584a7b16e8a12e26d49deb6cddec584a20b5 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 401337785
--
8a51bb7c962845e0707240c5ba12c1b80f6fbbe9 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 401047691
--
8e18024510869247f3c04c7807c93709eca2322a by Chris Kennelly <ckennelly@google.com>:
Note that SpinLock does not guarantee priorities for wakeups.
PiperOrigin-RevId: 400999238
--
75bc09b5f95fbb74b74d14c370bfb80011e8fb7f by Derek Mauro <dmauro@google.com>:
Add visibility restrictions to some internal targets
PiperOrigin-RevId: 400718253
--
1de5061016bc42cd7be009c9725ed2343ce12e3d by Abseil Team <absl-team@google.com>:
Make it clear that operator<< can also be used in place of ToString when logging absl::Status.
PiperOrigin-RevId: 400248269
--
cda15d9dc6e5cd569de7e5e73f409b72a3caed51 by Abseil Team <absl-team@google.com>:
Minor cleanup
PiperOrigin-RevId: 400087535
--
b001375ec47da3a0434be9ca9a45c0df510e7dda by Abseil Team <absl-team@google.com>:
Move periodic_sampler from base/internal to profiling/internal
PiperOrigin-RevId: 400038533
--
e7e02e686abc3900e723080849a3607d190ef57f by Abseil Team <absl-team@google.com>:
Move exponential_biased from base/internal to profiling/internal
PiperOrigin-RevId: 400020329
GitOrigin-RevId: 17141711ee419daa597a9f31e73721f80143e55a
Change-Id: I10924df7e1cc198447813dbe97a374a5cef66b49
--
506fa3e10b3d8399ad937c32ecea26d1ad4e62bb by Abseil Team <absl-team@google.com>:
Disable ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE when GCC < 8.2.0 is used with libc++
PiperOrigin-RevId: 399707056
--
656b7c7cee87f46a4bc7953618796f82da08e62c by Derek Mauro <dmauro@google.com>:
Remove the MSVC flag implementation from flag.h to help clarify that
methods on absl::Flag<T> are not part of the public API
PiperOrigin-RevId: 399584678
--
a92a9bc156303bc663b84c4b704891ec8f67e333 by Abseil Team <absl-team@google.com>:
Get rid of MemcpyIfAllowed while continuing to suppress erroneous warnings
PiperOrigin-RevId: 399468864
--
5f9a66895f707ba001fb51b88c0c6025f8c872a3 by Abseil Team <absl-team@google.com>:
Use feature testing to check for availability of invoke_result.
Feature testing should be available by C++20, which removes invoke_result.
https://en.cppreference.com/w/cpp/feature_test
PiperOrigin-RevId: 399447373
--
946c0a502b4499dbfcabf1ab93ddde0048288fb4 by CJ Johnson <johnsoncj@google.com>:
Add rvalue-reference qualifier to the Commit method on ConstructionTransaction
PiperOrigin-RevId: 399442206
--
726a4d036eff49aeb6fd0ca2b1775699b6844395 by Greg Falcon <gfalcon@google.com>:
Internal change
PiperOrigin-RevId: 399441870
--
1df6d3f659b88dbac13c3d8e13db23bb3844ece2 by Abseil Team <absl-team@google.com>:
Clang-format whitespace changes
PiperOrigin-RevId: 399281271
--
4a828cde95a07421d699ebac775b37810624214f by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 399234071
--
e520c72b34ba2f98668c889139001f8276243d31 by Greg Falcon <gfalcon@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 399233662
GitOrigin-RevId: 506fa3e10b3d8399ad937c32ecea26d1ad4e62bb
Change-Id: I92b9176d2387c08eb167f9268efa78b55b8e09c2
--
d6f0dab708b123a5e24b98da1de0b11e36a7a86e by Evan Brown <ezb@google.com>:
In STLStringResizeUninitializedAmortized, use basic_string::__append_default_init for amortized growth rather than conditionally adding reserve in STLStringReserveAmortized. This way, we can avoid extra branches, e.g. in basic_string::__shrink_or_extend.
PiperOrigin-RevId: 398761382
GitOrigin-RevId: d6f0dab708b123a5e24b98da1de0b11e36a7a86e
Change-Id: Ib2d99411c95d61300519c32b885ce586b410c3bf
--
1801102e11205861bc063e067e9fd4754b625c5a by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 398562681
--
485008445725d4013f60f4b2876f84b6b47932ec by Jorg Brown <jorg@google.com>:
Replace calls to std::isinf with comparison against max().
PiperOrigin-RevId: 398534255
--
9b99d074d39ad677cf92f99549d22bb73f504f8f by Saleem Abdulrasool <abdulras@google.com>:
debugging: add support for non-glibc targets for debugging
This relaxes the ELF mem_image handling and subsequently enables the VDSO
support for non-glibc targets. The primary need for the restriction was the
use of the `__GLIBC_PREREQ` macro. If it is undefined, assume that the glibc
pre-requisite is unavailable. This allows building the debugging_internal
target on musl targets.
PiperOrigin-RevId: 398499050
--
3cc3630ef2226ae1981a944573f0f9c27a527ebf by Abseil Team <absl-team@google.com>:
Replace usages of `auto` with proper typedefs.
PiperOrigin-RevId: 398479551
GitOrigin-RevId: 1801102e11205861bc063e067e9fd4754b625c5a
Change-Id: Ib13e8612d1b263b9c1ae7f56a9f394b24c3add2e
--
336f161ad8cb2cc3e1a6bbcbbb8c5b692ee59789 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 398308807
--
80d512823d17561a45feca81f37713a91a175349 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 398257218
--
f1f9792000355eb1d0c11b17800048491662a218 by Abseil Team <absl-team@google.com>:
Fix documentation for btree_multi{map,set}::merge to match behavior for elements with equivalent keys.
PiperOrigin-RevId: 398071060
--
8a9a302aebf2419e83f0c7dc5a63c33d26b807a3 by James Y Knight <jyknight@google.com>:
Silence -Wunused-value warning newly emitted by ToT Clang.
The value is being intentionally ignored, as the purpose of the call is only to eliminate this overload via SFINAE when `GenT{}` is not constant evaluable.
PiperOrigin-RevId: 397861294
GitOrigin-RevId: 336f161ad8cb2cc3e1a6bbcbbb8c5b692ee59789
Change-Id: I946e1d22619f92ce6a424c8c13a20a50b39ed463
--
d56207f5535c3aad1624e33d20777ea6e66f51a7 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 397830482
--
7f7ff3e88e0d3cd61d63da477b2a08e61a1aeea2 by Evan Brown <ezb@google.com>:
Update implementation details comment in raw_hash_set to include information about the heap allocation's layout.
PiperOrigin-RevId: 397786239
--
fde783b12a79ae8d587d1027bc8736dff6844897 by Abseil Team <absl-team@google.com>:
Add comments on #endif to make nesting clearer
PiperOrigin-RevId: 397684219
GitOrigin-RevId: d56207f5535c3aad1624e33d20777ea6e66f51a7
Change-Id: I43dc2b5c982f1ef2b21f82b6133c49c428baf223
--
3794fe8db7a8e5a17945a8d6e198cde1db1fed7d by Chris Kennelly <ckennelly@google.com>:
Record maximum reserve or rehash argument in hashtable statistics.
This makes it possible to identify containers that are large because of reserve
calls or ones that could have an opportunity for more precise capacity sizing.
PiperOrigin-RevId: 396851064
--
c3d247c08acfd45d8e19cfd8e6e841e16e38e23d by Abseil Team <absl-team@google.com>:
Remove extra semi-colon
PiperOrigin-RevId: 396823800
GitOrigin-RevId: 3794fe8db7a8e5a17945a8d6e198cde1db1fed7d
Change-Id: I9f26407c2dc6b3dff04f6f3e249571dd8ab288c3
--
a7924266cefd1c175142545996c967fb18b6144f by Abseil Team <absl-team@google.com>:
Document the performance advantages of the `ToInt64*()` family of functions.
PiperOrigin-RevId: 396736253
--
77aa845d3aa4c56a48b899ce5a5ffcf9b81991b3 by Matt Kulukundis <kfm@google.com>:
tiny cleanup: remove redundant `public:`
PiperOrigin-RevId: 396615677
--
b837e3de0ebd99e4c4f692a80a5d7ece3e829d18 by Martijn Vels <mvels@google.com>:
Make btree growth factor identical to concat code
The btree code is using a more aggressive growth rate on Cord::Append than the Concat version. To minimize impact on migration and existing tests using empirical assumptions on growth, this change makes the btree use the same rate as Concat logic.
PiperOrigin-RevId: 396595109
--
e958c06b6ab52e389caa7b3e43d83f924367e79c by Martijn Vels <mvels@google.com>:
Change CordRepBtree::Dump to include capacity of flats
PiperOrigin-RevId: 396591195
GitOrigin-RevId: a7924266cefd1c175142545996c967fb18b6144f
Change-Id: Ia38c09ba9891364b0727509dec4776eb6aadf984
--
77e710b0ced5792a328e88bcb938a41484bf4cdc by Saleem Abdulrasool <abdulras@google.com>:
absl: add an implementation for UnscaledCycleClock on RISCV
Add an implementation for UnscaledCycleClock on RISC-V targets.
PiperOrigin-RevId: 395982312
--
84430fce6760c488ca36401cd530f44268ac710d by Martijn Vels <mvels@google.com>:
Harden CordRepBtreeReader against reading up to or beyond EOF
This change hardens the reader to Next() calls on EOF situations. It changes the 'consumed()' property inside CordRepBtreeReader into a 'remaining()' property which is easier to understand and use than the 'consumed()' property QED the function documentation and use in cord.cc
This change also adds the CharIterator test to the CordTest fixture enabling them to be run with btree cords.
PiperOrigin-RevId: 395971732
--
6557e628f2613169da8f693189223acb30e07833 by Martijn Vels <mvels@google.com>:
Add AdvanceAndRead() test addressing the edge case surfaced in b/197776822
This adds a test explicitly exercising all possible AdvanceAndRead() calls on CharIterator. As per the linked bug, a partial or full small read ending exactly at the end of the last edge of a btree cord results in an attempt to read beyond that last edge and subsequent failure. We will fix the bug and enable these tests for btree in a subsequent change.
PiperOrigin-RevId: 395958317
GitOrigin-RevId: 77e710b0ced5792a328e88bcb938a41484bf4cdc
Change-Id: Ie6e21ce36980515165af7cf046cf199ecbe0ddb0
--
6eac0cc7bca997ee95afd4ec485077ae8fd99333 by Abseil Team <absl-team@google.com>:
Add comment not to use `ABSL_ATTRIBUTE_PACKED` with `std::atomic`.
PiperOrigin-RevId: 395231460
GitOrigin-RevId: 6eac0cc7bca997ee95afd4ec485077ae8fd99333
Change-Id: Ib4e83bed0f313724b309b6278e9e24a6e5fe9b2c
--
7507caf944f8eb98e55730e60e77f9060c572788 by Derek Mauro <dmauro@google.com>:
Remove RunningOnValgrind() and ValgrindSlowdown() from dynamic_annotations.h
These are defined by some sanitizer implementations and possibly Valgrind.
Abseil decided to define them when the implementation was unavailable so
that they could be unconditionally called, but we now consider this a mistake.
Other libraries, including Python, have copied this method, leading to
multiple definitions when these libraries are used together.
In the unlikely case that code is using Abseil's definition, it
is recommended that the call be guarded instead:
```
#if __has_feature(thread_sanitizer)
extern "C" int RunningOnValgrind();
if (RunningOnValgrind()) ...
#endif
```
Fixes#1011
PiperOrigin-RevId: 394501460
GitOrigin-RevId: 7507caf944f8eb98e55730e60e77f9060c572788
Change-Id: I5ddaf9a590c857d645461352a0f6fbccbb3d5584
--
f73e17cb24f7878933fc100bd9bfc39fce190b64 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 394306402
--
3d3eeffa4e37f63aa50fec1b90858043b40fe377 by Abseil Team <absl-team@google.com>:
Release a few more absl::Cord unit tests that were accidentally omitted from the OSS release before.
PiperOrigin-RevId: 394016464
--
8a77a8eb93d021aadd8fdf43e219bf35328001ad by CJ Johnson <johnsoncj@google.com>:
Fix typo in identifier
PiperOrigin-RevId: 394000560
--
d87206c7c8e045b03d74b91e47ef3db0eb47a17b by Derek Mauro <dmauro@google.com>:
Fix typo: RandenHwAes
PiperOrigin-RevId: 393879427
--
980a3402eea77b0c77fb20dd124203002ff791ba by Derek Mauro <dmauro@google.com>:
Adds macros `ABSL_LTS_RELEASE_VERSION` and `ABSL_LTS_RELEASE_PATCH_LEVEL`
to allow projects to detect if an LTS version is being used.
Fixes#1006
PiperOrigin-RevId: 393807178
--
aecc7ed34de718c64733dab76621eacb5af9af5f by CJ Johnson <johnsoncj@google.com>:
Change `alloc` to `allocator` to match the fact that other identifiers are full words
PiperOrigin-RevId: 393794869
--
ad754bbcf7b78f5d51ed5f39193ac3159429b2b4 by Derek Mauro <dmauro@google.com>:
Remove self-include of cord_rep_btree.h
PiperOrigin-RevId: 393792085
--
f8e937a0d8fe26400560754f3596e3c21bb6d0d7 by Abseil Team <absl-team@google.com>:
Fix trivial typo in comment.
PiperOrigin-RevId: 393770527
--
7a58ca5d708038d222c6a2b6ff5076b4ceffd370 by Tomas Dzetkulic <dzetkulic@google.com>:
Update Cord::AppendArray resize policy.
PiperOrigin-RevId: 393362184
--
316050d171190d9d6312cadf88b1cc2db2d1caa7 by Abseil Team <absl-team@google.com>:
Add a new top level profiling/ directory to the Abseil library
PiperOrigin-RevId: 393358109
--
0dbb8e10f7fa4a7ac74e12b178e936a67b266c51 by CJ Johnson <johnsoncj@google.com>:
Switch to the more common enable_if pattern of ` = 0` in InlinedVector
PiperOrigin-RevId: 393301549
--
136d3068ce33b50ac820e8bd01395a7164d5181f by Abseil Team <absl-team@google.com>:
Clean up typedefs in internal/inlined_vector.h
PiperOrigin-RevId: 393181754
GitOrigin-RevId: f73e17cb24f7878933fc100bd9bfc39fce190b64
Change-Id: I0c4cd4d71d97bd1bf651701b6302ea3d9ac59b66
--
e1c30aa6d6bb25987916d3ec39245c6d4a2a93ea by Derek Mauro <dmauro@google.com>:
Only build the non-stub implementation of RandenHwAes when
accelerated AES can be detected by compiler-set flags.
This removes the case where the full RandenHwAes is built when
only ABSL_RANDOM_INTERNAL_AES_DISPATCH is true.
This also removes the case where ARM crypto is enabled through
the crypto directive. This directive doesn't appear to reliably
work when used with arm_neon.h. As far as I can tell, the crypto
directive is only meant to work with crypto instructions in
handwritten asm. For this to work with arm_neon.h, it appears
several hacks are needed, including overriding some compiler-set
defines.
PiperOrigin-RevId: 392948948
GitOrigin-RevId: e1c30aa6d6bb25987916d3ec39245c6d4a2a93ea
Change-Id: Ie97e26f0204c8a86f72d2f38a59181f1ef578418
--
5d05c54a619a969da5b4b7f66a2af2d969dc7920 by Abseil Team <absl-team@google.com>:
Save not needed copies of the predicate in raw_hash_set's EraseIf.
PiperOrigin-RevId: 392706073
--
61ee9b808cd3c81dd10a600c8de5428d6a43cfeb by Abseil Team <absl-team@google.com>:
Save unnecessary copies of the iterator in raw_hash_set's EraseIf.
PiperOrigin-RevId: 392668288
GitOrigin-RevId: 5d05c54a619a969da5b4b7f66a2af2d969dc7920
Change-Id: I180dab2706841ce56f27cf6eabdad1106ebdcf73
--
82011e44e917fb70fa00078f0bad7f787580bd8e by Abseil Team <absl-team@google.com>:
Add lifetime annotations to status methods that return references.
PiperOrigin-RevId: 391907063
GitOrigin-RevId: 82011e44e917fb70fa00078f0bad7f787580bd8e
Change-Id: Icb2cafbf5eb1201b3bdb56a17263073e22b642e7
--
04cb3b22497190170aa5b774e98080c5de2ba60b by Abseil Team <absl-team@google.com>:
Alternative bit mixer for LowLevelHash on ARM
LowLevelHash's bit-mixer is inefficient on ARM because it calculates a 128-bit product of two 64-bit numbers. On ARM, this requires a sequence of two instructions with a high combined latency and poor throughput. This change provides alternative bit-mixing code for ARM that uses only 64-bit arithmetic (multiplication, xor, and left-shifts) and speeds things up considerably.
The bit-mixing code for ARM was inspired by by Woothash[1] and xxh3[1]. Once I landed on a sequence of operations that provided good mixing, I used a test harness to search for the combination of shift / rotate factors that provided the best mixing, as indicated by SMHasher hash quality tests. The new mixing code passes 13 out of 15 of the hash quality test suites in SMHasher, with the two failures being in the noise range: e.g. 1 collision vs. zero expected in a keyset of ~8m keys.
[1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20
[2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265
PiperOrigin-RevId: 391833008
--
17a4de1f9d623155c75b19285d414cd55a487cd6 by Saleem Abdulrasool <abdulras@google.com>:
debugging: add support for unwinding on RISCV Linux
This adds partial support for unwinding the RISCV call stack. It is largely
duplicated from the AArch64 support with alterations for the ELF RISCV psABI.
This covers RISCV64 and RISCV32, though not the ILP32E calling convention.
PiperOrigin-RevId: 391818522
--
32c93e449327b2cea32b32f6365e84b420fe1ed3 by Gennadiy Rozental <rogeeff@google.com>:
New storage for types smaller than 8 bytes.
Also adding new read interface for types smaller than or rqual to 8 bytes to avoid passing the pointer.
PiperOrigin-RevId: 391726822
--
e987ac08a7787801cbfc7d7c96649e97fa8cff1a by Abseil Team <absl-team@google.com>:
Extern template `find_first_non_full` to reduce linkage size for TU with single not inlined function.
PiperOrigin-RevId: 391718862
--
73af9bfcb5bf045089133e18bbd20eb5bb699172 by Gennadiy Rozental <rogeeff@google.com>:
Make most non-mutable most int128 methods and friend free functions constexpr.
Some functions are implemented offline (at least in some configurations) and can't be made constexpr. Mutable methods can't be made constexpr until we drop c++11 support.
Fixes#978
PiperOrigin-RevId: 391706535
GitOrigin-RevId: 04cb3b22497190170aa5b774e98080c5de2ba60b
Change-Id: If051fad5ff004e2e82fa53618fc04a6fe3d2d4be
--
84bcdcd9497d1ec989f50c8dee93f656507c7bd6 by Abseil Team <absl-team@google.com>:
Reduce length of the `flat_hash_map<std::string, V>` type name in order to reduce binary bloat.
PiperOrigin-RevId: 391560997
--
5f49bd435e066989851dc045c7786ef400413f66 by Greg Falcon <gfalcon@google.com>:
Claim a bit from the Cord refcount for future use.
Also rename the increasingly-inaccurately named "Refcount" class to "RefcountAndFlags".
In optimized builds, this adds an extra mask instruction to decrement and test operations, but no new branches. Future flags can be added at no extra cost. Each additional flag will of course reduce the range of our refcount, but even with the bit added, we still support refcounts of 500 million.
PiperOrigin-RevId: 391557567
GitOrigin-RevId: 84bcdcd9497d1ec989f50c8dee93f656507c7bd6
Change-Id: I051823bf5a9a42d4fa9200e39563ab585ecab331
--
3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb by Derek Mauro <dmauro@google.com>:
Use the Bazel @platforms repository for platform constraints
Fixes#1000
PiperOrigin-RevId: 390644226
--
b34e4d2f8a86b54bd483ec4c9c3dd781ad2d8b68 by Abseil Team <absl-team@google.com>:
debugging: add some handling for RISC-V
The RISC-V architecture uses a downward growing stack and can host Linux using
ELF files. Adjust a few sites accordingly to indicate how to handle the RISC-V
architecture.
PiperOrigin-RevId: 390631894
--
5fa3a0961bf3dd0799c048956a0128f7b8113f1e by Samuel Benzaquen <sbenza@google.com>:
Rename the buffer hash function to LowLevelHash.
Although it started as wyhash, it will depart from it so it does not make sense
to keep the name.
PiperOrigin-RevId: 390483506
--
2e7867a2301d58ad4cd5abcaa5fd6f0db973ae7b by Abseil Team <absl-team@google.com>:
This is an internal change.
PiperOrigin-RevId: 390349746
GitOrigin-RevId: 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb
Change-Id: I322c3762552a2107e6c6b108c25c01e5efa8aecd
--
667d6502169b645de44d5aa79ff7524c329ef136 by Abseil Team <absl-team@google.com>:
Improve the error messages for absl::Substitute to clarify that an unescaped $ symbol is an error.
The existing functionality enforces that unescaped $ results in a compile-time error. However, the current error messages do not mention this case and make it easier to miss while looking for an incorrect numerical substitution argument.
PiperOrigin-RevId: 390242485
GitOrigin-RevId: 667d6502169b645de44d5aa79ff7524c329ef136
Change-Id: Iad1f1c18ab9686be11d40772e3d51dd233cfc9bc
--
228b5878d7a994656f383666cfaee34e33e0b09b by Abseil Team <absl-team@google.com>:
Add element_type typedef to match std::span<T>
PiperOrigin-RevId: 390186160
--
c91d96c88c60be793c525158f76dfcaa5e32d161 by Abseil Team <absl-team@google.com>:
Rollback change to only hide retired flags if human-readable output
is requested
PiperOrigin-RevId: 390183146
--
170192c10ef8d513de80f29298ce93eeccc3712c by Abseil Team <absl-team@google.com>:
Move alignas(16) before ABSL_CONST_INIT and ABSL_DLL.
PiperOrigin-RevId: 390182845
--
77a5ee5081c81cef625fac7bbcf993cc028b32ed by Evan Brown <ezb@google.com>:
Use simple SlotOffset and AllocSize logic instead of container_internal::Layout in order to save linker input size for non-opt and sanitizer builds.
In opt mode, all of this logic is inlined so we don't save linker input size in opt mode.
PiperOrigin-RevId: 389914594
GitOrigin-RevId: 228b5878d7a994656f383666cfaee34e33e0b09b
Change-Id: I3b904068687574931d8390071b322c0c3c083283
--
77cd6291781bc39e8472c706163d6951fe2ae573 by Derek Mauro <dmauro@google.com>:
absl::uint128: Use intrinsics for more operations when available
This change also inlines the division and modulus operators when
intrinsics are available for better code generation.
Fixes#987
PiperOrigin-RevId: 389895706
--
fa23339584599e07ebcb4d0a857e2553b017757c by Abseil Team <absl-team@google.com>:
only hide retired flags if human-readable output is requested
PiperOrigin-RevId: 389835452
--
f1111f2b88359d4b253d4d81681c8a488458a36e by Martijn Vels <mvels@google.com>:
Add helpers IsFlat(), IsExternal(), etc to improve readability
PiperOrigin-RevId: 389779333
--
785b8712261e41695ebeeb64b4317f93b37adc11 by Martijn Vels <mvels@google.com>:
Split off 'concat' and 'btree' RepMemoryUsageLeaf and RepMemoryUsageDataEdge
PiperOrigin-RevId: 389701120
--
5264bffebffc2b377bf7e18f0ce69a3ed38c6629 by CJ Johnson <johnsoncj@google.com>:
Eagerly destroy `Callback` in `absl::Cleanup`
PiperOrigin-RevId: 389678813
--
a05312f0668458e97c50ca932c8f974c1508ebf2 by Abseil Team <absl-team@google.com>:
Have one instance of empty_group per program, rather than one per translation unit.
https://stackoverflow.com/questions/185624/static-variables-in-an-inlined-function
PiperOrigin-RevId: 389185845
GitOrigin-RevId: 77cd6291781bc39e8472c706163d6951fe2ae573
Change-Id: Iac8d9cb27707a9562c831c77a552d1fb4bb0405f