aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Minor wording fix in the comment for ConsumeSuffix()Abseil Team2022-06-101-1/+1
| | | | | PiperOrigin-RevId: 454305599 Change-Id: I528dfe0223280c379d8791373dc2871ad5812f63
* Tweak the signature of status_internal::MakeCheckFailString as part of an ↵Andy Getzendanner2022-06-102-7/+6
| | | | | | | upcoming change PiperOrigin-RevId: 454251164 Change-Id: I256b7a662478f9317a4133ec209fa5488a942886
* Fix several typos in comments.Abseil Team2022-06-102-17/+17
| | | | | PiperOrigin-RevId: 454185620 Change-Id: Ifdff33cec4bdd63f160a8d3c18f959ac2a3b6f25
* Reformulate documentation of ABSL_LOCKS_EXCLUDED.Abseil Team2022-06-101-2/+2
| | | | | | | The intent of the macro is to say what locks cannot be held when calling the method, not making a promise that they will be acquired. PiperOrigin-RevId: 454158686 Change-Id: I71087460c3df27c7d6e0571156f19f525024f1de
* absl/base/internal/invoke.h: Use ABSL_INTERNAL_CPLUSPLUS_LANG for language ↵Dino Radakovic2022-06-091-3/+3
| | | | | | | version guard PiperOrigin-RevId: 453970585 Change-Id: Iac23eb88ea676efc822f001020b1cc2c255dbbc1
* Fix C++17 constexpr storage deprecation warningsDerek Mauro2022-06-0919-22/+87
| | | | | | | | | | | | | | | | | | | This change introduces the symbol ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL to guard redundant declarations of static constexpr data members that are needed prior to C++17. This change also introduces the symbol ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set to the same value as __cplusplus, except it uses _MSVC_LANG on MSVC so that the value is correct on MSVC. Neither of these new symbols should be used outside of Abseil. Fixes #1191 PiperOrigin-RevId: 453923908 Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862
* Optimize SwissMap iteration by another 5-10% for ARMAbseil Team2022-06-093-49/+11
| | | | | | | | | | | | | | | | | | | https://pastebin.com/fDvgWgHe After having a chat with Dougall Johnson (https://twitter.com/dougallj/status/1534213050944802816), we realized that __clzll works with zero arguments per documentation: https://developer.arm.com/documentation/101028/0009/Data-processing-intrinsics ``` Returns the number of leading zero bits in x. When x is zero it returns the argument width, i.e. 32 or 64. ``` Codegen improves https://godbolt.org/z/ebadf717Y Thus we can use a little bit different construction not involving CLS but using more understandable CLZ and removing some operations. PiperOrigin-RevId: 453879080 Change-Id: Ie2d7f834f63364d7bd50dd6a682c107985f21942
* Add documentation on optional flags to the flags library overview.Tom Manshreck2022-06-082-0/+41
| | | | | PiperOrigin-RevId: 453766125 Change-Id: Id4d88ae20bdadc960a65bc1010eea746f1eba051
* absl: correct the stack trace path on RISCVSaleem Abdulrasool2022-06-081-14/+11
| | | | | | | | | | | | | | | | | | | When we would perform a stacktrace using the frame pointer walking, because we did the adjustment for the return address separately, we were misaligning the stack size and frame. Simplify the logic and correct the offset. The recovered frame pointer provides us with the return address of the current frame and the previous frame's frame pointer. Subsequently, we decide if we want to record this frame or not. The value in `next_frame_pointer` already points to the value from the previous stack frame (that is the next frame pointer to iterate). As such, the value computed by `ComputeStackFrameSize` is the value for the current frame. This was offset by one previously. Take the opportunity to clean up some of the local comments, fixing typos and splitting up the comments to reflect the lines that they are associated with. PiperOrigin-RevId: 453744059 Change-Id: If14813e0ac36f327f4b7594472f2222d05c478aa
* Merge pull request #1194 from jwnimmer-tri:default-linkoptsCopybara-Service2022-06-076-0/+26
|\ | | | | | | | | PiperOrigin-RevId: 453455549 Change-Id: Ib7c3d843d537e30d4086428dad539d162357308e
| * Obey ABSL_DEFAULT_LINKOPTS for all cc_library targetsJeremy Nimmer2022-06-066-0/+26
| | | | | | | | | | | | | | 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.
* | Remove unintended defines from config.hJames Y Knight2022-06-071-23/+0
|/ | | | | PiperOrigin-RevId: 453429588 Change-Id: Id377cd89dc807da80a33a8549f4e59bd935aff93
* Ignore invalid TZ settings in testsBenjamin Barenblat2022-06-061-4/+13
| | | | | | | | | | | | | For portability, absl_time_test builds a small, incomplete tzdata database into the test binary and uses that instead of the system tzdata database. (absl_time_test needs to run on some platforms that lack a system tzdata database.) However, this causes issues if TZ is set to something that isn’t in the test database. To address them, fall back to America/Los_Angeles if TZ is set to an unknown value during testing. Bug: https://bugs.debian.org/1012194 PiperOrigin-RevId: 453257912 Change-Id: I293d0f96876b31c32a2847468a3377bb49f3aa15
* Add ABSL_HARDENING_ASSERTs to CordBuffer::SetLength() andDerek Mauro2022-06-061-2/+3
| | | | | | | CordBuffer::IncreaseLengthBy() PiperOrigin-RevId: 453243686 Change-Id: If109da6be651006d4d9820bcc10eddfb56deaea2
* Fix comment typo about absl::Status<T*>Derek Mauro2022-06-061-2/+2
| | | | | PiperOrigin-RevId: 453241556 Change-Id: Ia92d737b6a678e3a4eda965056503392af44486a
* In b-tree, support unassignable value types.Evan Brown2022-06-064-58/+80
| | | | | | | Avoid using value move/swap and delete those functions from slot_policy types. There was only one use of params_type::move in `erase`. PiperOrigin-RevId: 453237739 Change-Id: Ie81c6dba6c4db34e97a067d2c0defcded8044a5a
* Optimize SwissMap for ARM by 3-8% for all operationsAbseil Team2022-06-064-98/+176
| | | | | | | | | | | https://pastebin.com/CmnzwUFN The key idea is to avoid using 16 byte NEON and use 8 byte NEON which has lower latency for BitMask::Match. Even though 16 byte NEON achieves higher throughput, in SwissMap it's very important to catch these Matches with low latency as probing on average happens at most once. I also introduced NonIterableMask as ARM has really great cbnz instructions and additional AND on scalar mask had 1 extra latency cycle PiperOrigin-RevId: 453216147 Change-Id: I842c50d323954f8383ae156491232ced55aacb78
* Release absl::CordBufferDerek Mauro2022-06-069-1/+1367
| | | | | | | | | absl::CordBuffer holds data for eventual inclusion within an existing absl::Cord. CordBuffers are useful for building large Cords that may require custom allocation of its associated memory, a pattern that is common in zero-copy APIs. PiperOrigin-RevId: 453212229 Change-Id: I6a8adc3a8d206691cb1b0001a9161e5080dd1c5f
* InlinedVector: Limit the scope of the maybe-uninitialized warning suppressionDerek Mauro2022-06-062-2/+13
| | | | | | | Due to changes in GCC 12, without this change, the warning fires PiperOrigin-RevId: 453197246 Change-Id: I2e31cbff1707ab09868cf77dcf040b033984e654
* Improve the compiler error by removing some noise from it.Samuel Benzaquen2022-06-031-1/+2
| | | | | | | The "deleted" overload error is useless to users. By passing some dummy string to the base class constructor we use a valid constructor and remove the unintended use of the deleted default constructor. PiperOrigin-RevId: 452826509 Change-Id: I5430a373c8e7e3a13336d2c42899e0e59444620b
* Merge pull request #714 from kgotlinux:patch-2Copybara-Service2022-06-021-1/+6
|\ | | | | | | | | PiperOrigin-RevId: 452619005 Change-Id: I6c120f9e7bbabe3b00821adc441608ae9118bee6
| * Added neccessary headers for FreeBSDkgotlinux2020-06-161-1/+3
| | | | | | | | | | 1. Changed order of sys/sysctl.h, because sysctl.h needs types.h 2. Threads.h is neccessary for once_flag 3. absl/base/call_once.h is neccessary for LowLevelCallOnce
* | Include proper #includes for POSIX thread identity implementation when using ↵Andy Getzendanner2022-06-021-1/+1
| | | | | | | | | | | | | | | | | | that implementation on MinGW. Fixes #1124 PiperOrigin-RevId: 452596638 Change-Id: Iab34b8e112dc050ffe346a418fa7b499983f0dcf
* | Rework NonsecureURBGBase seed sequence.Laramie Leavitt2022-06-025-118/+109
| | | | | | | | | | | | | | | | | | 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
* | Disable tests on some platforms where they currently fail.Tom Rybka2022-06-028-1/+75
| | | | | | | | | | PiperOrigin-RevId: 452542838 Change-Id: I45d80b220c0450d27423bb23504e95c25811877b
* | Fixed typo in a comment.Abseil Team2022-06-021-1/+1
| | | | | | | | | | PiperOrigin-RevId: 452537510 Change-Id: I7d2a19d1206aa08fce131bacda461fdefebe8713
* | Rollforward of commit ea78ded7a5f999f19a12b71f5a4988f6f819f64f.Anqi D2022-05-311-9/+13
| | | | | | | | | | PiperOrigin-RevId: 452161150 Change-Id: Ia5515eae52502ca0b79c7e7dff0a57aa5899e354
* | Add an internal helper for logging (upcoming).Greg Falcon2022-05-312-0/+21
| | | | | | | | | | PiperOrigin-RevId: 452134803 Change-Id: I8660df850ab537c441399545b25eb32399b2a3ef
* | Merge pull request #1187 from trofi:fix-gcc-13-buildCopybara-Service2022-05-311-0/+1
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 452110436 Change-Id: I3cb870935932c7e2895c8a7f019f375ad707ee77
| * | absl/strings/internal/str_format/extension.h: add missing <stdint.h> includeSergei Trofimovich2022-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without the change absl-cpp build fails on this week's gcc-13 snapshot as: /build/abseil-cpp/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::' 34 | enum class FormatConversionChar : uint8_t; | ^ | ::
* | | Merge pull request #1189 from renau:masterCopybara-Service2022-05-311-2/+2
|\ \ \ | | | | | | | | | | | | | | | | PiperOrigin-RevId: 452108013 Change-Id: I71fa7bc792d34327680dc3daa96a8d6d4116b49a
| * | | Avoid variable shadowing which can be a compile error depending on compile flagsJose Renau2022-05-301-2/+2
| |/ /
* | | Allow for using b-tree with `value_type`s that can only be constructed by ↵Evan Brown2022-05-316-30/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the allocator (ignoring copy/move constructors). We were using `init_type`s for temp values that we would move into slots, but in this case, we need to have actual slots. We use node handles for managing slots outside of nodes. Also, in btree::copy_or_move_values_in_order, pass the slots from the iterators rather than references to values. This allows for moving from map keys instead of copying for standard layout types. In the test, fix a couple of ClangTidy warnings from missing includes and calling `new` instead of `make_unique`. PiperOrigin-RevId: 452062967 Change-Id: I870e89ae1aa5b3cfa62ae6e75b73ffc3d52e731c
* | | Stop using sleep timeouts for Linux futex-based SpinLockDerek Mauro2022-05-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timeouts were once necessary when the SpinLock Unlock used an atomic store and could therefore have a race and a missed wakeup, however, the Unlock path now uses an atomic exchange, so the missed wakeup cannot happen. Fixes #1179 PiperOrigin-RevId: 452047517 Change-Id: I844944879b51b7f7ddac148e063a376cddd0d05a
* | | Automated rollback of commit f2463433d6c073381df2d9ca8c3d8f53e5ae1362.Abseil Team2022-05-311-13/+9
| | | | | | | | | | | | | | | PiperOrigin-RevId: 451979149 Change-Id: Ic9b02306f2c5324b6648989a895f128c9eb5743d
* | | time.h: Use uint32_t literals for calls to overloaded MakeDurationAnqi D2022-05-301-9/+13
|/ / | | | | | | | | | | | | | | | | This fixes an overload that is ambiguous for some toolchains, because 0U does not always refer to a uint32_t (on some toolchains, uint32_t is an unsigned long). PiperOrigin-RevId: 451962182 Change-Id: Id13700817ea3eb6d04e2cc02f20726040eb447fb
* | Fix typos.Abseil Team2022-05-271-5/+5
| | | | | | | | | | PiperOrigin-RevId: 451434783 Change-Id: I572e77a67e18e8dd530bf0347c76863c9bb1946f
* | Clarify the behaviour of `AssertHeld` and `AssertReaderHeld` when the ↵Abseil Team2022-05-271-6/+13
| | | | | | | | | | | | | | calling thread doesn't hold the mutex. PiperOrigin-RevId: 451410449 Change-Id: Iffd4c7463f1051474debbed256703589d96a548c
* | Enable __thread on AsyloAbseil Team2022-05-261-3/+4
| | | | | | | | | | PiperOrigin-RevId: 451201387 Change-Id: Ibeac4f24d00e28bbfc61e476936d669321a2cb24
* | Add implementation of is_invocable_r to absl::base_internal for C++ < 17, ↵Dino Radakovic2022-05-262-0/+123
| | | | | | | | | | | | | | define it as alias of std::is_invocable_r when C++ >= 17 PiperOrigin-RevId: 451171660 Change-Id: I6dc0e40eabac72b82c4a19e292158e43118cb080
* | Optimize SwissMap iteration for aarch64 by 5-6%Abseil Team2022-05-263-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benchmarks: https://pastebin.com/tZ7dr67W. Works well especially on smaller ranges. After a week on spending optimizing NEON SIMD where I almost managed to make hash tables work with NEON SIMD without performance hits (still 1 cycle to optimize and I gave up a little), I found an interesting optimization for aarch64 to use cls instruction (count leading sign bits). The loop has a property that ctrl_ group is not matched against count when the first slot is empty or deleted. ``` void skip_empty_or_deleted() { while (IsEmptyOrDeleted(*ctrl_)) { uint32_t shift = Group{ctrl_}.CountLeadingEmptyOrDeleted(); ctrl_ += shift; slot_ += shift; } ... } ``` However, `kEmpty` and `kDeleted` have format of `1xxxxxx0` and `~ctrl & (ctrl >> 7)` always sets the lowest bit to 1. In naive implementation, it does +1 to start counting zero bits, however, in aarch64 we may start counting one bits immediately. This saves 1 cycle and 5% of iteration performance. Then it becomes hard to find a supported and sustainable C++ version of it. `__clsll` is not supported by GCC and was supported only since clang 8, `__builtin_clrsb` is not producing optimal codegen for clang. `__rbit` is not supported by GCC and there is no intrinsic to do that, however, in clang we have `__builtin_bitreverse{32,64}`. For now I decided to enable this only for clang, only if they have appropriate builtins. PiperOrigin-RevId: 451168570 Change-Id: I7e9256a60aecdc88ced4e6eb15ebc257281b6664
* | Fix detection of ABSL_HAVE_ELF_MEM_IMAGE on HaikuDerek Mauro2022-05-251-2/+3
| | | | | | | | | | | | | | | | Fixes #1181 ORIGINAL_AUTHOR=jerome.duval@gmail.com PiperOrigin-RevId: 451006334 Change-Id: Id61e5889fb55594d09e92e7bb98fdf8bfbc13cc4
* | Don’t use generator expression to build .pc Libs linesBenjamin Barenblat2022-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | When building pkg-config files, compute linker flags with a string substitution rather than the JOIN generator expression. This ensures that commas in linker flags don’t get treated as argument separators in JOIN. Bug: https://bugs.debian.org/1011294 PiperOrigin-RevId: 450675966 Change-Id: I61eacc46a468bae5ff3dae2b437a564f2f1042c2
* | Update Bazel used on MacOS CIDerek Mauro2022-05-231-1/+1
| | | | | | | | | | PiperOrigin-RevId: 450446058 Change-Id: I22a878bf04cf56b8a0e1dd049353acd2f6933828
* | Import of CCTZ from GitHub.Abseil Team2022-05-232-5/+21
| | | | | | | | | | PiperOrigin-RevId: 450445030 Change-Id: I1c1e5ed67f81a181454f7fc6751bf42a3bc2bc48
* | Cord: workaround a GCC 12.1 bug that triggers a spurious warningDerek Mauro2022-05-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | See the GCC bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585 and Abseil bug report https://github.com/abseil/abseil-cpp/issues/1175 Fixes #1175 PiperOrigin-RevId: 450083136 Change-Id: I207aaffaec9166b335065dd6ef148a721b94048e
* | Change workaround for MSVC bug regarding compile-time initialization to ↵Abseil Team2022-05-191-1/+1
| | | | | | | | | | | | | | | | | | trigger from MSC_VER 1910 to 1930. 1929 is the last _MSC_VER for Visual Studio 2019. PiperOrigin-RevId: 449909831 Change-Id: Ibca931cc31131235eba55d2a1b97c7a062f059db
* | Don't default to the unscaled cycle clock on any Apple targets.Tom Rybka2022-05-191-2/+1
| | | | | | | | | | | | | | | | Previously was disabled on iPhone, but still enabled for macOS. The unscaled cycle clock does not work correctly when run on a VM. PiperOrigin-RevId: 449876559 Change-Id: I679ade90b43462e8d2794b1a2b32569d59029ed9
* | Use SSE instructions for prefetch when __builtin_prefetch is unavailableDerek Mauro2022-05-182-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | This notably gets prefetch working on MSVC Implementation note: https://docs.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-prefetchcacheline MSVC does have PreFetchCacheLine, but that would require including <windows.h> in a header PiperOrigin-RevId: 449602543 Change-Id: I5e6ca4b7c3d287779aa03c2fd348b41fb65c3680
* | Replace direct uses of __builtin_prefetch from SwissTable with the wrapper ↵Greg Falcon2022-05-185-7/+14
| | | | | | | | | | | | | | | | | | | | | | functions. Add a new (internal) feature test macro to detect whether the wrappers are no-ops on a given platform. Note that one-arg __builtin_prefetch(x) is equivalent to __builtin_prefetch(x, 0, 3), per `man BUILTIN_PREFETCH(3)` and gcc docs. PiperOrigin-RevId: 449508660 Change-Id: I144e750205eec0c956d8dd62bc72e10bdb87c4f7