--
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
--
93c607726d663800b4bfa472cba043fd3f5d0e97 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 389158822
--
55b3bb50bbc168567c6ba25d07df2c2c39e864af by Martijn Vels <mvels@google.com>:
Change CordRepRing alternative implementation to CordRepBtree alternative.
This changes makes CordRepBtree (BTREE) the alternative to CordRepConcat (CONCAT) trees, enabled through the internal / experimental 'cord_btree_enabled' latch.
PiperOrigin-RevId: 389030571
--
d6fc346143606c096bca8eb5029e4c429ac6e305 by Todd Lipcon <tlipcon@google.com>:
Fix a small typo in SequenceLock doc comment
PiperOrigin-RevId: 388972936
--
e46f9245dce8b4150e3ca2664e0cf42b75f90a83 by Martijn Vels <mvels@google.com>:
Add 'shallow' validation mode to CordRepBtree which will be the default for internal assertions.
PiperOrigin-RevId: 388753606
--
b5e74f163b490beb006f848ace67bb650433fe13 by Martijn Vels <mvels@google.com>:
Add btree statistics to CordzInfo, and reduce rounding errors
PiperOrigin-RevId: 388715878
--
105bcbf80de649937e693b29b18220f9e6841a51 by Evan Brown <ezb@google.com>:
Skip length checking when constructing absl::string_view from `const char*`.
The length check causes unnecessary code bloat.
PiperOrigin-RevId: 388271741
--
bed595158f24839efe49c65ae483f797d79fe0ae by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 387713428
GitOrigin-RevId: 93c607726d663800b4bfa472cba043fd3f5d0e97
Change-Id: I2a4840f5ffcd7f70b7d7d45cce66f23c42cf565f
* GenerateRealFromBits: sign is already set
If std::is_same<SignedTag, GeneratePositiveTag>::value then sign is
already set to zero thanks to:
uint_type sign = std::is_same<SignedTag, GenerateNegativeTag>::value
? (static_cast<uint_type>(1) << (kUintBits - 1))
: 0; // <- here
So the conditional is unnecessary.
* Update generate_real.h
Remove extra parenthesis
Co-authored-by: Derek Mauro <761129+derekmauro@users.noreply.github.com>
See https://github.com/abseil/abseil-cpp/issues/259 for context.
This change introduces the ABSL_PROPAGATE_CXX_STD option (default to OFF for now, though it prints a warning in CMake 2.8+ builds that a future Abseil release will default to ON). When enabled, all Abseil CMake targets will set the cxx_std_11 target meta feature (which will then propagate to targets that depend upon Abseil) rather than setting the target-level CXX_STANDARD property to CMAKE_CXX_STANDARD (which is the default value anyway), which doesn't propagate.
Updates README documentation to clarify behavior and with a different example recommendation for library projects (which should generally leave CMAKE_CXX_STANDARD to the root application project).
See https://crascit.com/2015/03/28/enabling-cxx11-in-cmake/ for a useful overview of these different CMake features surrounding C++ standard version configuration.
--
e1a0989213908927f05002ab7697955ad7dc5632 by Martijn Vels <mvels@google.com>:
Introduce CordRepBtreeReader
CordRepBtreeReader provides forward navigation on cord btrees with absolute positional (offset) context, iterating over btree data in absl::string_view chunks.
PiperOrigin-RevId: 387585161
--
206d298e2bccb998731995cb05717b31fa9d90ec by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 387577465
--
f07fafe8a400a4f5dfef186d1a3b61fb7f709fe5 by Abseil Team <absl-team@google.com>:
This change adds debug-build enforcement that the inputs to
absl::c_set_intersection are sorted, which is a prerequisite of
std::set_intersection and required for correct operation of the
algorithm.
PiperOrigin-RevId: 387446657
--
2ca15c6361bb758be7fb88cae82bf8489b4d3364 by Abseil Team <absl-team@google.com>:
Change BadStatusOrAccess::what() to contain status_.ToString()
This ensures that on uncaught exception propagation that would cause program termination, the message contains information on the error which caused the failure.
Lazy initialization of what_ is a value judgement: if most callers are expected to call status() not what(), lazy initialization is correct. If most callers are expected to call what(), it should be initialized on construction to avoid atomic operation overhead.
PiperOrigin-RevId: 387402243
--
3e855084e104dc972a0c4385395e6d8e8465127f by Gennadiy Rozental <rogeeff@google.com>:
LSC: Standardize access to GoogleTest flags on GTEST_FLAG_GET/GTEST_FLAG_SET
This change is necessary to move Googletest flags out of the testing:: namespace without breaking code. These new macros will continue to be required for code that needs to work both inside Google's monorepo and outside in OSS, but can be used anywhere inside the monorepo.
PiperOrigin-RevId: 387396025
--
1ccf5895a15059ef689af5c4817d7b84f73190be by Gennadiy Rozental <rogeeff@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 387388496
GitOrigin-RevId: e1a0989213908927f05002ab7697955ad7dc5632
Change-Id: I3606d9ce29d909a3555e662e9df564202cf5068d
--
69b5d0b2a5adb49a53e51f9da6848eaa484242fe by Derek Mauro <dmauro@google.com>:
Changes the absl::Duration factory functions to disallow types that
are convertible to int or double, instead requiring that the argument
itself is indeed an integer or a floating-point number. This will
prevent callers from passing arguments, such as std::atomic<T>.
This change is an API break. Information and a tool to fix issues
can be found at
https://abseil.io/docs/cpp/tools/upgrades/duration-conversions
PiperOrigin-RevId: 387153494
--
786063e438ab6a55ac4baa88ad4d20a8293be52a by Evan Brown <ezb@google.com>:
Make ctrl_t be an enum class.
This adds type safety, and also when strict aliasing is enabled, the compiler will know that control bytes can't alias non-control bytes.
Also make H2() return h2_t.
PiperOrigin-RevId: 387120717
--
7e537aabec1c255d6e7c9d21232c597c1c2077bf by Evan Brown <ezb@google.com>:
Add some missing `const` keywords to ctrl_t* function parameters.
PiperOrigin-RevId: 386976062
--
da53ac6d91cabd951e81dd0a145e1e52b918955f by Martijn Vels <mvels@google.com>:
Change Seek and InitOffset to return nullptr instead of assert / fail.
This makes it consistent with the rest of the API (Next, Previous, Skip) and hardens it against invariants that are harder (or less likey) to be upheld correctly by the caller.
PiperOrigin-RevId: 386963283
--
a4d1faac020d5025edf53ce81808e5db68da7d89 by Abseil Team <absl-team@google.com>:
PC / Backtrace / Symbolization for Emscripten.
PiperOrigin-RevId: 386957724
--
97f2c47d83ba9d3ac89e1f55bd06897686ffd063 by Martijn Vels <mvels@google.com>:
Fix static casts ([-Wimplicit-int-conversion])
PiperOrigin-RevId: 386951646
--
9530c795248543817cbc4013953baa09c35f5e1a by Abseil Team <absl-team@google.com>:
Fix incorrect header guard in cord_rep_btree_navigator.h
PiperOrigin-RevId: 386907904
--
90ce5872406df2b7f4c428683741dc13a572267e by Abseil Team <absl-team@google.com>:
Small grammar fixes for some StatusCode descriptions.
PiperOrigin-RevId: 386906217
--
b30a2fd777f12a04a4d512f37a34614b0d05ce99 by Derek Mauro <dmauro@google.com>:
Skip length checking when constructing absl::string_view from std::string.
The length check causes unnecessary code bloat.
PiperOrigin-RevId: 386857974
--
fa171536c359bfa2a1b80297e844519bb9ee7791 by Martijn Vels <mvels@google.com>:
Introduce CordRepBtreeNavigator
CordRepBtreeNavigator implements bi-directional navigation over all data edges stored inside a Cord Btree.
PiperOrigin-RevId: 386519102
GitOrigin-RevId: 69b5d0b2a5adb49a53e51f9da6848eaa484242fe
Change-Id: I1b35188d66133f8cb73d346bc5564aac4e0b3e80
--
50f4b71699a116d95b72e8cc4c0a98433fac51a0 by Evan Brown <ezb@google.com>:
Split reset_ctrl and set_ctrl out of raw_hash_set to avoid redundant memory accesses.
In the previous member functions, the compiler has to assume that `ctrl_` can alias `this` so it has to reload the other member variables unnecessarily.
Note: I tried adding __restrict__ to the ctrl arguments in the new functions, but it didn't result in further binary changes.
PiperOrigin-RevId: 386074009
--
47dfd737cc484492f9af9452e3a49adf81fe2ad2 by Abseil Team <absl-team@google.com>:
rehash_and_grow_if_necessary in-place more aggressively.
It previously resized too eagerly, resulting in low load factors.
PiperOrigin-RevId: 386008094
--
05321b4841ffe685813897a1ec86abc8fdf54093 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 385810140
GitOrigin-RevId: 50f4b71699a116d95b72e8cc4c0a98433fac51a0
Change-Id: I9c9571564adc1f9ccfa9b29d3aac238389397d1b
--
c3b926ea986eea9d416ef57ee67a1041b70257fd by Martijn Vels <mvels@google.com>:
Remove internal absl_internal_cordz_disabled check.
PiperOrigin-RevId: 384225993
--
2863c56ad5c86dd9c207a796e65d5bc968f77755 by Benjamin Barenblat <bbaren@google.com>:
Make randen_slow endian-correct
Pay attention to the platform endianness when pulling bytes out of each
AES block, and use platform-endian round keys.
PiperOrigin-RevId: 383878281
GitOrigin-RevId: c3b926ea986eea9d416ef57ee67a1041b70257fd
Change-Id: I0d48f4fd560b3e320260ef05790727756ffead02
--
007ce045d5d38a727ededdb5bf06e64785fd73bd by Martijn Vels <mvels@google.com>:
Add `cord_enable_btree` feature flag (default false).
PiperOrigin-RevId: 383729939
--
98e7dc6a0407b0fd7b8713d883cdb3a766e0583d by Benjamin Barenblat <bbaren@google.com>:
Eliminate some byte swapping from randen_slow
Stop swapping bytes when serializing randen_slow’s Vector128 into and
out of memory. Instead, simply index different bytes in the AES round
function. This requires byte swapping the te{0..3} lookup tables, but it
produces an 8% speedup on my Xeon W-2135.
PiperOrigin-RevId: 383689402
--
180b6bf45049188840d439b16a28e6b968669340 by Evan Brown <ezb@google.com>:
Minor simplification in drop_deletes_without_resize() - save probe_offset outside the lambda.
Also, add some consts, avoid an auto, and use lambda capture by value instead of reference.
I realized that the compiler can already optimize this - https://godbolt.org/z/Wxd9c4TfK, but I think this way makes the code a bit clearer.
PiperOrigin-RevId: 383646658
--
781706a974c4dc1c0abbb6b801fca0550229e883 by Martijn Vels <mvels@google.com>:
Change storage to contain 3 bytes.
As per the comments in the code, this allows us to utilize all available space in CordRep that may otherwise be 'lost' in padding in derived clases. For the upcoming CordrepBtree class, we want a strong guarantee on having a 64 bytes aligned implementation.
PiperOrigin-RevId: 383633963
--
8fe22ecf92492fa6649938a2215934ebfe01c714 by Derek Mauro <dmauro@google.com>:
Remove reference to str_format_arg.h, which no longer exists
PiperOrigin-RevId: 383517865
--
79397f3b18f18c1e2d7aea993b687329d626ce64 by Benjamin Barenblat <bbaren@google.com>:
Use absl::uint128 for AES random number generator
Replace randen’s internal 128-bit integer struct, u64x2, with
absl::uint128. This eliminates some code and improves support for
big-endian platforms.
PiperOrigin-RevId: 383475671
GitOrigin-RevId: 007ce045d5d38a727ededdb5bf06e64785fd73bd
Change-Id: Ia9d9c40de557221f1744fb0d6d4d6ca7ac569070
--
1620e8ffaa93ef24510ca60c7fff2a07248ac9f6 by Abseil Team <absl-team@google.com>:
Update comment.
PiperOrigin-RevId: 382858259
--
20db116f28469149d10e0f7f8b976cb903dd4879 by Gennadiy Rozental <rogeeff@google.com>:
Add benchmark running on multiple flags.
Update size_tester to include cost of absl::GetFlag call.
Add size_tester invocation for bool flag.
New benchmark better represent GetFlag usage.
PiperOrigin-RevId: 382820341
--
2e097ad3811c4e329f75b98877a5e74c1d3d84fd by Abseil Team <absl-team@google.com>:
Avoid 64x64->128 multiplication in absl::Hash's mix on AArch64
On AArch64, calculating a 128-bit product is inefficient, because it requires a sequence of two instructions to calculate the upper and lower halves of the result. So calculate a 64-bit product instead.
Making MultType 64-bits means the upper 32 bits of the result do not participate in shift/xor, but the add/multiply gives us sufficient mixing.
PiperOrigin-RevId: 382625931
--
f3ae3f32cb53168c8dc91b766f2932dc87cec503 by Abseil Team <absl-team@google.com>:
Remove homegrown Round implementation
absl/time/duration.cc defined a Round implementation to accommodate old
versions of MSVC that lacked std::round(long double). Abseil no longer
supports those MSVCs, so we don’t need the homegrown implementation
anymore. Remove it, and replace calls to it with std::rint.
PiperOrigin-RevId: 382605191
--
a13631c91bf5478289e1a512ce215c85501a26f7 by Martijn Vels <mvels@google.com>:
Move the Consume() conversion functions out of cord_rep_ring into cord_rep_consume.
This makes these functions generic, so we can repurpose these for the new Btree conversion functions.
PiperOrigin-RevId: 382594902
--
7394c737500c2d8371fcf913b21ad1b321ba499d by Benjamin Barenblat <bbaren@google.com>:
Remove homegrown Round implementation
absl/time/duration.cc defined a Round implementation to accommodate old
versions of MSVC that lacked std::round(long double). Abseil no longer
supports those MSVCs, so we don’t need the homegrown implementation
anymore. Remove it, and replace calls to it with std::rint.
PiperOrigin-RevId: 382569900
--
d72a761f43dc5c9b9510c3a1363177ed26646b5d by Abseil Team <absl-team@google.com>:
Prefer `getentropy` for Emscripten.
It needs a different header, so I've separated it out from the GLIBC
check above.
PiperOrigin-RevId: 382332475
--
74e261dbb467741b2ddd8b490e04c531fdd2f559 by Martijn Vels <mvels@google.com>:
Add BTREE tag for CordRepNode implementing a Btree cord.
This change only forward declared the CordRepBtree class (not implemented yet) and defines the enum value BTREE. While RING and BTREE should never co-exist, we define a new value for BTREE so as not to make transitioning between RING and BTREE harder than it needs to be. This changes shifts the FLAT value / computation from FLAT = 4 to FLAT =5
PiperOrigin-RevId: 382326710
GitOrigin-RevId: 1620e8ffaa93ef24510ca60c7fff2a07248ac9f6
Change-Id: Ia8f99dde3874808f56062bd37ab3e63764099734
--
373171b46238585c818cec37af26959f5412f813 by Abseil Team <absl-team@google.com>:
Build with -Wl,-no-undefined.
PiperOrigin-RevId: 381276748
--
da32624792d2948fe83d0ce58794d505799ab5d0 by Benjamin Barenblat <bbaren@google.com>:
s/round/rint/ in exponential_biased
`rint` differs from `round` in that it uses the current FPU rounding
mode. It’s thus potentially faster, since it doesn’t have to save and
restore FPU state. It also is more reflective of developer intent –
most developers expect all FPU operations to use the current rounding
mode, and having exponential_biased follow that rule seems ideal.
PiperOrigin-RevId: 381268264
--
8f860253a4283d2cc8230fe98d7cdf7bcb3e05f1 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 381264180
GitOrigin-RevId: 373171b46238585c818cec37af26959f5412f813
Change-Id: Iefe60b15c80318a7707e0c32159ac004bfa26d72
--
2684e80d877b688b8d9e0af1b7acddbadc973152 by Evan Brown <ezb@google.com>:
Add an insert codegen function for raw_hash_set_benchmark.
PiperOrigin-RevId: 381052237
--
8394ef3071714a41484cb5b271cba0611d954a7a by Abseil Team <absl-team@google.com>:
Optimize raw_hash_set ctor for random-access iterators
PiperOrigin-RevId: 380832215
GitOrigin-RevId: 2684e80d877b688b8d9e0af1b7acddbadc973152
Change-Id: Icf7929fdfab50a1b26f3dc5505575363b4f5838d
--
f6d1ddef9a38e3fb8492181bf1a7a006b7f2145d by Abseil Team <absl-team@google.com>:
Update the implementation of `operator<<` in Status to use `ToString(StatusToStringMode::kWithEverything)`
PiperOrigin-RevId: 380740880
--
5f13b20c4b85c1c6e94b69c74f80f8f3f3941747 by Derek Mauro <dmauro@google.com>:
Update Docker images
This also disables the Clang/libstdc++/C++20 combo as it seems that
the latest libstdc++ is relying on C++20 Concepts to a greater extent
than Clang supports.
PiperOrigin-RevId: 380714572
--
f8f4dee12cfd02559bf741ad6b06f10ac0c48c73 by Abseil Team <absl-team@google.com>:
Fix shadow member warnings in randen_hwaes.cc
These happen when attempting to use abseil in github.com/google/benchmark. The project sets -Wshadow.
The warning is due to the name of the Vector128 ctor parameter. Using v instead, which I see used elsewhere (e.g. line 290)
PiperOrigin-RevId: 380704197
--
2e1a09e9cb1239485715acb4828d9b4799fcfbb5 by Tom Manshreck <shreck@google.com>:
Add more precise documentation for AbslParseFlag declarations in the Time API
PiperOrigin-RevId: 380649107
--
153e5f7a960c03e4161c03737a0ff18ba377ff73 by Evan Brown <ezb@google.com>:
Make the number of control bytes a constant.
We use a constexpr function because we need to support C++11, which doesn't have inline variables.
The motivation is to avoid future bugs where the number changes and we forget to update all the places it's used.
This CL should be a no-op.
PiperOrigin-RevId: 380253975
GitOrigin-RevId: f6d1ddef9a38e3fb8492181bf1a7a006b7f2145d
Change-Id: Id584138f898bf3ebef95fabcf48e41098c4db954
--
b1fc72630aaa81c8395c3b22ba267d938fe29a2e by Derek Mauro <dmauro@google.com>:
Fix -Wdeprecated-copy warnings from Clang 13.
Example:
error: definition of implicit copy assignment operator for 'UDT' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
PiperOrigin-RevId: 380058303
--
0422744812b1a2010d9eea5b17fbe89f3441b66b by Evan Brown <ezb@google.com>:
Change the "full table!" asserts in raw_hash_set to use `<= capacity` instead of `< capacity`.
If we add support for non-power-of-two-minus-one capacities, this is the correct thing to assert. For example, consider: Group::kWidth = 8, capacity_ = 8, ctrl_ = {kEmpty, 1, 2, 3, 4, 5, 6, 7, kSentinel, kEmpty, 1, 2, 3, 4, 5, 6}. In this case, if we do an unsuccessful lookup with H2 mapping to slot 1, then the first Group will contain {1, 2, 3, 4, 5, 6, 7, kSentinel} so we need to continue to the second Group (at which point seq.index() == 8 == capacity_) to find a kEmpty.
Note: this is a no-op change for now since we never have `capacity % Group::kWidth == 0`.
PiperOrigin-RevId: 380033480
--
40628c34d540356de65fabb16c1439c0ec7a0764 by Abseil Team <absl-team@google.com>:
Drop out-of-date documentation about `absl::FixedArray`'s allocator support
PiperOrigin-RevId: 379811653
--
e7ad047863ae55c9b7aec0753cfc527a4ea614bc by Evan Brown <ezb@google.com>:
Fix a bug in ConvertDeletedToEmptyAndFullToDeleted in which we were copying 1 more cloned control byte than actually exists.
When alignof(slot_type)>1, this wouldn't cause a problem because the extra byte is padding.
Also change loop bounds to not rely on the fact that capacity_+1 is a multiple of Group::kWidth.
PiperOrigin-RevId: 379311830
--
1a3ba500fb2c33205854eb9258cd6e0fb1061bca by Martijn Vels <mvels@google.com>:
Change Ring, EXTERNAL and FLAT tag values to be consecutive values
The purpose of this change is to have FLAT = EXTERNAL + 1. Especially in the ring and btree alternative code, there is a common check if a node is a 'plain' edge (EXTERNAL or FLAT), or 'something else'. This change can make that check a single branch, i.e., instead of 'tag == EXTERNAL || tag >= FLAT', we can simply check for 'tag >= EXTERNAL'. Likewise we have some cases where we check for RING, EXTERNAL or FLAT, so we align RING + 1 with EXTERNAL.
PiperOrigin-RevId: 379291576
--
0c78e65ca4d85244b106c3f8e24cf268e09e72a3 by Benjamin Barenblat <bbaren@google.com>:
Round a double multiplication before casting it to integer
The code
static_cast<int>(x * y)
(for double x and y) performs a double multiplication into a temporary
that, by standard, may have excess precision. The subsequent cast to int
discards the excess precision. However, the cast may examine the excess
precision during conversion, producing surprising results like
static_cast<int>(1.7 * 10) == 16
on certain systems. Correct this case by explicitly rounding 1.7 * 10
before casting it.
PiperOrigin-RevId: 378922064
GitOrigin-RevId: b1fc72630aaa81c8395c3b22ba267d938fe29a2e
Change-Id: Ica708a006921118673e78d5fd2d61fe0fb0894d1
--
ca5ce10fa5286f2bfb51890a37b547308b8d6d93 by Benjamin Barenblat <bbaren@google.com>:
Skip floating-point edge-case tests when using an x87
32-bit Intel CPUs use 80-bit floats for intermediate values, which can
change the results of floating point computations from what we normally
expect. Identify tests that are sensitive to the x87, and skip them when
we’re on 32-bit Intel.
PiperOrigin-RevId: 378722613
--
e5798bb017854e7f3b6d8721fed7dd553642b83d by Abseil Team <absl-team@google.com>:
Build without -Wl,-no-undefined.
PiperOrigin-RevId: 378690619
--
3587685a2c932405e401546ec383abcfbf8495c8 by Derek Mauro <dmauro@google.com>:
Update CCTZ BUILD file.
PiperOrigin-RevId: 378688996
--
06c7841b2bf8851410b716823b7ff9b42d86085e by Derek Mauro <dmauro@google.com>:
Change the CMake install test to use installed version of GoogleTest
PiperOrigin-RevId: 378537383
--
eaa8122a7062c56bed80e806344cca0c8325bf6f by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 378525523
--
381f505cce894b8eec031a541855650c4aa46e64 by Abseil Team <absl-team@google.com>:
Mark btree_container::clear() with the ABSL_ATTRIBUTE_REINITIALIZES attribute.
This prevents false positives in the clang-tidy check bugprone-use-after-move;
it allows clear() to be called on a moved-from btree_container without any
warnings, and the btree_container will thereafter be regarded as initialized again.
PiperOrigin-RevId: 378472690
GitOrigin-RevId: ca5ce10fa5286f2bfb51890a37b547308b8d6d93
Change-Id: I4267246f418538c5baacb562d1a40213fb13f246
As of this change, you can use `-DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON` to have Abseil use the standard CMake find_package(GTest) mechanism.
--
72ce5b636488f17753d110ec18f57132d6180db3 by Derek Mauro <dmauro@google.com>:
Update GoogleTest version used by Abseil
PiperOrigin-RevId: 378296419
--
1eaa36f65315a1cb95c95dfee0bc31307d280d18 by Abseil Team <absl-team@google.com>:
Define unary + operators for absl::int128 and absl::uint128.
These are rarely used but apparently missing.
PiperOrigin-RevId: 377975179
--
1a029d6ff8f9e21ddf0b89949be04c0a56661359 by Abseil Team <absl-team@google.com>:
Remove gratuitous reinterpret_cast.
PiperOrigin-RevId: 377894806
GitOrigin-RevId: 72ce5b636488f17753d110ec18f57132d6180db3
Change-Id: I8a06f69b3489c9aef8260fd271bde2a55f01807f
--
066144400e12616f6771e512427bcd98aa203455 by Abseil Team <absl-team@google.com>:
Internal comment cleanup.
PiperOrigin-RevId: 377368470
--
3ba56d263bd90a9797d12b5ce29edce3fa65917c by Abseil Team <absl-team@google.com>:
Add tests for hash table capacity being unchanged by insert.
PiperOrigin-RevId: 377303140
GitOrigin-RevId: 066144400e12616f6771e512427bcd98aa203455
Change-Id: I2edf14b412e45a2ad490dcf9f06e009c12a60e3e
--
b2a781121ff72fb485b7e67539d5e4ff1eb66df2 by Gennadiy Rozental <rogeeff@google.com>:
Consistently use absl::flat_hash_map instead of std::map in Flags implementation.
PiperOrigin-RevId: 377132816
--
9ab83a154d8f22d51fed0092bf94245b5af1f498 by Derek Mauro <dmauro@google.com>:
Workaround for MSAN being unable to see through getentropy().
https://github.com/google/sanitizers/issues/1173
PiperOrigin-RevId: 377097059
--
8d28e921442d1b246c26f3200f21027557c47657 by Greg Falcon <gfalcon@google.com>:
Disable stack_consumption_test in tsan builds.
A recent tsan change broke the way this test-only utility was counting stack usage.
PiperOrigin-RevId: 377053169
GitOrigin-RevId: b2a781121ff72fb485b7e67539d5e4ff1eb66df2
Change-Id: Ib56356f8128f6c083f32b950091f3a56d9e2cd51
--
2c81c02d2b68303134e777f31921679ab87a2639 by Derek Mauro <dmauro@google.com>:
Use getentropy() to get seed material when using glibc >= 2.25
getentropy() uses the getrandom syscall on Linux to avoid file descriptors.
It is never interputed (EINTR) and uses the same source as /dev/urandom.
https://man7.org/linux/man-pages/man3/getentropy.3.html
getrandom has been in the Linux since kernel 3.17
When unavailable (ENOSYS), fallback to /dev/urandom.
PiperOrigin-RevId: 376962620
--
81cd41372a04eda400a2e3be53c239c0dac6bdf3 by Abseil Team <absl-team@google.com>:
Make FunctionRef no longer have -Wdeprecated-copy warnings from Clang by
defaulting the copy constructor. This is needed because the assignment
operator is deleted.
Fixes#948
PiperOrigin-RevId: 376928548
GitOrigin-RevId: 2c81c02d2b68303134e777f31921679ab87a2639
Change-Id: I0abb18052ffff5dd1448f0b68edbb668045335f0
--
cbd86b318ce206d1fe9eb001979b8d2efe57e5fa by Derek Mauro <dmauro@google.com>:
Stop inlining `CurrentThreadIdentityIfPresent()` on Apple platforms
In some build configurations the Apple linker rejects thread_local
variables exposed in headers
Fixes#954Fixes#965
PiperOrigin-RevId: 375930997
GitOrigin-RevId: e34600e09f748b686d20a4f729ae914ebfd9e7bf
Change-Id: I9fcd2f02bd6abdea3ed412217e1be18f2c7bf762
--
d74f30ef0da7139c30a24eb6c1776bc0c257e642 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 375779441
--
25e33cde30d78dbafcb81ee3ce77c3d70c74db5a by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 375520720
--
46857d17d4dbc6fbd13a27dd82e14ec814dd117a by Samuel Benzaquen <sbenza@google.com>:
Add an explicit template parameter barrier to absl::HashOf.
PiperOrigin-RevId: 375103300
--
cf2bf52b9a425b0360ed1f46778f0ef1326a3658 by Abseil Team <absl-team@google.com>:
Improve string_view API compliance with C++17 std::basic_string_view.
This adds missing overloads, default values, and constexpr specifiers.
PiperOrigin-RevId: 374885658
--
41e55166dc5bd3ed7bce567c400781585d55e1ce by Derek Mauro <dmauro@google.com>:
Update CI to GCC 11.1, Bazel 4.0.0, CMake 3.20.2, and
LLVM git:7bcc0a1e399d461af7ec013ff33bc330a2de6641
PiperOrigin-RevId: 374858288
GitOrigin-RevId: d74f30ef0da7139c30a24eb6c1776bc0c257e642
Change-Id: I657c815c83522b030495ff54ca327e7012ed151e
--
4c6405d1be98fc669b5167970783da00c6a43b86 by Derek Mauro <dmauro@google.com>:
Turn off -Warray-bounds for GCC in internal/inlined_vector.h
GCC 11 appears to erroneously warn here
PiperOrigin-RevId: 374709739
--
be9909b010b3da5967ab0ff44a09be034a1fa82f by Derek Mauro <dmauro@google.com>:
Add non-templated operator new and new[] to ThrowingValue.
GCC 11 is confused and issues -Wmismatched-new-delete.
PiperOrigin-RevId: 374648084
--
a30a87bf1498aff26bcd751daec120d14a934d99 by Derek Mauro <dmauro@google.com>:
Simplify ThrowingAllocator::select_on_container_copy_construction
to workaround what may be a clang c++20 bug
PiperOrigin-RevId: 374630576
GitOrigin-RevId: 4c6405d1be98fc669b5167970783da00c6a43b86
Change-Id: I48f1091c4a0f262961d9059dac4e6b44a82ae91d
--
30af50146f07d7afdb196abf235f44ec44ea6409 by Derek Mauro <dmauro@google.com>:
Update Abseil dependency versions
PiperOrigin-RevId: 374415690
--
6a241e9ea8ee201789bb66aadf9e1ca9cc23c5dc by Derek Mauro <dmauro@google.com>:
Fix the install test project, which is doing a mixed-mode build.
This manifests in failure with GCC 11, which defaults to C++17
Also explicitly reference python3 in the test script.
python2 is being removed by some Linux distros.
PiperOrigin-RevId: 374278107
--
42f85122407e799183880e0b2e2a71f6d35ee003 by Evan Brown <ezb@google.com>:
Use `capacity + Group::kWidth` control bytes instead of `capacity + Group::kWidth + 1`.
We don't use the extra byte - we only need the first `capacity` ones that are valid, the one sentinel byte and then `Group::kWidth - 1` cloned control bytes. For example, in `EmptyGroup()`, where capacity is 0, we use `Group::kWidth` control bytes.
We need to update set_ctrl() to only mirror `Group::kWidth - 1` bytes instead of `Group::kWidth` bytes.
Note: this doesn't actually save memory unless `alignof(value_type)` is one.
Also add/update related comments.
PiperOrigin-RevId: 374198589
--
5dcd09b2221bf23add583541769b476dac54e112 by Evan Brown <ezb@google.com>:
Improve b-tree value_comp() support.
- Don't expose internal adapted comparator functionality.
- Support value_comp() for maps using function pointer comparators.
- For maps, make value_compare's constructor and the member comparator be protected - [reference](https://en.cppreference.com/w/cpp/container/map/value_compare).
PiperOrigin-RevId: 373832649
--
d75819786ff5a06e1ed0c5c1e80b3b95ac49c83b by Evan Brown <ezb@google.com>:
Don't export adapted comparator functionality in key_comp().
PiperOrigin-RevId: 373651039
GitOrigin-RevId: 30af50146f07d7afdb196abf235f44ec44ea6409
Change-Id: I260480b0923cefeba81c543e2b7c34cacaa7d7c7
--
912c205cf80c4ed24a08000c04263403857b7f75 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 373620391
--
d454f10549d27d7b025d1ce0ef90a0cdec42c361 by Martijn Vels <mvels@google.com>:
Add SetCordRepForTesting() helper to CordzInfo
PiperOrigin-RevId: 373602832
--
7a2d7bdd2e60fb51333e81cd71ebd0a4edb60704 by Evan Brown <ezb@google.com>:
For StrAppend, make sure to follow exponential growth like std::string::append.
PiperOrigin-RevId: 373589332
--
24397f19bce45133a42feaa7c883009ef9325095 by Greg Falcon <gfalcon@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 373569246
GitOrigin-RevId: 912c205cf80c4ed24a08000c04263403857b7f75
Change-Id: I5444f7ca2c0980685ca5c51596c259b845d69673
--
9fc37c11b9e46287acef00ee06ed9adcba54dd13 by Greg Falcon <gfalcon@google.com>:
Rename absl::hash_internal::HashState to absl::hash_internal::MixingHashState.
Before this change, we had two classes named HashState: absl::HashState, the public API used for type erasure, and absl::hash_internal::HashState, the internal concrete implementation ordinarily used.
The internal class used to be named `CityHashState`, but we renamed it to `HashState` it when we changed underlying hash implementation to wyhash. This inadvertent naming conflict made the code much harder to read, and this change intends to undo that.
PiperOrigin-RevId: 373481959
--
4aec55ffddebd085c239352a2e20721091f719a1 by Greg Falcon <gfalcon@google.com>:
Introduce absl::HashOf(), a convenience wrapper around absl::Hash that calculates hashes from the values of its arguments.
PiperOrigin-RevId: 373461406
--
86b5fd8db50bbc8bd0aa9258523527381fe0445d by Abseil Team <absl-team@google.com>:
Improve speed of BlockingCounter by making its most common path lock free.
With the new implementation, the fast path of BlockingCounter::DecrementCount()
is only a fetch_sub operation. This is most times much more efficient than the
previous implementation (full mutex lock/unlock). As a matter of fact, in most
actual usecases in practice, the waiter thread is already waiting on the
Wait() call when DecrementCount() is called, which makes Mutex::Unlock() take
the slow path as there's a waiter thread that it might need to wake up.
PiperOrigin-RevId: 373394164
--
65c876be5eac0cd32583ff8535ede4109d39cf3f by Martijn Vels <mvels@google.com>:
Move the 'sample copied cord' logic into MaybeTrackCord(),
This changes move the logic for selecting if a cord should remain being sampled from Cord to CordzInfo::MaybeTrackCord, and updates the documentation for the latter method.
PiperOrigin-RevId: 373363168
--
e84410bd0aada293a81dfb82656c952e209e21fb by Martijn Vels <mvels@google.com>:
Add check for the first call to cordz_should_profile() for each thread.
This prevents the first cord of a newly created thread to be always sampled, which is a 'bad' kind of determinism for sampling.
PiperOrigin-RevId: 373229768
--
bf09c589dc099ac8f4af780bf7e609c53c27574c by Samuel Benzaquen <sbenza@google.com>:
Refactor the Flags structure into an enum.
This gives us more control over the representation and allows for easier
merging during parsing.
PiperOrigin-RevId: 373163038
--
b947b0c51083b7b6508284b5d31819596c91729e by Derek Mauro <dmauro@google.com>:
Fixes warnings about shadowed variables
Fixes#956
PiperOrigin-RevId: 373158133
GitOrigin-RevId: 9fc37c11b9e46287acef00ee06ed9adcba54dd13
Change-Id: I91f35699f9bf439d1a870c6493946a310afe088c
--
5f3c139695d5c497ca030e95a607537a7be7caa7 by Benjamin Barenblat <bbaren@google.com>:
Don’t examine irrelevant destination buckets in DiscreteDistributionTest
Abseil generates discrete distributions using Walker’s aliasing
algorithm. This creates uniformly distributed buckets, each with a
probability of sending traffic to a different bucket. Abseil represents
a bucket as a pair
(probability of retaining traffic ×
alternate bucket if traffic is passed)
and a distribution as a vector of such pairs. For example, {(0.3, 1),
(1.0, 1)} represents a distribution with two buckets, the zeroth of
which passes 70% of its traffic to bucket 1 and the first of which holds
on to all its traffic.
This representation is not unique: When a bucket retains traffic with
probability 1, the alternate bucket is irrelevant. Continuing the
example above, {(0.3, 1), (1.0, 0)} _also_ represents a two-bucket
distribution where the zeroth bucket passes 70% of its traffic to the
first and the first hangs on to all traffic. Exactly what representation
Abseil generates for a given input is related to how much precision is
used in intermediate floating-point operations, which is an
architectural implementation detail. Remove sensitivity to that detail
by not examining the alternate bucket when the retention probability is
1.0.
PiperOrigin-RevId: 372993410
--
062ac80699f748831c09a061538abffec2cdea5c by Martijn Vels <mvels@google.com>:
Avoid alredy sampled cord remaining sampled if not picked or source is sampled
PiperOrigin-RevId: 372985990
--
a9f3537e1110b7bb6450fd72a03f0c5dc6b8c89b by Evan Brown <ezb@google.com>:
Add tests for function pointer comparators, comparators that have SFINAE-visible comparison operators that are unimplemented, and for implicit construction from unadapted comparators.
PiperOrigin-RevId: 372927616
GitOrigin-RevId: 5f3c139695d5c497ca030e95a607537a7be7caa7
Change-Id: I996a8452e7bd88f9dd2e59633b01bbc09f42620d
--
51e9291d9bc385082b4061fe760b236ba59c79c3 by Abseil Team <absl-team@google.com>:
Cast to uint64_t using braces instead of parentheses.
PiperOrigin-RevId: 372475909
--
939fc409855da2639dcaf2d1d4971ca0e0568d03 by Martijn Vels <mvels@google.com>:
Expand # flat nodes into size detailed counters.
PiperOrigin-RevId: 372474608
--
54b158c99b32f8a14821ce74fed0f9f836525ce7 by Martijn Vels <mvels@google.com>:
Make copies of sampled cords sampled as well
This applies to the following methods:
- Cord(const Cord&)
- operator=(const Cord&)
- Subcord(...)
PiperOrigin-RevId: 372468160
--
876c2581ce008871464e8b471efbb967d150f83b by Andy Getzendanner <durandal@google.com>:
Document the type of an ABSL_FLAGS.OnUpdate() callback.
PiperOrigin-RevId: 372406390
GitOrigin-RevId: 51e9291d9bc385082b4061fe760b236ba59c79c3
Change-Id: Ifb75122cae56b66c28128aee90a63bbb28d93817
--
daf5a2b9ab3507ad5fb9aebe9165933f33098b83 by Abseil Team <absl-team@google.com>:
Absl flat containers reserve enough space even in the presence of tombstones.
PiperOrigin-RevId: 372339945
--
9a61504867ba0eccc5046d7333090fbe3439cdd9 by Abseil Team <absl-team@google.com>:
Add benchmark for BlockingCounter
PiperOrigin-RevId: 372246068
--
91ee87e6de09fc62970667ee52654c9dcf7c478d by Evan Brown <ezb@google.com>:
In absl::StrSplit, support btree_multimap, and other non-std::multimap-multimaps by supporting any map type that returns iterator from insert().
Also:
- Use emplace() instead of insert() when available, not just for std::(multi)map - we can potentially change some string copies to moves this way.
- We no longer need the Insert class so remove it.
PiperOrigin-RevId: 372209653
GitOrigin-RevId: daf5a2b9ab3507ad5fb9aebe9165933f33098b83
Change-Id: I83098fde4a722cd4b682f024d3bfa56c613f960c