1. 09 Dec, 2022 1 commit
  2. 08 Dec, 2022 5 commits
    • Fix some ClangTidy warnings in raw_hash_set code. · 522606b7
      PiperOrigin-RevId: 493993005
      Change-Id: I0705be8678022a9e08a1af9972687b7955593994
      Evan Brown committed
    • Fixing macro expansion changes in new logging macros. · ec583f2d
      This was an unintentional behavior change when we added a new layer of macros.  Not using function-like macro aliases would get around this, but unfortunately that would flood the macro namespace downstream with CHECK and LOG (and break existing code).
      
      Note, the old behavior only applied to CHECK and QCHECK.  Other CHECK macros already had multiple layers of function-like macros and were unaffected.
      
      PiperOrigin-RevId: 493984662
      Change-Id: I9a050dcaf01f2b6935f02cd42e23bc3a4d5fc62a
      Mike Kruskal committed
    • Eliminate AArch64-specific code paths from LowLevelHash · c353e259
      After internal investigation, it’s no longer clear that the alternative
      LowLevelHash mixer committed in a05366d8
      unequivocally improves performance on AArch64. It unnecessarily reduces
      performance on Apple Silicon and the AWS Graviton. It also lowers hash
      quality, which offsets much of the performance gain it provides on the
      Arm Neoverse N1 (see https://github.com/abseil/abseil-cpp/issues/1093).
      Switch back to the original mixer.
      
      Closes: https://github.com/abseil/abseil-cpp/issues/1093
      PiperOrigin-RevId: 493941913
      Change-Id: I84c789b2f88c91dec22f6f0f6e8c5129d2939a6f
      Benjamin Barenblat committed
    • Change CommonFields from a private base class of raw_hash_set to be the first… · 523b8699
      Change CommonFields from a private base class of raw_hash_set to be the first member of the settings_ CompressedTuple so that we can move growth_left into CommonFields.
      
      This allows for removing growth_left as a separate argument for a few functions.
      
      Also, move the infoz() accessor functions to be before the data members of CommonFields to comply with the style guide.
      
      PiperOrigin-RevId: 493918310
      Change-Id: I58474e37d3b16a1513d2931af6b153dea1d809c2
      Evan Brown committed
    • The abridged justification is as follows: · 2e177685
      -   The deadlock seems to occur if flag initialization happens to occur while a sample is being created.
          -   Each sample has its own mutex that is locked when a new sample is registered, i.e. created for the first time.
          -   The flag implicitly creates a global sampler object which locks `graveyard_`'s mutex.
      -   Usually, in `PushDead`, the `graveyard` is locked before the sample, hence triggering deadlock detection.
      -   This lock order can never be recreated since this code is executed exactly once per sample object, and the sample object cannot be accessed until after the method returns.
      -   It should therefore be safe to ignore any locking order condition that may occur during sample creation.
      
      PiperOrigin-RevId: 493901903
      Change-Id: I094abca82c1a8a82ac392383c72469d68eef09c4
      Abseil Team committed
  3. 07 Dec, 2022 3 commits
  4. 06 Dec, 2022 4 commits
  5. 05 Dec, 2022 2 commits
  6. 02 Dec, 2022 3 commits
  7. 01 Dec, 2022 2 commits
  8. 30 Nov, 2022 3 commits
  9. 29 Nov, 2022 6 commits
  10. 28 Nov, 2022 8 commits
    • Write (more) directly into the structured buffer from StringifySink, including… · 13708db8
      Write (more) directly into the structured buffer from StringifySink, including for (size_t, char) overload.
      
      PiperOrigin-RevId: 491456410
      Change-Id: I76dec24b0bd02204fa38419af9247cee38b1cf50
      Andy Getzendanner committed
    • Avoid using the non-portable type __m128i_u. · 558a0e46
      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
      Derek Mauro committed
    • Reduce flat_hash_{set,map} generated code size. · e5a7979d
      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
      Abseil Team committed
    • Use ABSL_HAVE_BUILTIN to fix -Wundef __has_builtin warning · e3158086
      Fixes #1329
      
      PiperOrigin-RevId: 491372279
      Change-Id: I93c094b06ece9cb9bdb39fd4541353e0344a1a57
      Derek Mauro committed
    • Add a TODO for the deprecation of absl::aligned_storage_t · 04596b25
      PiperOrigin-RevId: 491367420
      Change-Id: I6a0ab74bb0675fd910ed9fc95ee20c5023eb0cb6
      Derek Mauro committed
    • TSAN: Remove report_atomic_races=0 from CI now that it has been fixed · 091842be
      PiperOrigin-RevId: 491338755
      Change-Id: I813566ef69ba6121bb4d4b64ea483cd7c4cd6019
      Derek Mauro committed
    • absl: fix Mutex TSan annotations · bb7be494
      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
      Abseil Team committed
    • CMake: Remove trailing commas in `AbseilDll.cmake` · 9f4bde36
      PiperOrigin-RevId: 491266544
      Change-Id: I0dd222f6d9fe49f1fdcdb11cf732c13c353e7695
      Christian Blichmann committed
  11. 23 Nov, 2022 2 commits
    • Fix AMD cpu detection. · e51b4ef7
      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
      Ilya Tokar committed
    • CRC: Get CPU detection and hardware acceleration working on MSVC x86(_64) · c2e9ce1d
      Using /arch:AVX on MSVC now uses the accelerated implementation
      
      PiperOrigin-RevId: 490550573
      Change-Id: I924259845f38ee41d15f23f95ad085ad664642b5
      Derek Mauro committed
  12. 22 Nov, 2022 1 commit