summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Adjust conditonal compilation in non_temporal_memcpy.hGravatar Abseil Team2024-03-27
| | | | | | | | | | This change will allow the AVX version of non-temporal memcpy to be compiled even if the compiler isn't run with AVX support. This allows runtime dispatch to select the AVX implementation for CPUs that are known to be compatible with AVX instructions. PiperOrigin-RevId: 619594422 Change-Id: Ia7d92404ef8d10d152030b29b71948ed954f28f5
* Reformat log/internal/BUILDGravatar Abseil Team2024-03-27
| | | | | PiperOrigin-RevId: 619563536 Change-Id: I81df471817ddd4aba5aaa525adcdae5e7e03b886
* Remove deprecated errno constants from the absl::Status mappingGravatar Derek Mauro2024-03-27
| | | | | | | | | | | | | | ENOSTR, ETIME, ENODATA, and ENOSR are deprecated by POSIX and C++23. This change also turns on the deprecation warnings used by Chromium. See also: https://wg21.link/LWG3869 https://github.com/llvm/llvm-project/pull/80542 https://buganizer.corp.google.com/issues/331100926 PiperOrigin-RevId: 619551374 Change-Id: Ica8d5008cbee52ce88d58a1fcb79dbe794045bae
* Introduce GrowthInfo with tests, but without usage.Gravatar Vitaly Goldshteyn2024-03-26
| | | | | | | The motivation is to use presence of kDeleted slots for optimizing InsertMiss for tables without kDeleted slots. PiperOrigin-RevId: 619411282 Change-Id: Icc30606374aba7ce60b41f93ee8d44894e1b8aa5
* Enable small object optimization in swisstable.Gravatar Evan Brown2024-03-26
| | | | | | | See [implementation commit](https://github.com/abseil/abseil-cpp/commit/1449c9a106b090f61441ba245c781d7d2f89000c) for design details. PiperOrigin-RevId: 619309882 Change-Id: I093c00365dda2268be86ba3d21421b6ffb59a5ce
* Refactor the GCC unintialized memory warning suppression in raw_hash_set.h.Gravatar Evan Brown2024-03-26
| | | | | | Motivation: there are new uninitialized memory warnings when we enable small object optimization. PiperOrigin-RevId: 619295212 Change-Id: If10762bab0e43c9619fc03f6d1eef5b8836bbf9a
* Respect `NDEBUG_SANITIZER`Gravatar Abseil Team2024-03-26
| | | | | | | | | | | | | | | | | | | | | Often code needs to know that it's built with sanitizers. There are two common use for such information: 1. Work around incompatibility with sanitizers 2. Use sanitizers for more aggressive bug detection With the current `ABSL_HAVE_*_SANITIZER` we can't distinguish this two cased, and we didn't need that before. Now user can define `NDEBUG_SANITIZER` to ask code like this to avoid unnecessary checks. I am not 100% sure that `NDEBUG` is not enough. However relying on `NDEBUG` today will relax many tests, which runs in NDEBUG mode only. So new `NDEBUG_SANITIZER` is safer approach. PiperOrigin-RevId: 619268413 Change-Id: I58185cd6886593a3742b8424deccdec366c2a35a
* Revert integer-to-string conversion optimizations pending more thorough analysisGravatar Abseil Team2024-03-26
| | | | | PiperOrigin-RevId: 619261152 Change-Id: Id3409b326c52ace0fda42537e0b91dbb2d6a2287
* Fix a bug in `Cord::{Append,Prepend}(CordBuffer)`: callGravatar Marcin Kowalczyk2024-03-26
| | | | | | | | | | | `MaybeRemoveEmptyCrcNode()`. Otherwise appending a `CordBuffer` an empty Cord with a CRC node crashes (`RemoveCrcNode()` which increases the refcount of a nullptr child). Cosmetics: in `Cord::InlineRep::AppendArray()`, return early for empty `src` before removing the empty CRC node. PiperOrigin-RevId: 619107278 Change-Id: I4f1bc6b75c662f4678c61e3ef310e8597d62e2e1
* Add `BM_EraseIf` benchmark.Gravatar Vitaly Goldshteyn2024-03-25
| | | | | PiperOrigin-RevId: 618970135 Change-Id: Ifb9d0b425904d5cb37d80ec28ab7845957209313
* Record sizeof(key_type), sizeof(value_type) in hashtable profiles.Gravatar Chris Kennelly2024-03-25
| | | | | | | | This can identify situations where flat_hash_* is suboptimal for large elements. PiperOrigin-RevId: 618937993 Change-Id: I2bde069bc3526b14ad1718ba6f50467002aeed16
* Fix ClangTidy warnings in btree.h.Gravatar Evan Brown2024-03-25
| | | | | PiperOrigin-RevId: 618872032 Change-Id: I9fdfadff906494eb64cee976c02a1fff57923c79
* LSC: Move expensive variables on their last use to avoid copies.Gravatar Abseil Team2024-03-24
| | | | | PiperOrigin-RevId: 618650101 Change-Id: I6cff17a9db0dc45ad3b1f833df6ea3d7d04a7449
* PR #1644: unscaledcycleclock: remove RISC-V supportGravatar aurel322024-03-22
| | | | | | | | | | | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644 Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear. The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2]. Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units. This fixes the testsuite on riscv64, tested on a VisionFive 2 board. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 [2] https://github.com/abseil/abseil-cpp/pull/1631 Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1 Merging this change closes #1644 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71 PiperOrigin-RevId: 618286262 Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652
* Reland: Make DLOG(FATAL) not understood as [[noreturn]]Gravatar Peter Boström2024-03-22
| | | | | | | | Having DLOG(FATAL) be [[noreturn]] in debug builds makes dead-code warnings impossible to satisfy between the release and debug build. PiperOrigin-RevId: 618257732 Change-Id: Ib1c2cb6a026401fbaa0a6e0770adfc166b964ece
* Separate out absl::StatusOr constraints into statusor_internal.hGravatar Abseil Team2024-03-21
| | | | | PiperOrigin-RevId: 617920100 Change-Id: I0717560a88d32c067ce26b463b14d0db458b28b6
* Use Layout::WithStaticSizes in btree.Gravatar Evan Brown2024-03-21
| | | | | PiperOrigin-RevId: 617877687 Change-Id: I29c52f9288f099255c4adb7c1f9fa8831ac55b05
* `layout`: Delete outdated comments about ElementType alias not being used ↵Gravatar Dino Radakovic2024-03-21
| | | | | | | | | because of MSVC Code below those comments does use ElementType. PiperOrigin-RevId: 617854731 Change-Id: I7996b8cbaa2fb65855a801f634a57d821408b1f3
* Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()Gravatar Abseil Team2024-03-20
| | | | | PiperOrigin-RevId: 617613544 Change-Id: I526b5bc087edf54046c77795dddf5412478ac6a8
* `layout_benchmark`: Replace leftover comment with intended call to MyAlignGravatar Dino Radakovic2024-03-20
| | | | | PiperOrigin-RevId: 617573381 Change-Id: I0ddab2ab7cf68651424b3cf385b484d27106dd59
* Remove absl::aligned_storage_tGravatar Derek Mauro2024-03-19
| | | | | | | | | | Consistent with std::aligned_storage_t, it is deprecated in C++23. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf has a suggested replacement PiperOrigin-RevId: 617367005 Change-Id: I009533c5609c8ffd77e406e1fc88e51a3ce99f9f
* Delete ABSL_ANNOTATE_MEMORY_IS_INITIALIZED under Thread SanitizerGravatar Abseil Team2024-03-19
| | | | | PiperOrigin-RevId: 617266753 Change-Id: I6cac7b4616001c8d435fb1786da81b746f2d14cb
* Remove vestigial variables in the DumpNode() helper in absl::CordGravatar Derek Mauro2024-03-19
| | | | | | | Fixes #1636 (GCC -Wmaybe-uninitialized warning) PiperOrigin-RevId: 617253727 Change-Id: I246cd21d8123d4dfa7780b1c4cac8ea1558a4067
* Do hashtablez sampling on the first insertion into an empty SOO hashtable.Gravatar Evan Brown2024-03-19
| | | | | | | | | When sampling triggers, we skip SOO and allocate a backing array. We must do this because the HashtablezInfoHandle is part of the heap allocation (along with the control bytes and slots). By default, we sample 1 in ~1024 hashtables when sampling is enabled. This will impact performance because (a) we won't benefit from SOO so we would have worse data locality (more cache/TLB misses), and (b) the backing array capacity will be 3 instead of 1 so (b.1) we skip the rehash after the second insertion and (b.2) we potentially waste up to two slots worth of memory. We also add an soo_capacity field to HashtablezInfo to allow for distinguishing which sampled tables may otherwise have been SOO - this will allow us to know approximately what fraction of tables are in SOO mode. PiperOrigin-RevId: 617252334 Change-Id: Ib48b7a4870bd74ea3ba923ed8f350a3b75dbb7d3
* Add explicit #include directives for <tuple>, "absl/base/config.h", and ↵Gravatar Abseil Team2024-03-19
| | | | | | | "absl/strings/string_view.h". PiperOrigin-RevId: 617232899 Change-Id: I5e6c0bd4545d7f7ad9c5c494017269e247f620a3
* Add a note about the cost of `VLOG` in non-debug builds.Gravatar Abseil Team2024-03-19
| | | | | PiperOrigin-RevId: 617186944 Change-Id: Id540fb42b02f24ad92b8f3898231f01ac004e191
* Fix flaky test failures on MSVC.Gravatar Evan Brown2024-03-18
| | | | | PiperOrigin-RevId: 616951235 Change-Id: I2d6e95a432285c3f79ef8484848e88e06973f51f
* Add template keyword to example comment for Layout::WithStaticSizes.Gravatar Evan Brown2024-03-18
| | | | | | | Without this keyword, we can sometimes get cryptic compilation failures such as "error: expected ';' after alias declaration". PiperOrigin-RevId: 616933517 Change-Id: I2209f3899a4ac03c031217cec67de25bd376d355
* PR #1643: add xcprivacy to all subspecsGravatar Hannah Shi2024-03-18
| | | | | | | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1643 Addressing comments at https://github.com/abseil/abseil-cpp/pull/1604/#pullrequestreview-1937008657 Add a xcprivacy subspec and have all other subspecs depend on it (option 1) Didn't going with option 3 because there are several levels of subspecs in abseil podspec, it's difficult to track whether all of them directly or indirectly depends on abseil/base/config or ensure they will continue to depend on it. Example of generated podsped: https://gist.github.com/HannahShiSFB/15d8fb6aa637f2781b7be4218d080f11 Merge 4405cdfe71129bebb13c02a6d8ee18be7e813f73 into 4539c540fe48d6a7f0cc4ed3ace2971c9038cc75 Merging this change closes #1643 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1643 from HannahShiSFB:privacy-manifests 4405cdfe71129bebb13c02a6d8ee18be7e813f73 PiperOrigin-RevId: 616914674 Change-Id: If56d5a4f1a7cc6f9fac7a2d8e95b55d140e645fc
* Record sampling stride in cord profiling to facilitate unsampling.Gravatar Chris Kennelly2024-03-18
| | | | | | | | The sampling rate may change over time, so this allows us to weight samples by the value observed when we made the sampling decision. PiperOrigin-RevId: 616900100 Change-Id: I9b1affdba93f5f48367cb7503916296b2d84709a
* Fix a typo in a comment.Gravatar Evan Brown2024-03-18
| | | | | PiperOrigin-RevId: 616895950 Change-Id: I9dc9099e779df4b692496aa5ee5573ef0e7fd826
* [log] Correct SetVLOGLevel to SetVLogLevel in commentsGravatar Abseil Team2024-03-18
| | | | | PiperOrigin-RevId: 616818246 Change-Id: I1ee813dd1b4da2d25d6b1b9cdba9e8f70d6a6d90
* Add a feature to container_internal::Layout that lets you specify some array ↵Gravatar Abseil Team2024-03-18
| | | | | | | | | sizes at compile-time as template parameters. This can make offset and size calculations faster. In particular, it seems to always improve the performance of AllocSize(), and it sometimes improves the performance of other functions, e.g. when the Layout object outlives the function that created it. PiperOrigin-RevId: 616817169 Change-Id: Id1d318d7d2af68783f9f59090d89c642be6ae558
* `layout`: Mark parameter of Slices with ABSL_ATTRIBUTE_UNUSED, remove old ↵Gravatar Dino Radakovic2024-03-15
| | | | | | | | | | | | | | workaround The workaround was added for a bug in GCC < 6.1., which had since been fixed. Abseil only [supports](https://github.com/google/oss-policies-info/blob/9a9bfe8a4a12be20757497074fc2f0ecb77438ad/foundational-cxx-support-matrix.md) GCC > 7.3.1. However, removing the workaround still trips even more recent GCC, such as 13.1. When `SizeSeq` is empty, `p` is not actually used. Marking it as `ABSL_ATTRIBUTE_UNUSED` silences the GCC warning for that case too. We could disable `Slices` altogether when `SizeSeq` is empty, but that would be a breaking change (even though this API is internal), and possibly hurt generic programming use (they'd have to check if their parameter packs are empty). PiperOrigin-RevId: 616245873 Change-Id: I77f7b0b921dfd63fb01c5223851ad1d8a7da233b
* `layout`: Use auto return type for functions that explicitly instantiate ↵Gravatar Dino Radakovic2024-03-15
| | | | | | | | | | std::tuple in return statements This improves readability by avoiding spelling the same type twice, the first time with even more boilerplate (e.g. `typename`). Return type deduction is a C++14 feature, and Abseil [currently supports](https://github.com/google/oss-policies-info/blob/9a9bfe8a4a12be20757497074fc2f0ecb77438ad/foundational-cxx-support-matrix.md) C++ >= 14. PiperOrigin-RevId: 616218396 Change-Id: I82aeec878dd69001d2cf822db6512f5a62baec02
* Remove redundant semicolons introduced by macrosGravatar Abseil Team2024-03-15
| | | | | PiperOrigin-RevId: 616083064 Change-Id: I3d69303d32431227c197247682f8dcb70f9a239d
* [log] Make :vlog_is_on/:absl_vlog_is_on public in BUILD.bazelGravatar Abseil Team2024-03-15
| | | | | | | | No longer include vlog_is_on.h from log.h. This is a breaking change. To use VLOG_IS_ON(), absl/log/vlog_is_on.h must be included, not log.h. PiperOrigin-RevId: 616045708 Change-Id: I59261eb5c28846557b43b040e187ec3ef36e4132
* Add additional checks for size_t overflowsGravatar Derek Mauro2024-03-14
| | | | | | | | | This change mainly affects 32-bit platforms. Similar to 4618865caf8596742a9fd7c28a70a46b5e277794, check for size_t overflow in all places where string result sizes are precomputed before allocation. PiperOrigin-RevId: 615792028 Change-Id: I71c774c5ef2c2978bd812c70e9bab36d266b7c90
* Replace //visibility:private with :__pkg__ for certain targetsGravatar Abseil Team2024-03-14
| | | | | | | | | This will allow us to give visibility to other Google-internal libraries. The change is necessary since //visibility:private cannot be combined with other specifications. PiperOrigin-RevId: 615779561 Change-Id: I82b1edfa4e1ca280e429cf2a5e4003a1cc316a60
* PR #1603: Disable -Wnon-virtual-dtor warning for CommandLineFlag implementationsGravatar Adam Gajda2024-03-13
| | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1603 Merge e324303b1f2aaee8e4418cffb838f150a2d4f4e7 into d802708117c6ef6b9783efe499b2a2d0d0536c77 Merging this change closes #1603 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1603 from adgajda:master e324303b1f2aaee8e4418cffb838f150a2d4f4e7 PiperOrigin-RevId: 615522811 Change-Id: I46a388ac62ffd42ce175dbfa04e414dd498855f8
* Add several missing includes in crc/internalGravatar Abseil Team2024-03-13
| | | | | PiperOrigin-RevId: 615504707 Change-Id: Ia0e8211bd3c3d28fd0715c8f296ec50f6a700757
* Roll back extern template instatiations in swisstable due to binary size ↵Gravatar Evan Brown2024-03-13
| | | | | | | increases in shared libraries. PiperOrigin-RevId: 615497725 Change-Id: Ic29db8923ea4ea7cd0b01b396896fa9fff8c74b0
* Add nodiscard to SpinLockHolder.Gravatar Chris Kennelly2024-03-13
| | | | | PiperOrigin-RevId: 615473765 Change-Id: I03c3c16a0e178fce8a572ce272b7e1fd806a38a7
* Test that rehash(0) reduces capacity to minimum.Gravatar Vitaly Goldshteyn2024-03-13
| | | | | PiperOrigin-RevId: 615380243 Change-Id: I5400b40a6bc5ac52ece5d4fa6da7df9e4ff50855
* Add extern templates for common swisstable types.Gravatar Evan Brown2024-03-12
| | | | | | | | Motivation: mitigate linker input size increase from swisstable optimizations. Note: the changes in raw_hash_set.h are fixing build errors that happened when adding the explicit instantiations. The change in unchecked_deref is because set iterators have const reference access whereas map iterators have mutable reference access and the function is never actually called for sets (it's used in raw_hash_map) so it wasn't needed before. I'm not sure why the soo_slot/soo_iterator problems didn't cause compile errors earlier. PiperOrigin-RevId: 615174043 Change-Id: Iac5eb2332a76e9b70021156fbb2b8def47a5391d
* Disable ubsan for benign unaligned access in crc_memcpyGravatar Abseil Team2024-03-12
| | | | | PiperOrigin-RevId: 615160537 Change-Id: I29070c898104c55e6563eed0eef7397441bef1d7
* Make swisstable SOO support GDB pretty printing and still compile in OSS.Gravatar Evan Brown2024-03-12
| | | | | PiperOrigin-RevId: 615131303 Change-Id: I68fcbdd943594983c67f8e07810b05d5fa9a6f2e
* Fix OSX support with CocoaPods and Xcode 15Gravatar Abseil Team2024-03-12
| | | | | PiperOrigin-RevId: 615090942 Change-Id: I7cc20a0129dcfbbddedd9e6d816bb6234bff14b3
* Fix GCC7 C++17 buildGravatar Derek Mauro2024-03-12
| | | | | | | | | GCC did not support <filesystem> until GCC8. Fixes #1635 PiperOrigin-RevId: 615051227 Change-Id: If7cd5802ead40805b1ff1c3bdfc10ba6d2858ef0
* Use UnixEpoch and ZeroDurationGravatar Abseil Team2024-03-12
| | | | | PiperOrigin-RevId: 615047295 Change-Id: I86e5de8543dc1ebee6d5a526846e9121b241b0fa