ABSL_RANDOM_RANDEN_COPTS
Everything works fine when this is empty
Fixes#1301
PiperOrigin-RevId: 484014466
Change-Id: I2fa96d845320f23063e1e86ee2df3ac14bd44012
Addresses failures with the following, in some files:
-Wshorten-64-to-32
-Wimplicit-int-conversion
-Wsign-compare
-Wsign-conversion
-Wtautological-unsigned-zero-compare
(This specific CL enables these warnings and fixes the remaining known issues.)
Bug: chromium:1292951
PiperOrigin-RevId: 480981210
Change-Id: I92d5023c6833e24d6aa29b10d433116329972f41
instead of just detecting Bazel's default "compiler" string.
When Bazel auto-configures GCC, it sets the compiler string to
"compiler", probably for backwards compatibility. Some users manually
set the string to "gcc".
This should address the backwards compatibility issues described in
https://github.com/bazelbuild/bazel/issues/12707 and hopefully fix
https://github.com/abseil/abseil-cpp/issues/1263
PiperOrigin-RevId: 473069817
Change-Id: I8a24721f63f9d61447b22b3b05b06a9dde7d34d8
--
f4c7e510922668c68be4aa79a00867c3d3ca9f95 by Derek Mauro <dmauro@google.com>:
Many improvements to LeakChecker builds
The presence of the LeakChecker is now detected when possible. GCC
users using LeakChecker in standalone mode still need to use
-DLEAK_CHECKER. This is now documented in the header.
The hacky targets used for testing leak checking have been removed in
favor of testing in AddressSanitizer mode on Kokoro.
Fixes#885Fixes#1153
PiperOrigin-RevId: 441203393
Change-Id: Ibe64ef6b104bcaf31839ff7184e558cc86abdd1c
--
5c70a23aa83b8152ab95d2cf21662fc63c80ef7d by Abseil Team <absl-team@google.com>:
Add a benchmark for stacktrace
PiperOrigin-RevId: 441196473
Change-Id: I4c9aa2e797aa2cae09abfaaee3abe5c09eb62fc4
--
50b406052273b9d5bad04a7860a96e4d5d956c02 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 441114481
Change-Id: I667af7a50d5631ca91289dd24c91ba90233e0184
--
568b4eaac120b420bce5290179d407d2b57d5bae by Dino Radakovic <dinor@google.com>:
Internal change
PiperOrigin-RevId: 440894155
Change-Id: Ia587ffc65a8321126585fb363b7c0ca8cc2a0da2
--
d53948eace4f3a10ac5a6c1496dc51b81adc412c by Abseil Team <absl-team@google.com>:
Explicitly give internal linkage to symbols which are not used outside of their
translation units.
PiperOrigin-RevId: 440424519
Change-Id: I531c5e229d443375483b7550a34f48042589a99b
GitOrigin-RevId: f4c7e510922668c68be4aa79a00867c3d3ca9f95
--
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
--
f6fbb03bff276e72123e8590519079e87732ae62 by Abseil Team <absl-team@google.com>:
Replace static absl::Mutex with SpinLock in absl::Cords
to avoid static initializers by absl::Mutex destructors
PiperOrigin-RevId: 370694199
--
654b7d9edfdc24f226990b2b46cbf91451a1d92a by Martijn Vels <mvels@google.com>:
Implement global data for CordzInfo in an ODR hardened way
This change puts the global data into a global list structure, and stores a reference to the global list in the handle itself. This hardens the implementation against ODR violations where info pointers are crossing dynamic library boundaries which are privately loaded.
PiperOrigin-RevId: 370673045
--
712dba768e66ee2ba85d6010829c617cd2af6ba7 by Martijn Vels <mvels@google.com>:
Intrument Cord::operator= for Cordz
PiperOrigin-RevId: 370659149
--
c0b347a2289e151b72680269332e264b8fa989c0 by Matt Kulukundis <kfm@google.com>:
Fix test guards for ABSL_ATTRIBUTE_RETURNS_NONNULL
PiperOrigin-RevId: 370594807
--
c2bedaa3472ef223f907de2604f9b9b58852ec5f by Martijn Vels <mvels@google.com>:
Add new Cordz instrumentation on GetAppendRegion.
PiperOrigin-RevId: 370587761
--
84fbfcc852697d509f6094482b86e84743a6b331 by Martijn Vels <mvels@google.com>:
Add instrumentation on Cord::Apppend(string_view)
PiperOrigin-RevId: 370576590
--
9e077390b8ca2239e1cb7bfbe1d5a04f2fc11d30 by Abseil Team <absl-team@google.com>:
Google-internal changes only.
PiperOrigin-RevId: 370558424
--
fb53c149eb2364ea34e3a67235f873866618b8ac by Matt Kulukundis <kfm@google.com>:
Update config.h macros with a few useful helpers to simplify version checking
PiperOrigin-RevId: 370557684
--
abf8142e99b9ff7e15f6528a357f1005461950b0 by Martijn Vels <mvels@google.com>:
clang-format cord
PiperOrigin-RevId: 370549371
--
e555985eabe63fcf0e980e9c433dd84caffec191 by Martijn Vels <mvels@google.com>:
Add MaybeUntrackCord() function
This function is near identical to the old UntrackCord() but allows info to be null, moving the cord.is_profiled() branch into CordzInfo.
PiperOrigin-RevId: 370528447
--
3883538efe4601f7864bda70a50d868bb383c63b by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 370503186
--
a9514b65542fde1bc73584e6f3c1c4b3a05f215f by Derek Mauro <dmauro@google.com>:
Add -Winvalid-constexpr to warning options for LLVM
PiperOrigin-RevId: 370455171
--
d8a3966de2cf15a2dc28e17e49a3d27d205eca92 by Martijn Vels <mvels@google.com>:
Add naive UniqueGenerator<T, kMaxValues, ...> to avoid flakes from dup random values.
PiperOrigin-RevId: 370179772
--
46d0caa1a12b68a5998d4f919e20f0f83b9286f8 by Martijn Vels <mvels@google.com>:
Add new Cordz instrumentation on PrependTree.
PiperOrigin-RevId: 370138969
GitOrigin-RevId: f6fbb03bff276e72123e8590519079e87732ae62
Change-Id: Ifa4c00a5c7b01198ee367a3253bea6b66612135e
--
8e3ed8c8f770f9371f037e4956334b6e38525e91 by Abseil Team <absl-team@google.com>:
Remove legacy, non-standard sanitizer macros.
PiperOrigin-RevId: 367079577
--
c06aa9b9c20ba2e87dfc6933bbf8a30e0502d70a by Martijn Vels <mvels@google.com>:
Remove kFakeCordzInfo and last caller to set_profiled()
These have all been superseded by clear_cordz_info() and set_cordz_info()
PiperOrigin-RevId: 367020835
--
e0bd3e4e0b46db495663261a1664815eb94999f8 by Abseil Team <absl-team@google.com>:
AbseilConfigureCopts.cmake: fix AppleClang detection
restore use of MATCHES in comparison with "Clang"; this was lost in:
commit 22771d4719
...
24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:
Fixes failing CMake string comparisons
https://cmake.org/cmake/help/latest/policy/CMP0054.html
fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
Unknown compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
Building with no default flags
Fixes#930
PiperOrigin-RevId: 366879337
GitOrigin-RevId: 8e3ed8c8f770f9371f037e4956334b6e38525e91
Change-Id: I7b027b7e82491676b59dc9d23cfe063ea6004d3b
--
2247e59ee5696e61c7cb24dce479db572980032d by Derek Mauro <dmauro@google.com>:
Ensure ThreadIdentity::WaiterState data has the correct alignment
PiperOrigin-RevId: 357969866
--
79bb81a2e6723b186536ad4b4f25cd7ee83f3e72 by Laramie Leavitt <lar@google.com>:
Rework absl::MockingBitGen internal mock registry.
Use a virtual base class with template-specialized derived classes to implement match method rather than taking the address of a function specialization and using casts everywhere.
This combines several of the previously type-erased pointers into a single object, eliminates the separate cleanup container previously used, and eliminates some gratuitous static_cast<>s.
PiperOrigin-RevId: 357827438
--
a2eb53d002c9b376360a70b2b0f6a18a1de1e16f by Todd Lipcon <tlipcon@google.com>:
Reduce runtime of sequence_lock_test
PiperOrigin-RevId: 357785571
--
dd1175ff13b560f01c4aaa64bc6759a5300e391c by Abseil Team <absl-team@google.com>:
Don't assume that compiling for Windows means that MSVC or clang-cl is being used.
PiperOrigin-RevId: 357760052
--
251a9cbede52e729b3a25911b6e225b779c285a8 by Andy Getzendanner <durandal@google.com>:
Internal change.
PiperOrigin-RevId: 357702979
GitOrigin-RevId: 2247e59ee5696e61c7cb24dce479db572980032d
Change-Id: Icd366d3775d88d623695209b5f328dbd69f01d27
--
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
--
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
--
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
--
240f86077dabaa58210e6b1a35cc442902409bf5 by Gennadiy Rozental <rogeeff@google.com>:
Fix the link to the Allocator concept description.
PiperOrigin-RevId: 326292363
--
d023337da5c7c23ec5f316c4e03efc4d8404ad63 by Gennadiy Rozental <rogeeff@google.com>:
Add -DNOMINMAX to gcc/clang build command line in case they are used to build Abseil on Windows.
Fixes#761
PiperOrigin-RevId: 326255039
GitOrigin-RevId: 240f86077dabaa58210e6b1a35cc442902409bf5
Change-Id: If8a40a9b2be9c0c1e652347e2f22e2fff6bbeaa1
--
dcd4d95f6201dc5781a3a374be8eb10c812fd98a by Derek Mauro <dmauro@google.com>:
Add -Wundef to GCC warnings
PiperOrigin-RevId: 322388155
--
b030746368262aff6bc487f5525bcd9b32d18ebb by Abseil Team <absl-team@google.com>:
Google internal clean-up.
PiperOrigin-RevId: 322381901
--
18e4cfcd50730c493cfc0cf1e127e57c186ce90b by Evan Brown <ezb@google.com>:
Rollback b-tree erase simplification change.
PiperOrigin-RevId: 322368252
--
d15431c52fa7ccb25ffbd967fd11f8f58246d48a by Abseil Team <absl-team@google.com>:
Update MOCK_METHOD (new format) in memory/memory_test.cc
PiperOrigin-RevId: 322208282
GitOrigin-RevId: dcd4d95f6201dc5781a3a374be8eb10c812fd98a
Change-Id: I3a900b4993f86bdd1c9597819c7a0e6e1759eda3
--
f012012ef78234a6a4585321b67d7b7c92ebc266 by Laramie Leavitt <lar@google.com>:
Slight restructuring of absl/random/internal randen implementation.
Convert round-keys.inc into randen_round_keys.cc file.
Consistently use a 128-bit pointer type for internal method parameters. This allows simpler pointer arithmetic in C++ & permits removal of some constants and casts.
Remove some redundancy in comments & constexpr variables. Specifically, all references to Randen algorithm parameters use RandenTraits; duplication in RandenSlow removed.
PiperOrigin-RevId: 312190313
--
dc8b42e054046741e9ed65335bfdface997c6063 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 312167304
--
f13d248fafaf206492c1362c3574031aea3abaf7 by Matthew Brown <matthewbr@google.com>:
Cleanup StrFormat extensions a little.
PiperOrigin-RevId: 312166336
--
9d9117589667afe2332bb7ad42bc967ca7c54502 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 312105213
--
9a12b9b3aa0e59b8ee6cf9408ed0029045543a9b by Abseil Team <absl-team@google.com>:
Complete IGNORE_TYPE macro renaming.
PiperOrigin-RevId: 311999699
--
64756f20d61021d999bd0d4c15e9ad3857382f57 by Gennadiy Rozental <rogeeff@google.com>:
Switch to fixed bytes specific default value.
This fixes the Abseil Flags for big endian platforms.
PiperOrigin-RevId: 311844448
--
bdbe6b5b29791dbc3816ada1828458b3010ff1e9 by Laramie Leavitt <lar@google.com>:
Change many distribution tests to use pcg_engine as a deterministic source of entropy.
It's reasonable to test that the BitGen itself has good entropy, however when testing the cross product of all random distributions x all the architecture variations x all submitted changes results in a large number of tests. In order to account for these failures while still using good entropy requires that our allowed sigma need to account for all of these independent tests.
Our current sigma values are too restrictive, and we see a lot of failures, so we have to either relax the sigma values or convert some of the statistical tests to use deterministic values.
This changelist does the latter.
PiperOrigin-RevId: 311840096
GitOrigin-RevId: f012012ef78234a6a4585321b67d7b7c92ebc266
Change-Id: Ic84886f38ff30d7d72c126e9b63c9a61eb729a1a