| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
PiperOrigin-RevId: 588403935
Change-Id: I6a3af3c044b887ec65b19390d316cfb3ccdcc853
|
|
|
|
|
|
|
| |
This converts to UTF-8 regardless of locale.
PiperOrigin-RevId: 588186076
Change-Id: I2c9598279b413d460e13ad65da2ba421c0b40b83
|
|
|
|
|
|
|
|
|
|
|
| |
and the QCHECK flavors of these.
In particular, if ABSL_MIN_LOG_LEVEL exceeds kFatal, these should, upon failure, terminate the program without logging anything. The lack of logging should be visible to the optimizer so that it can strip string literals and stringified variable names from the object file.
Making some edge cases work under Clang required rewriting NormalizeLogSeverity to help make constraints on its return value more obvious to the optimizer.
PiperOrigin-RevId: 588181755
Change-Id: I95db3bae39f8dadb52a307ca3b80775db23de766
|
|
|
|
|
| |
PiperOrigin-RevId: 588121665
Change-Id: Id057772e426aefe2fe7b2f1e94fd405b97167fed
|
|
|
|
|
|
|
|
|
|
|
|
| |
types when they are available.
This makes them interchangeable in contexts known to be compiled as C++20.
This also makes `absl::` ordering types compatible with `<=>`, allowing to
unconditionally use `absl::` spelling for types but conditionally use `<=>`
when available.
PiperOrigin-RevId: 588085408
Change-Id: I1aa5247f0e31acbb838ee76829b7a13c74b0a94f
|
|
|
|
|
|
|
| |
These are methods for configurable verbose logging
PiperOrigin-RevId: 588059727
Change-Id: Ib3703edd2493050a5da8b30e88b21adc643b1f7f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The corresponding `std` types were removed before C++20 was finalized:
https://wg21.link/P1959R0.
They are unused. The language mechanisms and recommendations changed since they
were originally proposed. In particular:
* An explicitly defaulted `operator==` is defined in terms of memberwise
`operator==` rather than sibling `operator<=>`.
* An `operator!=` can be implicitly added to an overload set in terms of
`operator==` rather than `operator<=>`.
* A class which has equality but not ordering defined should provide
`operator==` rather than `operator<=>`.
PiperOrigin-RevId: 587834267
Change-Id: I2c2513c13f3485b9edc6a345dca4a577d8e65167
|
|
|
|
|
|
|
|
|
| |
without SSE)
Closes #1575
PiperOrigin-RevId: 586009018
Change-Id: Icc34c1201268303dde96bfbb067506b861754b3a
|
|
|
|
|
| |
PiperOrigin-RevId: 585892739
Change-Id: I30490dac5826bff2a33d9872f71154d360f9cc0d
|
|
|
|
|
| |
PiperOrigin-RevId: 585691325
Change-Id: Icd18dc0294dfd1e22f9878b628d5e5898fcc8185
|
|
|
|
|
| |
PiperOrigin-RevId: 584675181
Change-Id: I78c9a29055327c84f1e78b8440221439839a041c
|
|
|
|
|
|
|
| |
This reduces produced binary size and can trigger even more optimizations in the future.
PiperOrigin-RevId: 584136517
Change-Id: I3854833799f88f28b755ec53132925f0c3d468ab
|
|
|
|
|
|
|
| |
- libc++ throws errors when filesystem is included when disabled
PiperOrigin-RevId: 583474609
Change-Id: I205edc5c508f12b84244912f9acc47308a8ca540
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is somewhat tricky to implement because path equality is not
straightforward. See
https://github.com/abseil/abseil-cpp/pull/1560#issuecomment-1799983471
for discussion.
This re-lands 3bd86026c93da5a40006fd53403dff9d5f5e30e3 with a fix
for iOS 13 unavailability of std::filesystem::path.
Roll-forward of 524ebb7ea91d2955dc4c68c7e6fd2bed620621b5.
Closes #655
Closes #1560
PiperOrigin-RevId: 583365100
Change-Id: Id49735c49d123e0cd6a620a2b5b5a12d94129f94
|
|
|
|
|
| |
PiperOrigin-RevId: 583235586
Change-Id: Ia472b8d6530fd829fed1c07558e152975d9b24ac
|
|
|
|
|
|
|
| |
'path' is unavailable: introduced in iOS 13.0
PiperOrigin-RevId: 583036562
Change-Id: I5aea530d03c3317896c3c15bcf7cb5f9d8bc466a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is somewhat tricky to implement because path equality is not
straightforward. See
https://github.com/abseil/abseil-cpp/pull/1560#issuecomment-1799983471
for discussion.
Closes #655
Closes #1560
PiperOrigin-RevId: 582863821
Change-Id: I03517a7f2003614c027c786abbfb91b6571ab662
|
|
|
|
|
| |
PiperOrigin-RevId: 582861689
Change-Id: Iac257539ab282e9bfdc6d90e86c8da0c0d57b9c9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
absl::Symbolize does tons of tiny reads. Speed this up by switching
from lseek+read to a pread, and by reading more data than requested
into a buffer.
A faster absl::Symbolize will be helpful in tests and when printing
stack traces on /threadz etc.
Results for absl::Symbolize benchmark that exercises uncached behavior
of absl::Symbolize:
```
name old time/op new time/op delta
BM_Symbolize 16.4ms ±12% 2.6ms ± 0% -84.06% (p=0.001 n=5+9)
```
PiperOrigin-RevId: 582687566
Change-Id: I44caf189d81867f3fd8c050a3100a4b9a8e744d7
|
|
|
|
|
| |
PiperOrigin-RevId: 582455513
Change-Id: Ic78d14d6dd748420a64e7026ec7f8b967bebbf42
|
|
|
|
|
| |
PiperOrigin-RevId: 582426024
Change-Id: Ic8650de4faff9688f4cb5529c1df9bc752878b5a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current behavior of decaying the array to a pointer and hashing the
pointer can lead to subtle bugs.
The most common potential error is passing a C-string literal. Hashing
the char pointer in those cases is correct only if the string literals
are guaranteed to be deduplicated, which is dangerous to rely on even
if true (and the call sites in header files require deduplication
across translation units). After this change, these call-sites
requires wrapping the literal in absl::string_view.
This is a breaking change for code doing something like
absl::HashOf("string");
Instead, this should be changed to
absl::HashOf(absl::string_view("string"));
PiperOrigin-RevId: 582393585
Change-Id: I3810c07b5b74bf153cb62a7beedce243be5a69ee
|
|
|
|
|
| |
PiperOrigin-RevId: 582342910
Change-Id: Iada5420867779ed352d8fb0695ff6d6044acfba2
|
|
|
|
|
|
|
| |
disabled. This will make it easier to roll back and forwards in the future (if needed) without causing merge conflicts in unrelated code.
PiperOrigin-RevId: 582059046
Change-Id: I66dc6527e7a0b351367b7a391c2d653fe793143f
|
|
|
|
|
| |
PiperOrigin-RevId: 582033534
Change-Id: I9af42210f65b40ccd7f55c9a2e0c8387b69760dc
|
|
|
|
|
| |
PiperOrigin-RevId: 580726428
Change-Id: I12b0f22c2084aef90bcca67536220a6bb550b57e
|
|
|
|
|
| |
PiperOrigin-RevId: 580596792
Change-Id: I2f79c9b719e7e95a181b6641e8da191cf0a4d71a
|
|
|
|
|
|
|
|
|
| |
absl::NoDestructor<T> wraps an existing type and is used for defining a
static type that does not need to be destructed upon program exit. Instead,
such an object survives during program exit, and can be safely accessed at
any time after construction.
PiperOrigin-RevId: 580566259
Change-Id: I2cbb4cd9f6b50b98a793acd2ef0a4befd541f17f
|
|
|
|
|
|
|
|
|
|
|
| |
and use StdcppWaiter instead.
There are various flavors of MinGW, some of which support pthread,
and some of which support Win32. Instead of figuring out which
platform is being used, just use the generic implementation.
PiperOrigin-RevId: 580565507
Change-Id: Ia85fd7496f1e6ebdeadb95202f0039e844826118
|
|
|
|
|
| |
PiperOrigin-RevId: 580538328
Change-Id: I2699c77eeb68708584231d86ae2c0fca4870c17e
|
|
|
|
|
| |
PiperOrigin-RevId: 580515441
Change-Id: I64999b11f1d83d56ed3680cb2d41c8a1d5f389de
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can determine the signal stack, so use that information to
make better decisions about when to calculate the frame size
and when not to. This fixes a several tests where the memory
layout had the signal stack and main stack in position that
confused some of the greater-than/less-than comparisons.
Also cleanup certain types to avoid more casting than necessary.
PiperOrigin-RevId: 580221819
Change-Id: I0365b03e7893741603dc66e6d36a069d0b7f5404
|
|
|
|
|
|
|
|
|
| |
This allows for avoiding e.g. it.inner_.slot_ on const iterators.
Also, refactor HashtableDebugAccess::AllocatedByteSize to use regular iteration instead of looking directly at control/slot_array of the table in order to support small object optimization.
PiperOrigin-RevId: 580194253
Change-Id: I64cd69287834ee5c7a8daf867c532258806bfb7b
|
|
|
|
|
| |
PiperOrigin-RevId: 579852413
Change-Id: I1eddd70a4bee974e3a5109109ddfc4b4fd8f421e
|
|
|
|
|
| |
PiperOrigin-RevId: 579263069
Change-Id: I78678c2fc6aba4851f8a06dafb695c913accf0d0
|
|
|
|
|
|
|
| |
cause pointers to elements to be invalidated.
PiperOrigin-RevId: 578920671
Change-Id: Ica40db48d5565b606e5e5f501c1305612b193d4d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1559
```
//absl/hash/internal/hash.h:633:21: error: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Werror=sign-compare]
```
This warning is specific to the hashing of `std::bitset<>` on Big Endian platforms such as s390x
Merge 3f34d808c8689ffa47a798112ab44c0e3b32faa4 into 065d50d9f835cce8e4ee8f6d595518c409669901
Merging this change closes #1559
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1559 from aligusnet:20211102.0-mongo 3f34d808c8689ffa47a798112ab44c0e3b32faa4
PiperOrigin-RevId: 578897545
Change-Id: Ifd1c947af3ad01e8e2a6241030ed29fb00842d53
|
|
|
|
|
|
|
| |
that may have been invalidated by a container move.
PiperOrigin-RevId: 578649798
Change-Id: Icfee98d3a0399b545ec6ec59c5b52ae5e006218b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Mutex destructor is needed only to clean up debug logging
and invariant checking synch events. These are not supposed
to be used in production, but the non-empty destructor has
costs for production builds.
Instead of removing synch events in destructor,
drop all of them if we accumulated too many.
For tests is should not matter (we maybe only consume
a bit more memory). Production builds should be either unaffected
(if don't use debug logging), or use periodic reset of all synch events.
PiperOrigin-RevId: 578123259
Change-Id: I0ec59183a5f63ea0a6b7fc50f0a77974e7f677be
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are also avoiding potential cache-misses, by avoiding load.
name old speed new speed delta
BM_Searchcase 3.09GB/s ±13% 3.20GB/s ±16% +3.69% (p=0.039 n=20+17)
BM_SearchcaseMedium 1.08GB/s ± 7% 1.04GB/s ±14% ~ (p=0.814 n=16+20)
BM_SearchcasePathological 618kB/s ±13% 652kB/s ± 6% +5.55% (p=0.043 n=20+16)
BM_Memcasematch 2.43GB/s ± 3% 2.45GB/s ± 3% ~ (p=0.488 n=17+16)
BM_MemcasematchMedium 230MB/s ± 8% 261MB/s ±14% +13.77% (p=0.000 n=16+20)
BM_MemcasematchPathological 624kB/s ±14% 619kB/s ±14% ~ (p=0.836 n=20+20)
PiperOrigin-RevId: 577919033
Change-Id: I31324e04b6a577c582ad630d171d3b41d826f1e4
|
|
|
|
|
|
|
| |
constructors/destructors don't make reentrant calls to raw_hash_set member functions.
PiperOrigin-RevId: 577877803
Change-Id: I254c589b00cadec6ff95dfd60a8a38ab303c1af5
|
|
|
|
|
|
|
| |
#1558
PiperOrigin-RevId: 577874842
Change-Id: I1d56f3f4b445f6c4a9df2fe06fec542cb00e0e92
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently Mutex::Lock contains not inlined non-tail call:
TryAcquireWithSpinning -> GetMutexGlobals -> LowLevelCallOnce -> init closure
This turns the function into non-leaf with stack frame allocation
and additional register use. Remove this non-tail call to make the function leaf.
Move spin iterations initialization to LockSlow.
Current Lock happy path:
00000000001edc20 <absl::Mutex::Lock()>:
1edc20: 55 push %rbp
1edc21: 48 89 e5 mov %rsp,%rbp
1edc24: 53 push %rbx
1edc25: 50 push %rax
1edc26: 48 89 fb mov %rdi,%rbx
1edc29: 48 8b 07 mov (%rdi),%rax
1edc2c: a8 19 test $0x19,%al
1edc2e: 75 0e jne 1edc3e <absl::Mutex::Lock()+0x1e>
1edc30: 48 89 c1 mov %rax,%rcx
1edc33: 48 83 c9 08 or $0x8,%rcx
1edc37: f0 48 0f b1 0b lock cmpxchg %rcx,(%rbx)
1edc3c: 74 42 je 1edc80 <absl::Mutex::Lock()+0x60>
... unhappy path ...
1edc80: 48 83 c4 08 add $0x8,%rsp
1edc84: 5b pop %rbx
1edc85: 5d pop %rbp
1edc86: c3 ret
New Lock happy path:
00000000001eea80 <absl::Mutex::Lock()>:
1eea80: 48 8b 07 mov (%rdi),%rax
1eea83: a8 19 test $0x19,%al
1eea85: 75 0f jne 1eea96 <absl::Mutex::Lock()+0x16>
1eea87: 48 89 c1 mov %rax,%rcx
1eea8a: 48 83 c9 08 or $0x8,%rcx
1eea8e: f0 48 0f b1 0f lock cmpxchg %rcx,(%rdi)
1eea93: 75 01 jne 1eea96 <absl::Mutex::Lock()+0x16>
1eea95: c3 ret
... unhappy path ...
PiperOrigin-RevId: 577790105
Change-Id: I20793534050302ff9f7a20aed93791c088d98562
|
|
|
|
|
| |
PiperOrigin-RevId: 577180526
Change-Id: Iec53709456805ca8dc5327669cc0f6c95825d0e9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Mutex destructor is needed only to clean up debug logging
and invariant checking synch events. These are not supposed
to be used in production, but the non-empty destructor has
costs for production builds.
Instead of removing synch events in destructor,
drop all of them if we accumulated too many.
For tests is should not matter (we maybe only consume
a bit more memory). Production builds should be either unaffected
(if don't use debug logging), or use periodic reset of all synch events.
PiperOrigin-RevId: 577106805
Change-Id: Icaaf7166b99afcd5dce92b4acd1be661fb72f10b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to https://stackoverflow.com/a/68939636 it is safe to use
__m128i instead.
https://learn.microsoft.com/en-us/cpp/intrinsics/x86-intrinsics-list?view=msvc-170 also uses this type instead
__m128i_u is just __m128i with a looser alignment requirement, but
simply calling _mm_loadu_si128() instead of _mm_load_si128() is enough to
tell the compiler when a pointer is unaligned.
Fixes #1552
PiperOrigin-RevId: 576931936
Change-Id: I7c3530001149b360c12a1786c7e1832754d0e35c
|
|
|
|
|
| |
PiperOrigin-RevId: 576884571
Change-Id: I7bfe68e5aedd8563f8e6dbdb5d7cc66e9af22567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1553
OpenBSD will remove its generic syscall(2) interface, so setting the ABSL_HAVE_SYSCALL_WRITE define will result in a linking failure soon.
Make direct use of the write(2) syscall instead. OpenBSD's libc does not do any buffering for write, so there is no change of behavior.
A [variant of this patch][1] has been in use since early this year in OpenBSD's ports. There's no need to set ABSL_LOW_LEVEL_WRITE_SUPPORTED since that's already done a few lines up.
[1]: https://github.com/openbsd/ports/commit/5f9e56cd982c1f1fa5af867e56355091e1817786
Merge 0dcc88a3cdab513c598587d85423135e85cec330 into b841db22f8d1d9cdbaacecf2e7c87ce270f8d96f
Merging this change closes #1553
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1553 from botovq:openbsd-syscall 0dcc88a3cdab513c598587d85423135e85cec330
PiperOrigin-RevId: 576552197
Change-Id: I13466703ddc9d50edf87da5d0c291aad642af49a
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if a thread already blocked on a Mutex,
but then failed to acquire the Mutex, we queue it in FIFO order again.
As the result unlucky threads can suffer bad latency
if they are requeued several times.
The least we can do for them is to queue in LIFO order after blocking.
PiperOrigin-RevId: 576174725
Change-Id: I9e2a329d34279a26bd1075b42e3217a5dc065f0a
|
|
|
|
|
| |
PiperOrigin-RevId: 576162408
Change-Id: Ib383bb744b5cb11b6cbc99f2323583e1d23d8ff1
|