summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fixes issue where AbslStringify() breaks formatting with %d for enumsGravatar Phoebe Liang2022-12-07
| | | | | PiperOrigin-RevId: 493682437 Change-Id: I30f2ac36b998b86c24fe7513cd952b860560a66e
* Add some missing copts and linkopts in logging and fix the warningsGravatar Derek Mauro2022-12-07
| | | | | PiperOrigin-RevId: 493617276 Change-Id: Ia7fb938c7abfba10e5b62f43f3cf71fb99b132f5
* Remove possible UB from CopyRaw()Gravatar Martijn Vels2022-12-07
| | | | | | | This change removes the 'create by single memcpy' CopyRaw() logic to avoid potential UB from the atomic refcount data being included in the memcpy. While we know this works on all supported platforms, it is officially UB, and we should change it to something else. This change changes the CopyRaw() method to explicitly create a (default initialized) instance, initialize `length` and `refcount`, and then memcpy the remaining contents which are trivial uint8_t and CordRep* values. PiperOrigin-RevId: 493596072 Change-Id: I46618883eb1c7c9ed9eb083f4d3e7fc501f23df5
* Create alternate absl-prefixed versions of absl logging macros.Gravatar Mike Kruskal2022-12-06
| | | | | | | This will allow OSS code to use absl logging without necessarily polluting the preprocessor symbols with definitions for LOG and CHECK PiperOrigin-RevId: 493404211 Change-Id: I7bc5807252218dd7fc26da3af13d5734ef8b2601
* Merge pull request #1338 from MBkkt:patch-5Gravatar Copybara-Service2022-12-06
|\ | | | | | | | | PiperOrigin-RevId: 493386604 Change-Id: I289cb38b4a3da5760ab7ef3976d402d165d7e10f
* | Move implementations of absl logging to an internal file.Gravatar Mike Kruskal2022-12-06
| | | | | | | | | | | | | | This will allow us to create ABSL_-prefixed variants with shared implementation. PiperOrigin-RevId: 493383908 Change-Id: I3529021df7afa642fadaf43eb9fd8249e9202758
| * Update non_temporal_memcpy.hGravatar Valery Mironov2022-12-06
|/
* Export the bug report templateGravatar Derek Mauro2022-12-05
| | | | | PiperOrigin-RevId: 493091927 Change-Id: I69a5e776b3d3193f3fd14458734e99bf020782f5
* Switch to a structured bug report form and redirect questions toGravatar Derek Mauro2022-12-05
| | | | | | | the discussions section on GitHub PiperOrigin-RevId: 493078058 Change-Id: Iee972afbb14ab775fb153f3397545db142e8124c
* Add a compilation test for recursive hash map typesGravatar Derek Mauro2022-12-02
| | | | | PiperOrigin-RevId: 492535520 Change-Id: I2e58b39bd4ab3064f675474c5e712c76fac02674
* Add AbslStringify support for enum types in Substitute.Gravatar Abseil Team2022-12-02
| | | | | PiperOrigin-RevId: 492481345 Change-Id: Ie77656ed334b54930ee852d31e2794a1fc58ce2f
* Use a c++14-style constexpr initialization if c++14 constexpr is available.Gravatar Jorg Brown2022-12-02
| | | | | PiperOrigin-RevId: 492463896 Change-Id: I063759ca5ceb3597a7c8ab25af23aa688dee26c2
* Move the vtable into a function to delay instantiation until the function isGravatar Samuel Benzaquen2022-12-01
| | | | | | | | | | | | | called. When the variable is a global the compiler is allowed to instantiate it more aggresively and it might happen before the types involved are complete. When it is inside a function the compiler can't instantiate it until after the functions are called. Remove an unused member from the vtable. Replace transfer_slot_fn with a generic function when relocation is available to reduce duplication. PiperOrigin-RevId: 492227302 Change-Id: I07499f63b91c59c0ae42402683387c7b84a6f0ee
* Cosmetic reformatting in a test.Gravatar Marcin Kowalczyk2022-12-01
| | | | | PiperOrigin-RevId: 492219541 Change-Id: Iee5d7941e413c8b960365e60fa0254536dd20e49
* Reorder base64 unescape methods to be below the escaping methods.Gravatar Abseil Team2022-11-30
| | | | | PiperOrigin-RevId: 491992941 Change-Id: Id66154cc4561770047b55625ef00014602975c5d
* Fixes many compilation issues that come from having no external CIGravatar Derek Mauro2022-11-30
| | | | | | | | | | | | | | | | | | coverage of the accelerated CRC implementation and some differences bewteen the internal and external implementation. This change adds CI coverage to the linux_clang-latest_libstdcxx_bazel.sh script assuming this script always runs on machines of at least the Intel Haswell generation. Fixes include: * Remove the use of the deprecated xor operator on crc32c_t * Remove #pragma unroll_completely, which isn't known by GCC or Clang: https://godbolt.org/z/97j4vbacs * Fixes for -Wsign-compare, -Wsign-conversion and -Wshorten-64-to-32 PiperOrigin-RevId: 491965029 Change-Id: Ic5e1f3a20f69fcd35fe81ebef63443ad26bf7931
* Remove static initializer from mutex.h.Gravatar Abseil Team2022-11-30
| | | | | PiperOrigin-RevId: 491915718 Change-Id: I7469601857b5a3506163518d29f49792f3053b34
* Import of CCTZ from GitHub.Gravatar Abseil Team2022-11-29
| | | | | PiperOrigin-RevId: 491723314 Change-Id: I68bc5a7ea5288982f6d0efb64c14fdbee4eec85a
* Remove unused iostream include from crc32c.hGravatar Derek Mauro2022-11-29
| | | | | PiperOrigin-RevId: 491722639 Change-Id: Iff13661095d10c82599ad30f7220700825a78c9e
* Fix MSVC builds that reject C-style arrays of size 0Gravatar Derek Mauro2022-11-29
| | | | | | | | | | std::array has a special-case to allow this https://en.cppreference.com/w/cpp/container/array Fixes #1332 PiperOrigin-RevId: 491703960 Change-Id: Ib83a1f0865448314e463e8ebf39ae3b842f762ea
* Remove deprecated use of absl::ToCrc32c()Gravatar Derek Mauro2022-11-29
| | | | | PiperOrigin-RevId: 491681300 Change-Id: I4ecdd3bf359cda7592b6c392a2fbb61b8394f71b
* CRC: Make crc32c_t as a class for explicit control of operatorsGravatar Derek Mauro2022-11-29
| | | | | | | | | The motivation is to explicitly remove and document dangerous operations like adding crc32c_t to a set, because equality is not enough to guarantee uniqueness. PiperOrigin-RevId: 491656425 Change-Id: I7b4dadc1a59ea9861e6ec7a929d64b5746467832
* Convert the full parser into constexpr now that Abseil requires C++14, and useGravatar Samuel Benzaquen2022-11-29
| | | | | | | | | | | | | this parser for the static checker. This fixes some outstanding bugs where the static checker differed from the dynamic one. Also, fix `%v` to be accepted with POSIX syntax. Tested: Presubmit TGP OCL:487237262:BASE:490275393:1669141454896:92dd62e3 PiperOrigin-RevId: 491650577 Change-Id: Id138c108187428b3aea46f8887495f1da12c91b2
* Write (more) directly into the structured buffer from StringifySink, ↵Gravatar Andy Getzendanner2022-11-28
| | | | | | | including for (size_t, char) overload. PiperOrigin-RevId: 491456410 Change-Id: I76dec24b0bd02204fa38419af9247cee38b1cf50
* Avoid using the non-portable type __m128i_u.Gravatar Derek Mauro2022-11-28
| | | | | | | | | | | | 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 Fixes #1330 PiperOrigin-RevId: 491427300 Change-Id: I4a1d44ac4d5e7c1e1ee063ff397935df118254a1
* Reduce flat_hash_{set,map} generated code size.Gravatar Abseil Team2022-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes a bunch of changes (mostly to raw_hash_set which underlies flat_hash_set and flat_hash_map). Techniques used: * Extract code that does not depend on the specific hash table type into common (non-inlined) functions. * Place ABSL_ATTRIBUTE_NOINLINE directives judiciously. * Out-of-line some slow paths. Reduces sizes of some large binaries by ~0.5%. Has no significant performance impact on a few performance critical binaries. ## Speed of fleetbench micro-benchmarks Following is a histogram of %-age changes in [fleetbench](https://github.com/google/fleetbench) hot_swissmap_benchmark results. Negative numbers indicate a speedup caused by this change. Statistically insignificant changes are mapped to zero. XXX Also run and merge in cold_swissmap_benchmark Across all 351 benchmarks, the average speedup is 0.38%. The best speedup was -25%, worst slowdown was +6.81%. ``` Count: 351 Average: -0.382764 StdDev: 3.77807 Min: -25 Median: 0.435135 Max: 6.81 --------------------------------------------- [ -25, -10) 16 4.558% 4.558% # [ -9, -8) 2 0.570% 5.128% [ -8, -7) 1 0.285% 5.413% [ -7, -6) 1 0.285% 5.698% [ -6, -5) 2 0.570% 6.268% [ -5, -4) 5 1.425% 7.692% [ -4, -3) 13 3.704% 11.396% # [ -3, -2) 15 4.274% 15.670% # [ -2, -1) 26 7.407% 23.077% ## [ -1, 0) 14 3.989% 27.066% # [ 0, 1) 185 52.707% 79.772% ############ [ 1, 2) 14 3.989% 83.761% # [ 2, 3) 8 2.279% 86.040% # [ 3, 4) 7 1.994% 88.034% [ 4, 5) 32 9.117% 97.151% ## [ 5, 6) 6 1.709% 98.860% [ 6, 7) 4 1.140% 100.000% ``` We looked at the slowdowns and they do not seem worth worrying about. E.g., the worst one was: ``` BM_FindHit_Hot<::absl::node_hash_set,64>/set_size:4096/density:0 2.61ns ± 1% 2.79ns ± 1% +6.81% (p=0.008 n=5+5) ``` ## Detailed changes * Out-of-line slow paths in hash table sampler methods. * Explicitly unregister from sampler instead of from destructor. * Introduced a non-templated CommonFields struct that holds some of the hash table fields (infoz, ctrl, slots, size, capacity). This struct can be passed to new non-templated helpers. The struct is a private base class of raw_hash_set. * Made non-inlined InitializeSlots<> that is only templated on allocator and size/alignment of the slot type so that we can share instantiations across types that have the same size/alignment. * Moved some infrequently called code paths into non-inlined type-erased. functions. Pass a suite of type-specific function pointers to these routines for when they need to operate on slots. * Marked some methods as non-inlined. * Avoid unnecessary reinitialization in destructor. * Introduce UpdateSpine type-erased helper that is called from clear() and rehash(). PiperOrigin-RevId: 491413386 Change-Id: Ia5495c5a6ec73622a785a0d260e406ddb9085a7c
* Use ABSL_HAVE_BUILTIN to fix -Wundef __has_builtin warningGravatar Derek Mauro2022-11-28
| | | | | | | Fixes #1329 PiperOrigin-RevId: 491372279 Change-Id: I93c094b06ece9cb9bdb39fd4541353e0344a1a57
* Add a TODO for the deprecation of absl::aligned_storage_tGravatar Derek Mauro2022-11-28
| | | | | PiperOrigin-RevId: 491367420 Change-Id: I6a0ab74bb0675fd910ed9fc95ee20c5023eb0cb6
* TSAN: Remove report_atomic_races=0 from CI now that it has been fixedGravatar Derek Mauro2022-11-28
| | | | | PiperOrigin-RevId: 491338755 Change-Id: I813566ef69ba6121bb4d4b64ea483cd7c4cd6019
* absl: fix Mutex TSan annotationsGravatar Abseil Team2022-11-28
| | | | | | | | | TSan misses synchronization around passing PerThreadSynch between threads since it happens inside of the Mutex code (which me mostly ignore), so we need to ignore all accesses to the object. PiperOrigin-RevId: 491297912 Change-Id: I13ea2015dee5c1a3fc4315c85112902ccffccc45
* CMake: Remove trailing commas in `AbseilDll.cmake`Gravatar Christian Blichmann2022-11-28
| | | | | PiperOrigin-RevId: 491266544 Change-Id: I0dd222f6d9fe49f1fdcdb11cf732c13c353e7695
* Fix AMD cpu detection.Gravatar Ilya Tokar2022-11-23
| | | | | | | | | | | | | | Currently we take generic/default code-path on AMD due to misspelling. Mostly helps with crc+memcpy: name old speed new speed delta BM_Memcpy/1 156MB/s ± 1% 156MB/s ± 1% ~ (p=0.563 n=18+18) BM_Memcpy/100 6.38GB/s ± 1% 6.50GB/s ± 1% +1.89% (p=0.000 n=19+19) BM_Memcpy/10000 14.6GB/s ± 1% 21.7GB/s ± 0% +49.01% (p=0.000 n=20+19) BM_Memcpy/500000 13.5GB/s ± 1% 19.9GB/s ± 0% +47.35% (p=0.000 n=18+17) PiperOrigin-RevId: 490572650 Change-Id: Id7901321a23262c0ab62a2d82fae86cf42acf16d
* CRC: Get CPU detection and hardware acceleration working on MSVC x86(_64)Gravatar Derek Mauro2022-11-23
| | | | | | | Using /arch:AVX on MSVC now uses the accelerated implementation PiperOrigin-RevId: 490550573 Change-Id: I924259845f38ee41d15f23f95ad085ad664642b5
* Removing trailing period that can confuse a url in str_format.h.Gravatar Abseil Team2022-11-22
| | | | | PiperOrigin-RevId: 490329293 Change-Id: Ied36e737e85afc683cc7cc116ac6bc07092472df
* Refactor btree iterator generation code into a base class rather than using ↵Gravatar Evan Brown2022-11-22
| | | | | | | ifdefs inside btree_iterator. PiperOrigin-RevId: 490317784 Change-Id: I4ffe2a1ad2e39890790e278d82eec7223b67908c
* container.h: fix incorrect comments about the location of <numeric> algorithms.Gravatar Abseil Team2022-11-22
| | | | | PiperOrigin-RevId: 490228223 Change-Id: Iec5af16531132a903aaa3e584dd87b03feb2c0c7
* Zero encoded_remaining when a string field doesn't fit, so that we don't ↵Gravatar Andy Getzendanner2022-11-21
| | | | | | | leave partial data in the buffer (all decoders should ignore it anyway) and to be sure that we don't try to put any subsequent operands in either (there shouldn't be enough space). PiperOrigin-RevId: 490143656 Change-Id: I4d743dd9214013fbd151478ef662d50affd5ff7a
* Improve error messages when comparing btree iterators when generations are ↵Gravatar Evan Brown2022-11-21
| | | | | | | | | | enabled. - Add assertions that the iterators haven't been invalidated. - Also refactor some generation-related code to define the functions inside ABSL_BTREE_ENABLE_GENERATIONS ifdef/else branches. PiperOrigin-RevId: 489988637 Change-Id: I34d32ed2e27cf89f7f8bb5d9c1f6770bb40b8794
* Document the WebSafe* and *WithPadding variants more concisely, as deltas ↵Gravatar Abseil Team2022-11-21
| | | | | | | | | | | from Base64Encode. Also: * Clarify that padding refers to ‘output’ padding * Make CalculateBase64EscapedLen() a bit more discoverable * Reference all relevant non-obsolete RFCs (2045 as well as 4648) PiperOrigin-RevId: 489981278 Change-Id: I27365ea5d52bfdb0c9d02ed96d05b4a60f2dc36f
* Drop outdated comment about LogEntry copyability.Gravatar Andy Getzendanner2022-11-18
| | | | | PiperOrigin-RevId: 489569565 Change-Id: Ia08c0c956a672ad435885c68f3e4a3de0405dad1
* Release structured logging.Gravatar Andy Getzendanner2022-11-17
| | | | | | | This stores the operands to LOG (and CHECK) as separate fields in a serialized protobuf. The protobuf format is not yet published. PiperOrigin-RevId: 489275799 Change-Id: I86d83671a6b1feb2bddd5bee51552907897ca8eb
* Minor formatting changes in preparation for structured logging...Gravatar Andy Getzendanner2022-11-16
| | | | | PiperOrigin-RevId: 489044912 Change-Id: I1657dd60bcfa2d0fb4b889f27f4f237325b73f08
* Update absl::make_unique to reflect the C++14 minimumGravatar Derek Mauro2022-11-16
| | | | | | | | | | absl::make_unique is now std::make_unique in all configurations. Documentation has been updated to recommend using the std::make_unique spelling. PiperOrigin-RevId: 488988005 Change-Id: Iddb8b863e6301876713d78c3fbe6660d0f9a38cf
* Update Condition to allocate 24 bytes for MSVC platform pointers to methods.Gravatar Abseil Team2022-11-16
| | | | | PiperOrigin-RevId: 488986942 Change-Id: I2babb7ea30d60c544f55ca9ed02d9aed23051a12
* Add missing includeGravatar Tom Hughes2022-11-16
| | | | | PiperOrigin-RevId: 488955034 Change-Id: I143f3632b295098bc6ea5c6aedf7446dd91c668b
* Refactor "RAW: " prefix formatting into FormatLogPrefix.Gravatar Andy Getzendanner2022-11-16
| | | | | | | This is used when demoting regular logging inside a LogSink::Send to raw-like to avoid infinite recursive dispatch. PiperOrigin-RevId: 488934154 Change-Id: I0aaaeea0ceaaff3c4394308a7102a55befbef290
* Minor formatting changes due to internal refactoringGravatar Derek Mauro2022-11-16
| | | | | PiperOrigin-RevId: 488930308 Change-Id: Ie620734e2f47df47e4000bc8eb2fff7f52939596
* Fix typosGravatar Tom Hughes2022-11-15
| | | | | PiperOrigin-RevId: 488799458 Change-Id: I1aaaa60c5be3260055a6f5773f78cb4043a60ac8
* Add a new API for `extract_and_get_next()` in b-tree that returns both the ↵Gravatar Evan Brown2022-11-15
| | | | | | | | extracted node and an iterator to the next element in the container. Motivation: it can be useful, when calling `extract` to maintain an iterator next to the location of the extracted element. `std::set`, et al. allow for this because they have iterator stability. `absl::{flat,node}_hash_{set,map}` allow for this because they are guaranteed not to rehash when elements are removed so they also have iterator stability across calls to `extract()`. But b-tree doesn't support this use case without this API because removing elements can cause rebalancing, which invalidates iterators. We can get the next iterator without this API using `lower_bound(node_handle.value())`, but that requires an extra lookup. PiperOrigin-RevId: 488721247 Change-Id: Id66f17311bf53678f536e4e4f070775f5ce0c542
* Use AnyInvocable in internal thread_poolGravatar Abseil Team2022-11-15
| | | | | PiperOrigin-RevId: 488676817 Change-Id: I13f15bb93ab6dda4c56caf969be3c14f84ada6a0