- 20 Oct, 2023 3 commits
-
-
Some use cases of SpinLock need to verify that it is configured for non-cooperative scheduling. PiperOrigin-RevId: 575278400 Change-Id: Ic49f57a989a3f7f67e346a1ec545f4cd5b94f849
Chris Kennelly committed -
PiperOrigin-RevId: 575273754 Change-Id: Iddd31524c86ff05c3c204a2e04250605a55448bc
Derek Mauro committed -
when targeting at least C++20 These methods were added to C++20, so they are not available in earlier language standards. Users requiring compatibility prior to C++20 should use absl::StartsWith() and absl::EndsWith() from //absl/strings/match.h. Most users are not affected by this change. By default when targeting at least C++20 absl::string_view will be an alias for std::string_view. Only users that have modified //absl/base/options.h will see this change. PiperOrigin-RevId: 575238435 Change-Id: I7b03fde02c987b30b88c794640c2a616851997d1
Derek Mauro committed
-
- 19 Oct, 2023 1 commit
-
-
Currently we use "r" constraint to pass prefetched address. This forces the compiler to actually put it into a register. As the result some uses look as: 16bfb7c: 48 01 cf add %rcx,%rdi 16bfb7f: 0f 0d 0f prefetchw (%rdi) -- 16bfccf: 48 83 c1 60 add $0x60,%rcx 16bfcd3: 0f 0d 09 prefetchw (%rcx) Use "m" constraint instead. It's more relaxed and requires to just materialize the address in some form using whatever addressing modes the target supports (e.g. x86 off(base, index, scale)). With the change the same code becomes: 16bfb7c: 0f 0d 0c 39 prefetchw (%rcx,%rdi,1) -- 16bfccf: 0f 0d 49 60 prefetchw 0x60(%rcx) PiperOrigin-RevId: 574723975 Change-Id: Id0c8645f8c702d1842685343901da321f6513156
Dmitry Vyukov committed
-
- 18 Oct, 2023 1 commit
-
-
I.e. for a type `Example`, if ``` std::ostream& operator<<(std::ostream&, const Example&); ``` is declared, `absl::HasOstreamOperator<Example>::value` is `true`. PiperOrigin-RevId: 574637891 Change-Id: I123d8f35a6e3ea894745133f7d81b1610fb475d5
Zie Weaver committed
-
- 17 Oct, 2023 2 commits
-
-
Rollback: Add sanitizer mode checks that element constructors/destructors don't make reentrant calls to raw_hash_set member functions. PiperOrigin-RevId: 574232718 Change-Id: I8ef25fec00b76ee5fb9424e7614ca55edd6ba81b
Evan Brown committed -
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1546 I am building Abseil with tests enabled and an external GTest build, i.e. ``` -DABSL_BUILD_TESTING=ON -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON -DGTest_ROOT=/path/to/googletest/1.14.0 ``` However, CMake (3.20.2) configuration yielded this result: ``` -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE CMake Warning (dev) at CMakeLists.txt:150 (find_package): Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables. Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMake variable GTest_ROOT is set to: /path/to/googletest/1.14.0 For compatibility, CMake is ignoring the variable. This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGTest.cmake:255 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:150 (find_package) -- Configuring incomplete, errors occurred! See also "/tmp/abseil-build/CMakeFiles/CMakeOutput.log". See also "/tmp/abseil-build/CMakeFiles/CMakeError.log". ``` This PR sets `CMP0074=NEW` so that the GTest install location can be specified via `GTest_ROOT`. Merge 4e4f035affd9b8af739634afdf9c2e80d14c2391 into 2a18ba75 Merging this change closes #1546 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1546 from iskunk:feature/fix-gtest-root 4e4f035affd9b8af739634afdf9c2e80d14c2391 PiperOrigin-RevId: 574159856 Change-Id: Ifc796500c3a6403d28a027375116437bc743205a
Daniel Richard G committed
-
- 16 Oct, 2023 2 commits
-
-
Add sanitizer mode checks that element constructors/destructors don't make reentrant calls to raw_hash_set member functions. PiperOrigin-RevId: 573897598 Change-Id: If40c23ac3cd9fff315ee18774e27c480cbca3a81
Evan Brown committed -
Motivation: once we enable small object optimization in swisstable, iterators can be invalidated when the table is moved. PiperOrigin-RevId: 573884505 Change-Id: I4278129829143d3747dfd0ef0ff92f321c2633dc
Evan Brown committed
-
- 12 Oct, 2023 5 commits
-
-
PiperOrigin-RevId: 572979536 Change-Id: I4fceee0c52e4e6877e639860327462c7874719e7
Evan Brown committed -
The current implementation of control by checking on x86 has an unnecessary sign extension after the doing the control byte comparison. Changing the bitmask object to explicitly track only 16 bits (instead of 32) eliminates this, saving an instruction / cycle. This speeds up hit checking by up to 6% on Milan and up to 15% on CLX PiperOrigin-RevId: 572965182 Change-Id: Ifda0e3250d409266d6dcef89cba6ada91d879291
Abseil Team committed -
Users should use `absl::HasAbslStringify` instead. PiperOrigin-RevId: 572916854 Change-Id: Ie67e076e0335b108d23f886a28074f7557ba045a
Abseil Team committed -
PiperOrigin-RevId: 572901486 Change-Id: Icb8b8c80cb8b99d9a3203f4971fc53fe64a1ae60
Derek Mauro committed -
See https://blog.bazel.build/2023/10/06/bwob-in-bazel-7.html PiperOrigin-RevId: 572883468 Change-Id: Ib6f8665bf28f3973ffa3f932d400636b3b97f08a
Derek Mauro committed
-
- 11 Oct, 2023 3 commits
-
-
PiperOrigin-RevId: 572612743 Change-Id: I4df4617cacf8fb73d3516537b8e6b63b42447b2e
Abseil Team committed -
PiperOrigin-RevId: 572591515 Change-Id: I7d2bd1f737efeeecb8a063ae94a696315bb14532
Derek Mauro committed -
PiperOrigin-RevId: 572575394 Change-Id: Ic1c5ac2423b1634e50c43bad6daa14e82a8f3e2c
Derek Mauro committed
-
- 10 Oct, 2023 1 commit
-
-
The layering_check feature ensures that rules that include a header explicitly depend on a rule that exports that header. Compiler support is required, and currently only Clang 16+ supports diagnoses layering_check failures. The parse_headers feature ensures headers are self-contained by compiling them with -fsyntax-only on supported compilers. PiperOrigin-RevId: 572350144 Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
Derek Mauro committed
-
- 09 Oct, 2023 1 commit
-
-
PiperOrigin-RevId: 571929102 Change-Id: I8fb907d047a4ff3bb42e7c7f99454fa687b8f1c9
Abseil Team committed
-
- 07 Oct, 2023 1 commit
-
-
PiperOrigin-RevId: 571487219 Change-Id: I6fbb2ff19db2b6d77e55059004d65c8639eb7fca
Abseil Team committed
-
- 06 Oct, 2023 5 commits
-
-
PiperOrigin-RevId: 571430428 Change-Id: I4777c37c5287d26a75f37fe059324ac218878f0e
Connal de Souza committed -
PiperOrigin-RevId: 571418371 Change-Id: Ie650a4e8c7a9fbb022b1d27e6800765b59fcfc0c
Abseil Team committed -
PiperOrigin-RevId: 571347014 Change-Id: I716ca435128081f0e9b0434143103df579256f50
Derek Mauro committed -
PiperOrigin-RevId: 571322393 Change-Id: I0e227b0075d3133ee28c8f766a1be7872c101176
Abseil Team committed -
This should make it more efficient to pass absl::Status parameters and return values, allowing them to be passed in a register. PiperOrigin-RevId: 571213728 Change-Id: I2a0183aedc08c270d0af0e7a30a07590ea116896
Abseil Team committed
-
- 05 Oct, 2023 1 commit
-
-
PiperOrigin-RevId: 571084409 Change-Id: I4e6c98ac11f4cb40b65cc9484188faa6168718b4
Abseil Team committed
-
- 04 Oct, 2023 1 commit
-
-
and those that call it can be inlined sufficiently far to mess up high-level skip-counts. But this function assumes it is the bottommost frame, as in the comment below. PiperOrigin-RevId: 570790048 Change-Id: I4d354f9e79e13aaa6a8a62a9e0870fbeac075de6
Abseil Team committed
-
- 03 Oct, 2023 3 commits
-
-
Use ABSL_RAW_LOG and ABSL_PREDICT_* for all debug checks in swisstable including sanitizer mode checks. Sanitizer mode can be used for canaries so performance is still relevant. This change also makes the code more uniform. PiperOrigin-RevId: 570438923 Change-Id: I62859160eb9323e6420680a43fd23e97e8a62389
Evan Brown committed -
Refactor swisstable copy/move assignment to fix issues with allocator propagation and improve performance. Correctness: - We use swap to implement copy assignment and move assignment, which means that allocator propagation in copy/move assignment depends on `propagate_on_container_swap` in addition to `propagate_on_container_copy_assignment`/`propagate_on_container_move_assignment`. - In swap, if `propagate_on_container_swap` is `false` and `get_allocator() != other.get_allocator()`, the behavior is undefined (https://en.cppreference.com/w/cpp/container/unordered_set/swap) - we should assert that this UB case isn't happening. For this reason, we also delete the NoPropagateOn_Swap test case in raw_hash_set_allocator_test. Performance: - Don't rely on swap so we don't have to do unnecessary copying into the moved-from sets. - Don't use temp sets in move assignment. - Default the move constructor of CommonFields. - Avoid using exchange in raw_hash_set move constructor. - In `raw_hash_set(raw_hash_set&& that, const allocator_type& a)` with unequal allocators and in move assignment with non-propagating unequal allocators, move set keys instead of copying them. PiperOrigin-RevId: 570419290 Change-Id: I499e54f17d9cb0b0836601f5c06187d1f269a5b8
Evan Brown committed -
This cl/ updates the link provided in the comment to point to a valid website. Currently the link points to https://screenshot.googleplex.com/BZhRp6mNJAtjMmz which is now a software company landing page. PiperOrigin-RevId: 570384723 Change-Id: Ib6d17851046125957e092b59d845ddb7ecb1f7b7
Abseil Team committed
-
- 02 Oct, 2023 2 commits
-
-
PiperOrigin-RevId: 570180405 Change-Id: If14b21a4d0df19546a47923a1f2a359b38fe6f93
Evan Brown committed -
We test for `ABSL_INTERNAL_HAS_RTTI` in `absl::container_internal::TypeName` before calling `typeid`. PiperOrigin-RevId: 570101013 Change-Id: I1f2f9b2f475a6beae50d0b88718b17b296311155
Abseil Team committed
-
- 27 Sep, 2023 3 commits
-
-
PiperOrigin-RevId: 568997790 Change-Id: I9899ccc95eeb9c8b92d0dceec7e2fc4a2b1102c0
Abseil Team committed -
PiperOrigin-RevId: 568858834 Change-Id: I276efa86259aa425c4b6dff27f037f488a58c9ae
Abseil Team committed -
PiperOrigin-RevId: 568845530 Change-Id: I8987053041423f1e8b122372f63b0a84e05eb594
Abseil Team committed
-
- 26 Sep, 2023 5 commits
-
-
PiperOrigin-RevId: 568665135 Change-Id: I42ec9bc6cfe923777f7b60ea032c7b64428493c9
Abseil Team committed -
PiperOrigin-RevId: 568652465 Change-Id: I9f72a11cb514eaf694dae589a19dc139891e7af2
Abseil Team committed -
Siryn's crc32 instruction seems to have latency 3 and throughput 1, which makes the optimal ratio of pmull and crc streams close to that of tested x86 machines. Up to +120% faster for large inputs. PiperOrigin-RevId: 568645559 Change-Id: I86b85b1b2a5d4fb3680c516c4c9044238b20fe61
Connal de Souza committed -
PiperOrigin-RevId: 568603611 Change-Id: I7a31e0d6336a7235a8dc6eeed5680625cb3b4298
Derek Mauro committed -
This also adds a test for `operator<<`. PiperOrigin-RevId: 568590367 Change-Id: Ia0ad39cb582e7d24e6c4131827818d8c4b10dfd9
Abseil Team committed
-