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
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 focuses on .cc files in */internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 473868797
Change-Id: Ibe0b76e33f9e001d59862beaac54fb47bacd39b2
In the time since pcg_engine.h was written, absl::uint128 was fixed to
generate identical code to __uint128_t
PiperOrigin-RevId: 471789541
Change-Id: Ibd1afc3e5e6d57af27cdd6a21171c96ea333161c
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 focuses on .cc files in */internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 471561809
Change-Id: I7abd6d83706f5ca135f1ce3458192a498a6280b9
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 focuses on .cc files in */internal/.)
Bug: chromium:1292951
PiperOrigin-RevId: 471549854
Change-Id: Id685d0e4666212926f4e001b8ef4930b6a33a4cc
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 focuses on .cc files in dirs n-t, except string.)
Bug: chromium:1292951
PiperOrigin-RevId: 465287204
Change-Id: I0fe98ff78bf3c08d86992019eb626755f8b6803e
This test indicates it has a 90% chance of timing out at its current 60 second limit.
Stats over 1000 runs: max = 102.5s, min = 40.4s, avg = 71.1s, dev = 11.2s
Note that if you run this test locally from a workstation without flags, it'll take maybe 3 to 5 seconds. However, the test is run with config of android_arm, which seems to drastically change the execution time.
PiperOrigin-RevId: 459503103
Change-Id: I7b7aaa2db7880370f47d1a83d295a3234f738a18
A few targets were missing `linkopts = ...` and so were not obeying
the project-wide default settings.
Omit any changes to cctz for now, because it's vendored from another project.
Decompose RandenPoolSeedSeq from NonsecureURBGBase.
Adjust how the RandenPoolSeedSeq detects contiguous buffers passed to the generate function. Previously it made incorrect assumptions regarding the contiguous concept, which have been replaced with some type-based tests for a small number of known contiguous random access iterator types, including raw pointers.
PiperOrigin-RevId: 452564114
Change-Id: Idab1df9dd078d8e5c565c7fa7ccb9c0d3d392ad2
uclibc-ng doesn't provide getauxval which results in the following build
failure on arm or ppc with any user of abseil-cpp such as grpc:
/home/buildroot/autobuild/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libabsl_random_internal_randen_hwaes.so.2111.0.0: undefined reference to `getauxval'
To fix this build failure, check that __UCLIBC__ is not defined before
using getauxval (as Babel is not able to check function availability)
Fixes:
- http://autobuild.buildroot.org/results/775f3ca3dedebff29e212b29dfa896b7613b7a02
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
--
d3b99682554d339c42556680f4d65f83226005e2 by Martijn Vels <mvels@google.com>:
Inline CycleClock code and remove branch for x86 CycleClockSource function
This CL removes the relaxed load for x86 as there is no acquire price to pay on x86. It inlines the UnscaledCycleClock::Now() which is a single RTDSC op for x86, and likewise inlines CycleClock::Now() for x86. The inlining should mostly have secondary benefits such as reducing spills on outlined calls.
LTO may eventually hoist these functions inline for the hotspots, but it doesn't hurt to default inline this for all builds and let the compiler decide on the first pass.
The perlab benchmark is noisy for the plain BM_Now, but the other benchmarks and the run on my local machine are clear.
------------- Local Benchy Benchmark
name old cpu/op new cpu/op delta
BM_Now 3.41ns ± 1% 2.30ns ± 2% -32.52% (p=0.000 n=50+50)
BM_NowWithRegisterPresure 4.96ns ± 2% 4.19ns ± 2% -15.57% (p=0.000 n=56+55)
BM_NowWithCallback 3.30ns ± 2% 1.91ns ± 2% -42.00% (p=0.000 n=47+60)
------------- Perflab Benchy Benchmark
name old cpu/op new cpu/op delta
BM_Now 8.20ns ±13% 4.32ns ±83% ~ (p=0.413 n=4+5)
BM_NowWithRegisterPresure 7.91ns ± 1% 3.68ns ± 2% -53.45% (p=0.029 n=4+4)
BM_NowWithCallback 2.66ns ±13% 1.58ns ± 0% -40.51% (p=0.008 n=5+5)
PiperOrigin-RevId: 434474766
Change-Id: I991d987ae9233e50f09606c874055cf4c5a56300
--
b38330686a0af176a2679163e4d2fa1b90e2f667 by Laramie Leavitt <lar@google.com>:
Style, comment, and test updates
* Remove a redundant assert in uniform_real_distribution.
* Update comment in internal/generate_real.h
* Style updates to uniform_real_distribution_test
mainly replacing TypeParam with real_type, using aliases for some limits, etc.
* Add a few more minor tests.
PiperOrigin-RevId: 433902174
Change-Id: Id75be8e24be2fb8f6aea05feec13e3ef320a7254
--
ab2da6047ff7f5dae3add3779fcddf73b03feabf by Abseil Team <absl-team@google.com>:
Remove declaration of method whose definition was previously removed.
PiperOrigin-RevId: 433507828
Change-Id: I0130b689813125250f7de2664e767e181f676c89
--
df0c87f4ec2c010691931c1bef9d26470a6e63a2 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 433289136
Change-Id: Iba157dc83ed99dafd17a2223d2504e49f8afbb9e
--
7445fa312f2995772900eda82467325b3401a17d by Martijn Vels <mvels@google.com>:
Optimize CordReader logic now that CONCAT is removed
This CL cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed, simplifying the CordReader logic.
PiperOrigin-RevId: 433208748
Change-Id: I5f7b1883573c44e7c6f8af12c3cddbd197cb134d
GitOrigin-RevId: d3b99682554d339c42556680f4d65f83226005e2
--
f0b7d230a90c82c6fee7adcb46a213d2582b6a7b by Martijn Vels <mvels@google.com>:
Optimize substring logic now that CONCAT is removed
This CL adds a static Substring() method to CordRepSubstring, and implements substring logic in cord.cc in terms of the new function. This cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed.
PiperOrigin-RevId: 431756805
Change-Id: I39c875b5af119916780e68598c7fc619fb2e8476
--
fa7d1bedf0e1244303844869a332c2a5dbd9ac0f by Derek Mauro <dmauro@google.com>:
Allow macro expansion within ABSL_FLAG and ABSL_DECLARE_FLAG args
PiperOrigin-RevId: 431721184
Change-Id: I6e19713fb541205d796f940998db5ee25178d55e
--
1b328badd92304ed1c634f23e1c191be57b7bb15 by Laramie Leavitt <lar@google.com>:
Add #include for std:: types
PiperOrigin-RevId: 431546757
Change-Id: I75efbcd3c77e6f53e4db66494101d30d670d988e
--
e25323b299d4d3840218702860f537cdd2a3926f by Thomas Köppe <tkoeppe@google.com>:
Add hashing support for pointers to member.
Also add tests for function pointers to the existing "pointer" test.
PiperOrigin-RevId: 431067588
Change-Id: I3686010635d9fee34c47a418b72402e10737cdbc
--
ab27b012a61cf10109fd51932b3b0b05ee78f32f by Laramie Leavitt <lar@google.com>:
Avoid use of std::pow in ChiSquare test.
PiperOrigin-RevId: 431015830
Change-Id: Idd767ff2f51009ee171de48757207b38330ffea3
--
28c359135d89061177958580fe4a7493802499cb by Laramie Leavitt <lar@google.com>:
Add #include <type_traits> for std::false_type
PiperOrigin-RevId: 431005757
Change-Id: I85a6a918778601e19512aaea744424cf39018521
--
a920730f23669479d92e3a696d65d0bc3a5b1de1 by Laramie Leavitt <lar@google.com>:
#include <utility> for std::declval
PiperOrigin-RevId: 431004934
Change-Id: I295237b2d44e9a15e4083698ea121b68ce0a1bb7
GitOrigin-RevId: f0b7d230a90c82c6fee7adcb46a213d2582b6a7b
--
ed829ac612f090375427c3488827c6e74deb2e3f by Derek Mauro <dmauro@google.com>:
Update latest GCC/Clang Linux tests to Bazel 5.0.0 and CMake 3.22.2
PiperOrigin-RevId: 429369775
--
76952303c4d942288c4e7657ffb5893cec54a132 by Martijn Vels <mvels@google.com>:
Optimize Cord::ChunkIterator now that CordRepConcat is removed
PiperOrigin-RevId: 429321455
--
dcd0d287793649aba9b98268c5783e449a34749f by Martijn Vels <mvels@google.com>:
Add IsDataEdge() and DataEdgeValue() helper functions.
This moves repetitive logic accessing data edges into its own header, and more strongly defines the notion of what a data edge is, enforcing the internal invariants. This will also be incorporated in optimized Cord iteration logic once CordRepConcat is totally removed from the Cord code.
PiperOrigin-RevId: 429307248
--
6a0903962155988085bf8656743fda9c4cdcba6c by Abseil Team <absl-team@google.com>:
Make it clear that the probability function given for the zipf distribution is unnormalized, i.e., sum(p(x) for x = 0..k) != 100%.
Quoting Section 7 of the paper cited in the comments, where this formula comes from (emphasis mine): "We will consider the two parameter generalization as defined in Dagpunar [1988] with the *unnormalized* probability function ..."
PiperOrigin-RevId: 429068258
--
3899ff6d444ba755148bc521a6ee031d9e9d4485 by Abseil Team <absl-team@google.com>:
Internal Changes
PiperOrigin-RevId: 428644856
--
319de702d2b537cbb76c4c71277ae89b349b162e by Benjamin Barenblat <bbaren@google.com>:
Support symbolization on PA-RISC
Null out supervisor bits in PA-RISC addresses before symbolizing, and
handle function descriptor tables correctly.
Change symbolize_test.cc to use 32-bit aligned addresses, allowing that
test to pass on PA-RISC.
PiperOrigin-RevId: 428590564
GitOrigin-RevId: ed829ac612f090375427c3488827c6e74deb2e3f
Change-Id: Ie01ff3b9365fd45e5a55f858038552679f3180d3
--
ceee18732f9499d3a53d46d5974f12ea0774b900 by Abseil Team <absl-team@google.com>:
Remove division from the profile guided optimization
PiperOrigin-RevId: 428444108
--
fc27059f1b0c0b4cb8ddd9a7a88220af52c0c755 by Evan Brown <ezb@google.com>:
Rename btree_node::leaf to is_leaf and also add is_internal for readability improvements.
PiperOrigin-RevId: 428076422
--
6a90d18477cc3a6de84282b6e38d6f294aa72748 by Evan Brown <ezb@google.com>:
In sanitizer mode, add generation integers to b-tree nodes and iterators and validate that iterators have not been invalidated already when they're used.
Even though generation integers are stored in all nodes, we only use the one stored in the root node for validation. The reason we keep one in all the nodes is that nodes can become a root node after they are allocated.
Also change the order of args in init_leaf to not violate the style guide.
PiperOrigin-RevId: 428054226
--
ede4a0f676f43e7003fd2599c263d55222e760ba by Martijn Vels <mvels@google.com>:
Physically remove CordRepConcat
This CL removes all uses of CordRepConcat. This change is executed by removing all the dead 'btree_enabled()' and 'IsConcat' branches, and all subsequent dead code. This change explicitly does not optimize any of the remaining code other than the most trivial ones such as removing 'stack' loop vars and loops.
PiperOrigin-RevId: 428002308
--
7cc83d96118149cf1aa1258a066b8fd4517df5f6 by Evan Brown <ezb@google.com>:
Change btree_iterator from a struct to a class.
Motivation: btree_iterator has private members and invariants so it should be a class.
Also merge two private sections.
PiperOrigin-RevId: 427768836
--
524d478b0af422e1a867a8823d9fbad149030360 by Martijn Vels <mvels@google.com>:
Physically block the creation of new CordRepConcat nodes.
This change removes CordRepConcat creation, issuing a FATAL errors on the (practically impossible) call path on broken invariants. This change is deliberately limited in impact, subsequent changes will be more voluminous ripping out the (now dead) CordRepConcat code.
PiperOrigin-RevId: 427741022
--
e21eb354c1bb358ea8b64d0e3fbb378e87b8b8c4 by Derek Mauro <dmauro@google.com>:
Update the implementation of ABSL_DEPRECATED to work with GCC, and
recommend using the standard attribute [[deprecated]] for C++14 and newer
GCC users that are experiencing new warnings can silence them with
-Wno-deprecated-declatations.
GCC users that want to see the warnings but not error on them can use
-Wno-error=deprecated-declarations.
PiperOrigin-RevId: 427228952
--
0ab4ee5660f3a072054dc4ab5056925c26977c7a by Laramie Leavitt <lar@google.com>:
Change comment to avoid overflow.
PiperOrigin-RevId: 427090218
GitOrigin-RevId: ceee18732f9499d3a53d46d5974f12ea0774b900
Change-Id: Ida00477b6a3d02a8b7bb467be7621b618385d1e9
--
dab53ef01a1c8ceebd1347a4918a0def0d7d4ce5 by Derek Mauro <dmauro@google.com>:
Migrate away from the remaining usages of GoogleTest's legacy TestCase API
and use the new TestSuite API instead
PiperOrigin-RevId: 424668744
GitOrigin-RevId: dab53ef01a1c8ceebd1347a4918a0def0d7d4ce5
Change-Id: I599de09f3349d18c2d74795b1f867fa6c99c3eed
--
75504b9d2eb7560359b98b69136d071f980e04f2 by Abseil Team <absl-team@google.com>:
Fix typos in documentation.
PiperOrigin-RevId: 423376798
--
bf87e5de48a868f49a57d516be027e6e3a3cc3bd by Gennadiy Rozental <rogeeff@google.com>:
Correct WEAK attribute enabling condition.
ABSL_ATTRIBUTE_WEAK is present if:
compiler has built-in attribute weak
OR
we are using gcc (and not clang)
AND
we are not on windows
OR
we use windows clang version >= 9.0.0
AND
we are not on MinGW
PiperOrigin-RevId: 423357629
--
a01a8f1b7ea3da4ec349db452162a3333953dd9d by Abseil Team <absl-team@google.com>:
There are magic numbers in the expected load factors and probe lengths, and they seem to be wrong especially under msvc. Even under the linux tool chain, these tests fail occasionally. Fix the magic numbers to make the tests succeed.
PiperOrigin-RevId: 423320829
--
fd109295a1425ca1cb2b69fe34a294b6189542c0 by Laramie Leavitt <lar@google.com>:
Manually align buffers in randen_engine.
In C++ it's implementation defined whether types with extended alignment are supported.
randen_engine uses vector intrinsics with 16-byte alignment requirements in
some instances, so internally we allocate an extra 8 bytes to manually align to 16.
No detectable performance impact.
PiperOrigin-RevId: 423109265
GitOrigin-RevId: 75504b9d2eb7560359b98b69136d071f980e04f2
Change-Id: I8c5ab2269ff6d9e89d3b4d0e95d36ddb6ce8096e
--
0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439 by Abseil Team <absl-team@google.com>:
Revise documentation of bit_cast:
* Removes inappropriate examples (round-tripping pointers, serialization), for which reinterpret_cast is more appropriate.
* Removes mention of "bit representation", which is not an explicit notion in C++. The best we get is "byte representation".
* Removes a circular defition of "bitcast" as itself, and instead explains what it does.
* Removes the mathism "for some values of", which is probably not totally accessible to a general audience, and in any case needless verbiage.
* Fixes comments in the example.
* Replaces some colloquialisms with simpler, more direct language.
PiperOrigin-RevId: 421791786
--
e04e64df55d93c1b9a09c0483b97cc4d8763260d by Derek Mauro <dmauro@google.com>:
Update Docker image to use GCC 11.2, Clang 14 (prerelease),
CMake 3.22.1, and Bazel 4.2.2
PiperOrigin-RevId: 421658559
--
d002bb3dc5cd1fc5b4cbd79a450efc894caa567c by Chris Kennelly <ckennelly@google.com>:
Add a small microbenchmark for absl::bit_width.
PiperOrigin-RevId: 421604852
--
131b057d1b76ecd7170421b48d661bb958ff676b by Evan Brown <ezb@google.com>:
Adds a disabled test for EBO in nested `CompressedTuple`s.
PiperOrigin-RevId: 421413134
--
e34c7876d3a1212d90c73c030ccae6169b682d43 by Jorg Brown <jorg@google.com>:
Show users a better error message if they pass a pointer to absl::Uniform.
PiperOrigin-RevId: 421090472
GitOrigin-RevId: 0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439
Change-Id: I5a004e8d17e974fa4897a09d1466ae8fc65dfdbb
An external project may depend on an Abseil `TESTONLY` library like
`absl::random_mocking_bit_gen`. Such a library should not be excluded
from build when Abseil's own tests are not built.
fixes#997
--
04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team <absl-team@google.com>:
Another implicit sign conversion found and removed.
PiperOrigin-RevId: 419718762
--
dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team <absl-team@google.com>:
Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare
PiperOrigin-RevId: 419658075
GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6
Change-Id: I18441488cc84f573c2818ee241c387e1953d5105
--
620668e56950d7cfc39db2cd321adf265199ad77 by Abseil Team <absl-team@google.com>:
absl::random compiles (at least for some cases) with -Wconversion -Wsign-compare
PiperOrigin-RevId: 419595521
--
746651e5fbcab6080d25c4eef8617fc289a448f6 by Abseil Team <absl-team@google.com>:
Annotate FlagImpl storage buffer
Flag type can contain legit uninitialized bits, e.g. padding.
When the code calls bit_cast as int64_t, it will contain those bits as well.
Then when we pass the int into the store it's UB for C++ and will be
reported by the new msan.
PiperOrigin-RevId: 418666492
GitOrigin-RevId: 620668e56950d7cfc39db2cd321adf265199ad77
Change-Id: Idd1190f5c98a0a13c4019f3d92cec0313822084c
--
07240ca7822d007cdcc79f2c40bd58b2c2010348 by Abseil Team <absl-team@google.com>:
Correct the comment from "AlphaNum" to "Arg".
PiperOrigin-RevId: 416139192
--
adcba4a6b3763626e1db7b1e8c108b3114903557 by Martijn Vels <mvels@google.com>:
Fix NewExternalRep() to require data being non-empty, and remove nullptr return.
PiperOrigin-RevId: 416135865
--
c0d14cd918fb16f15d1d84de9284b5c5ecc1f8f2 by Abseil Team <absl-team@google.com>:
Fix doc comment for absl::ascii_isprint().
The comment was incorrectly saying that it includes all whitespace.
It doesn't; the only whitespace char it includes is ' '.
PiperOrigin-RevId: 416112524
--
d83327800159c07002b6865e21232a12463e02dd by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 416099978
--
baf11e9ca42ca9140cdbf8075f971db8d65b1195 by Ilya Tokar <tokarip@google.com>:
Prevent compiler from optimizing Group_Match* benchmarks away.
Currently we benchmark single store of precomputed value.
Not all affected benchmarks show performance changes:
BM_Group_Match 0.53ns ± 1% 0.53ns ± 0% -0.42% (p=0.038 n=10+10)
BM_Group_MatchEmpty 0.26ns ± 1% 0.26ns ± 1% ~ (p=1.000 n=10+10)
BM_Group_MatchEmptyOrDeleted 0.26ns ± 1% 0.26ns ± 1% ~ (p=0.121 n=10+10)
BM_Group_CountLeadingEmptyOrDeleted 0.26ns ± 1% 0.45ns ± 0% +70.05% (p=0.000 n=10+8)
BM_Group_MatchFirstEmptyOrDeleted 0.26ns ± 0% 0.44ns ± 1% +65.91% (p=0.000 n=8+9)
But inspecting the generated code shows the difference,
e. g. BM_Group_MatchFirstEmptyOrDeleted
Before:
add $0xffffffffffffffff,%rbx
jne 30
After:
pcmpeqd %xmm0,%xmm0
pcmpgtb -0x30(%rbp),%xmm0
pmovmskb %xmm0,%eax
add: 0x23$0xffffffffffffffff,%rbx
jne 40
PiperOrigin-RevId: 416083515
--
122fbff893dc4571b3e75e4b241eb4495b925610 by Abseil Team <absl-team@google.com>:
Put namespace guard in ABSL_DECLARE_FLAG to make declaring a flag in a namespace a compiler error instead of a linker error.
PiperOrigin-RevId: 416036072
--
020fd8a20f5fa319e948846e003391fcb9e03868 by Ilya Tokar <tokarip@google.com>:
Make Cord::InlineRep::set_data unconditionally zero out memory.
Currently there is a single case where we don't zero out memory
as an optimization. Unconditional zeroing doesn't show any changes
in benchmarks, except for the unrelated improvement:
BM_CordPartialCopyToCord/1M/1 12.6ns ± 4% 12.6ns ± 4% ~ (p=0.857 n=16+19)
BM_CordPartialCopyToCord/1M/128 44.9ns ± 7% 45.0ns ± 3% ~ (p=0.468 n=18+17)
BM_CordPartialCopyToCord/1M/1k 64.5ns ± 4% 61.4ns ± 4% -4.82% (p=0.000 n=19+17)
BM_CordPartialCopyToCord/1M/8k 139ns ± 3% 128ns ±15% -7.76% (p=0.009 n=17+20)
BM_CordPartialCopyToCord/1M/16k 193ns ± 6% 168ns ± 6% -13.17% (p=0.000 n=17+17)
BM_CordPartialCopyToCord/4M/16k 199ns ± 4% 177ns ± 4% -11.36% (p=0.000 n=17+18)
BM_CordPartialCopyToCord/4M/32k 275ns ± 3% 250ns ± 4% -9.00% (p=0.000 n=18+18)
BM_CordPartialCopyToCord/4M/64k 291ns ± 4% 266ns ± 5% -8.53% (p=0.000 n=18+16)
BM_CordPartialCopyToCord/4M/128k 322ns ± 5% 291ns ± 4% -9.43% (p=0.000 n=20+18)
BM_CordPartialCopyToCord/8M/32k 281ns ± 5% 251ns ± 4% -10.38% (p=0.000 n=20+16)
BM_CordPartialCopyToCord/8M/64k 293ns ± 6% 267ns ± 4% -8.87% (p=0.000 n=16+19)
BM_CordPartialCopyToCord/8M/128k 334ns ± 3% 305ns ± 2% -8.56% (p=0.000 n=17+16)
This is clearly an alignmnet effect since number of the executed instructions is the same:
M_CordPartialCopyToCord/1M/1 155 ± 0% 155 ± 0% ~ (all samples are equal)
BM_CordPartialCopyToCord/1M/128 446 ± 0% 446 ± 0% ~ (p=0.332 n=36+39)
BM_CordPartialCopyToCord/1M/1k 473 ± 0% 473 ± 0% ~ (p=0.969 n=40+40)
BM_CordPartialCopyToCord/1M/8k 808 ± 0% 808 ± 0% ~ (p=0.127 n=40+39)
BM_CordPartialCopyToCord/1M/16k 957 ± 0% 957 ± 0% ~ (p=0.532 n=40+40)
BM_CordPartialCopyToCord/4M/16k 952 ± 0% 952 ± 0% ~ (p=0.686 n=39+39)
BM_CordPartialCopyToCord/4M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.690 n=40+40)
BM_CordPartialCopyToCord/4M/64k 1.23k ± 0% 1.23k ± 0% ~ (p=0.182 n=40+39)
BM_CordPartialCopyToCord/4M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.711 n=40+40)
BM_CordPartialCopyToCord/8M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.697 n=40+40)
BM_CordPartialCopyToCord/8M/64k 1.23k ± 0% 1.23k ± 0% +0.00% (p=0.049 n=40+40)
BM_CordPartialCopyToCord/8M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.507 n=40+40)
This makes code simpler and doesn't regress performance.
PiperOrigin-RevId: 415560574
--
37305b2690b31682088749e4d62f40d7095bdc54 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 415558737
--
86aaed569b9e743c1eb813a5f48def978a793db3 by Martijn Vels <mvels@google.com>:
Internal change
PiperOrigin-RevId: 415515201
--
6cdb8786cdcb4fa0b8a4b72fc98940877d1fdeff by Abseil Team <absl-team@google.com>:
Update SubmitMutexProfileData to accept wait_cycles instead of wait_timestamp
PiperOrigin-RevId: 415360871
--
9f979d307aa16ad09f214e04876cbe84395c0901 by Abseil Team <absl-team@google.com>:
absl::flat_hash_set compiles with -Wconversion -Wsign-compare
PiperOrigin-RevId: 415357498
--
9eceb14174708f15e61259d449b214a8a4c7f9e7 by Abseil Team <absl-team@google.com>:
Fix AddressIsReadable for the corner case of (aligned) addr == NULL.
PiperOrigin-RevId: 415307792
--
1a39ffe55898375e2d7f88c17c99db5a1b95b313 by Martijn Vels <mvels@google.com>:
Internal change
PiperOrigin-RevId: 415162872
--
64378549b110d5f5762185a5906c520fba70f0e7 by Abseil Team <absl-team@google.com>:
Fix a typo in the comments
PiperOrigin-RevId: 415088461
--
41aae8322e913b82710153c22b97c611fdb6e1fb by Abseil Team <absl-team@google.com>:
Switch from `connect` to `rt_sigreturn` -- the latter is much less problematic
for system call sandboxes.
PiperOrigin-RevId: 415073965
--
870c5e3388b6a35611bff538626fe7a1c8c87171 by Abseil Team <absl-team@google.com>:
Add ABSL_HAVE_HWADDRESS_SANITIZER and ABSL_HAVE_LEAK_SANITIZER
PiperOrigin-RevId: 414871189
--
f213ed60a66b58da7ac40555adfb1d529ff0a4db by Derek Mauro <dmauro@google.com>:
Remove reference to __SANITIZE_MEMORY__, which does not exist
It appears to have been copied by pattern matching from the ASAN/TSAN
code blocks.
f47662204d/gcc/cppbuiltin.c (L79-L126)
PiperOrigin-RevId: 414806587
--
b152891e73ab515f397ceb53f66c8ee2f33863ea by Abseil Team <absl-team@google.com>:
Rollback previous commit: SYS_open is not defined in certain environments.
PiperOrigin-RevId: 414521820
--
5a1cbb282331023902e1374dd0d920c4effbe47f by Abseil Team <absl-team@google.com>:
Use syscall(SYS_open, ...) instead of open() to avoid possible symbol
interposition.
Also add some warning notes.
PiperOrigin-RevId: 414508186
--
1824d6593612710aafdc599a89b0adced7d787f6 by Abseil Team <absl-team@google.com>:
Correct aarch64 macro check
The macro is __aarch64__, not __arch64__.
PiperOrigin-RevId: 414446225
--
a1536a57b64dfd53945d33a01cfc08b18c99c97b by Abseil Team <absl-team@google.com>:
Fix backwards comment in the last commit.
PiperOrigin-RevId: 414281214
--
11ac021ba779513667a31cf2563ddafc57d6d913 by Abseil Team <absl-team@google.com>:
AddressIsReadable() didn't work correctly on ARM when the given pointer was
misaligned at the end of the page.
Fix that by aligning the pointer on an 8-byte boundary before checking it.
PiperOrigin-RevId: 414203863
GitOrigin-RevId: 07240ca7822d007cdcc79f2c40bd58b2c2010348
Change-Id: If5f129194d59f5c9e5d84efd8cd9e17a70e072ab
--
a0847bf19789c97689f1a8b0133a53b8af5e5caa by Samuel Benzaquen <sbenza@google.com>:
Add support for absl::(u)int128 to random distributions and generators.
PiperOrigin-RevId: 411565479
GitOrigin-RevId: a0847bf19789c97689f1a8b0133a53b8af5e5caa
Change-Id: Ide434bdd93fcab8e90f791796498de14833b667c
--
05a099a580753f8e96cee38572e94dcdc079361b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405966217
--
c6b81e9ebc183d8389f14ecd091c8bad08cfe0aa by Abseil Team <absl-team@google.com>:
Add `inline_element_size` to hashtablez (so that we can compute the weighted load factors properly e.g., in b/187896534).
PiperOrigin-RevId: 405917711
--
3e3673de4e54e4142c54b09e1644dfa3de4bb296 by Abseil Team <absl-team@google.com>:
align indent of code comment in mutex.h
PiperOrigin-RevId: 405871997
--
2248301a5b14f8d2be5b2e9088f3528a353ea491 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 405639236
--
bc7d3c56fdad3dde4b89324af142529f2afe5f1b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405508045
--
66472387276ef02505d99195747be862768bb35b by Laramie Leavitt <lar@google.com>:
Also use uint8_t golden values in randen_test.cc
This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.
PiperOrigin-RevId: 405484423
GitOrigin-RevId: 05a099a580753f8e96cee38572e94dcdc079361b
Change-Id: I3dd5b0cfdb98d6e1ab02266194ba67d15428c2f8
--
30bbe72e8c32d8680bbe6c8473a884d485e9f684 by Laramie Leavitt <lar@google.com>:
Convert randen golden test to use byte arrays.
PiperOrigin-RevId: 404948438
--
4690d9ebd2c518708ad155e913b2140ebdf01234 by Laramie Leavitt <lar@google.com>:
Add golden tests for internal::ExplicitSeedSeeq against stable std:: random URBGs.
PiperOrigin-RevId: 404912608
--
52e9b24276ee3a21cc8a026f9d152ef8ced7f507 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 404861043
--
9e966a2a680970fd27d927cc6420e333b1378b1e by Abseil Team <absl-team@google.com>:
Roll back import of CCTZ from GitHub.
PiperOrigin-RevId: 404343587
--
9c4eedec00105b8288c0b91d96434aea08b8e3c3 by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 404314597
--
f171375fd7bec35cc34815be8faf5e000828b7bb by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 404098156
GitOrigin-RevId: 30bbe72e8c32d8680bbe6c8473a884d485e9f684
Change-Id: Ic7b5a3c0659e321e2f642800930a8de014253e2a
--
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
* 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>
--
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
--
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.
--
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
--
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
--
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
--
ac1df60490c9583e475e22de7adfc40023196fbf by Martijn Vels <mvels@google.com>:
Change Cord constructor(string_view) to explicit make_tree and Cordz tracking
This CL changes the ctor to use an easier to maintain model where Cord code explicitly invokes Cordz update or new / tree logic, which avoids the ambiguity of the 'branched' InlineRep::set_tree code. This removes the need to equip InlineRep with 'MethodIdentifier' or other necessary call info, and also is a cleaner model: InlineRep is carrying too much code now that should plainly sit in Cord, especially with all internal abstractions having moved to InlineData.
See child CL(s) for desired state
PiperOrigin-RevId: 369433619
--
b665af7f586e6c679a8b27d4f78d5a1d2b596058 by Abseil Team <absl-team@google.com>:
Rename the 'Compare' template type to 'LessThan', as the passed-in function is expected to act like operator<. It is worth avoiding confusion with std::compare, which returns an int (-1/0/1), as due to implicit casting this can lead to hard-to-spot bugs.
PiperOrigin-RevId: 369391118
--
c3c775269cad0f4982ec63f3616dd78bb9e52dca by Martijn Vels <mvels@google.com>:
Integrate CordzUpdateTracker into CordzInfo
PiperOrigin-RevId: 369348824
--
771d81ed357496c117179e1daec76eba5155932d by Martijn Vels <mvels@google.com>:
Replace mutex() with Lock() / Unlock() function
Mini design future tracking of CordzInfo sampled cords: CordzInfo holds a CordRep* reference without a reference count. Cord is responsible for synchronizing updates for sampled cords such that the CordRep* contained in CordzInfo is at all times valid. This is done by scoping Lock() and Unlock() calls around the code modifying the code of a sampled cord. For example (using the future CL CordzUpdateScope()):
CordzInfo* cordz_info = get_cordz_info();
CordzUpdateScope scope(cordz_info, CordzUpdateTracker::kRemovePrefix);
CordRep* rep = RemovePrefixImpl(root);
set_tree(rep);
if (cordz_info) {
cordz_info->SetCordRep(rep);
}
On CordzInfo::Unlock(), if the internal rep is null, the cord is no longer sampled, and CordzInfo will be deleted. Thus any update resulting in the Cord being inlined will automatically no longer be sampled.
PiperOrigin-RevId: 369338802
--
5563c12df04a1e965a03b50bdd032739c55c0706 by Martijn Vels <mvels@google.com>:
Add UpdateTracker to CordzStatistics
PiperOrigin-RevId: 369318178
--
6b4d8463722a3e55a3e8f6cb3741a41055e7f83e by Martijn Vels <mvels@google.com>:
Add kClear, kConstructor* and kUnknown values and fix typo
PiperOrigin-RevId: 369297163
--
041adcbc929789d6d53371a8236840fc350e1eeb by Derek Mauro <dmauro@google.com>:
Switch from malloc to operator new in pool_urbg.cc
so it can only fail by throwing/aborting
PiperOrigin-RevId: 369274087
--
5d97a5f43e3f2d02d0a5bbe586d93b5751812981 by Benjamin Barenblat <bbaren@google.com>:
Correct Thumb function bound computation in the symbolizer
On 32-bit ARM, all functions are aligned to multiples of two bytes, and
the lowest-order bit in a function’s address is ignored by the CPU when
computing branch targets. That bit is still present in instructions and
ELF symbol tables, though; it’s repurposed to indicate whether the
function contains ARM or Thumb code. If the symbolizer doesn’t ignore
that bit, it will believe Thumb functions have boundaries that are off
by one byte, so instruct the symbolizer to null out the lowest-order bit
after retrieving it from the symbol table.
PiperOrigin-RevId: 369254082
--
462bb307c6cc332c1e2c3adb5f0cad51804bf937 by Derek Mauro <dmauro@google.com>:
Add a check for malloc failure in pool_urbg.cc
GitHub #940
PiperOrigin-RevId: 369238100
GitOrigin-RevId: ac1df60490c9583e475e22de7adfc40023196fbf
Change-Id: Ic6ec91c62cd3a0031f6a75a43a83da959ece2d25
--
5ed5dc9e17c66c298ee31cefc941a46348d8ad34 by Abseil Team <absl-team@google.com>:
Fix typo.
PiperOrigin-RevId: 362040582
--
ac704b53a49becc42f77e4529d3952f8e7d18ce4 by Abseil Team <absl-team@google.com>:
Fix a typo in a comment.
PiperOrigin-RevId: 361576641
--
d20ccb27b7e9b53481e9192c1aae5202c06bfcb1 by Derek Mauro <dmauro@google.com>:
Remove the inline keyword from functions that aren't defined
in the header.
This may fix#910.
PiperOrigin-RevId: 361551300
--
aed9ae1dffa7b228dcb6ffbeb2fe06a13970c72b by Laramie Leavitt <lar@google.com>:
Propagate nice/strict/naggy state on absl::MockingBitGen.
Allowing NiceMocks reduces the log spam for un-mocked calls, and it enables nicer setup with ON_CALL, so it is desirable to support it in absl::MockingBitGen. Internally, gmock tracks object "strictness" levels using an internal API; in order to achieve the same results we detect when the MockingBitGen is wrapped in a Nice/Naggy/Strict and wrap the internal implementation MockFunction in the same type.
This is achieved by providing overloads to the Call() function, and passing the mock object type down into it's own RegisterMock call, where a compile-time check verifies the state and creates the appropriate mock function.
PiperOrigin-RevId: 361233484
--
96186023fabd13d01d32d60d9c7ac4ead1aeb989 by Abseil Team <absl-team@google.com>:
Ensure that trivial types are passed by value rather than reference
PiperOrigin-RevId: 361217450
--
e1135944835d27f77e8119b8166d8fb6aa25f906 by Evan Brown <ezb@google.com>:
Internal change.
PiperOrigin-RevId: 361215882
--
583fe6c94c1c2ef757ef6e78292a15fbe4030e35 by Evan Brown <ezb@google.com>:
Increase the minimum number of slots per node from 3 to 4. We also rename kNodeValues (and related names) to kNodeSlots to make it clear that they are about the number of slots per node rather than the number of values per node - kMinNodeValues keeps the same name because it's actually about the number of values rather than the number of slots.
Motivation: I think the expected number of values per node, assuming random insertion order, is the average of the maximum and minimum numbers of values per node (kNodeSlots and kMinNodeValues). For large and/or even kNodeSlots, this is ~75% of kNodeSlots, but for kNodeSlots=3, this is ~67% of kNodeSlots. kMinNodeValues (which corresponds to worst-case occupancy) is ~33% of kNodeSlots, when kNodeSlots=3, compared to 50% for even kNodeSlots. This results in higher memory overhead per value, and since this case (kNodeSlots=3) is used when values are large, it seems worth fixing.
PiperOrigin-RevId: 361171495
GitOrigin-RevId: 5ed5dc9e17c66c298ee31cefc941a46348d8ad34
Change-Id: I8e33b5df1f987a77112093821085c410185ab51a
--
e2de21d54c02b6419c57c0f4e2a16b608deca260 by Evan Brown <ezb@google.com>:
Remove the InsertEnd benchmark.
This benchmark has significantly different possible behaviors that can result in misleading metrics. Specifically, we can have a case where we are deallocating the last node in the b-tree in the erase and then allocating a new node in the insert call repeatedly, whereas normally, we end up just inserting/erasing a value from the last node. Also, the name of the benchmark is misleading because it involves an erase and an insert, but the name only mentions the insert.
PiperOrigin-RevId: 360930639
--
51f6bb97b9cbdb809c31b77e93ce080ca3cba9ea by Benjamin Barenblat <bbaren@google.com>:
Stop testing with double-double random variables
On POWER, long double is often represented as a pair of doubles added
together (double-double arithmetic). We’ve already special-cased
double-double arithmetic in a number of tests, but compiler
bugs [1, 2, 3] have now triggered both false positives and false
negatives, which suggests testing with double doubles is unlikely to
yield useful signal. Remove the special casing and detect if we’re on a
double-double system; if so, just don’t test long doubles.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048
[2] https://bugs.llvm.org/show_bug.cgi?id=49131
[3] https://bugs.llvm.org/show_bug.cgi?id=49132
PiperOrigin-RevId: 360793161
--
07fb4d7932c2f5d711c480f759dacb0be60f975e by Abseil Team <absl-team@google.com>:
internal change
PiperOrigin-RevId: 360712825
GitOrigin-RevId: e2de21d54c02b6419c57c0f4e2a16b608deca260
Change-Id: I98389b5a8789dcc8f35abc00c767e909181665f0
--
1a5831c2b4b85e0151b7952e47f4b80827937620 by Laramie Leavitt <lar@google.com>:
Implement FuzzingBitGen, an adapter which allows existing randomized tests which use absl::BitGenRef to easily integrate with fuzz testing.
I found myself implementing a similar option in our tensorstore project to fuzz test a storage layer and figured that it would be more useful as a common tool with defaults that take the non-random path.
This is similar to the FuzzedDataProvider mechanism which generates random values from a fuzz string, and is used to generate fuzz test inputs, and internally it uses FuzzedDataProvider.
The basic technique used here is to construct mocking lambdas for all of the absl mock distribution configurations, and forwarding the parameters to fuzzing-specific implementations that call into FuzzedDataProvider. The default paths for the distributions are either the bounds or a median value.
PiperOrigin-RevId: 358432715
--
e7968538c5ef5cd0b9822dbeac0f659b5e7d49b3 by Derek Mauro <dmauro@google.com>:
Give extern C symbols a unique name when the inline namespace
is given.
This partially addresses #851
PiperOrigin-RevId: 358403842
GitOrigin-RevId: 1a5831c2b4b85e0151b7952e47f4b80827937620
Change-Id: Id5ca0251498e390a8efa7210a17cc2cabb2c7dd8