1. 20 Apr, 2021 1 commit
  2. 25 Mar, 2021 1 commit
  3. 24 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 1fdbe1ea
      Abseil Team authored
      --
      4b566a7deeba5db473c83f4924c1d182a002779f by Abseil Team <absl-team@google.com>:
      
      Add absl::LeakCheckerIsActive to check whether a leak checker is built into the
      target and enabled. For LeakSanitizer, it is by default enabled unless
      __lsan_is_turned_off() is defined and returns true.
      
      PiperOrigin-RevId: 364654465
      
      --
      0a56ff5310b66f9d1ff5e5e2a053335ecfb5c75b by Abseil Team <absl-team@google.com>:
      
      Update absl::FromTM documentation to reflect implementation.
      
      PiperOrigin-RevId: 364388743
      GitOrigin-RevId: 4b566a7deeba5db473c83f4924c1d182a002779f
      Change-Id: I8df35b761b532e79d620f484153083c3499ef55b
      1fdbe1ea
  4. 22 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · f3eff479
      Abseil Team authored
      --
      1e0b6c504e9edc93ac08de320454b0e7f61f2028 by Derek Mauro <dmauro@google.com>:
      
      Use ABSL_NO_THREAD_SAFETY_ANALYSIS instead of the
      no-namespace NO_THREAD_SAFETY_ANALYSIS
      
      PiperOrigin-RevId: 363914253
      GitOrigin-RevId: 1e0b6c504e9edc93ac08de320454b0e7f61f2028
      Change-Id: Iea54f88130d93066e1e4a4747e902f1029500f71
      f3eff479
  5. 19 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 110a80b0
      Abseil Team authored
      --
      eb820bdf4121c00a60da406333799cda3222ee4d by Derek Mauro <dmauro@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 363704749
      GitOrigin-RevId: eb820bdf4121c00a60da406333799cda3222ee4d
      Change-Id: Ia3bca66b12a1abcf96940292ab4cd8d33d712fb5
      110a80b0
  6. 18 Mar, 2021 2 commits
    • Christian Fersch's avatar
      Fix C++/CLI build problem (#916) · 090646f9
      Christian Fersch authored
      090646f9
    • Abseil Team's avatar
      Export of internal Abseil changes · dcf48993
      Abseil Team authored
      --
      8e75347c10d85112296811be6ef35761744ad9bc by Derek Mauro <dmauro@google.com>:
      
      Big update to LTS release process
        * Add create_lts.py script to to the LTS modification
          This is simpler than copybara since very few changes are needed
        * Use the default installation paths instead of a versioned path.
          If a versioned path is needed, this is easy to change on the commandline.
        * Make the integration test use the LTS transformed version
        * Test both static and dynamic linking (fixes pkg-config dynamic linking)
      
      PiperOrigin-RevId: 363566934
      
      --
      e00e971a2de3138861f5e1900201c9cc7788f714 by Laramie Leavitt <lar@google.com>:
      
      Add a non-compile test to absl::BitGenRef for temporaries.
      
      PiperOrigin-RevId: 363437284
      
      --
      3685644ec115d99789de32aceb76c32a00756fea by Derek Mauro <dmauro@google.com>:
      
      Make OSS code consistent with internal code by using the forward
      declaration of absl::Status that contains ABSL_MUST_USE_RESULT.
      
      PiperOrigin-RevId: 363426906
      
      --
      b85fec142c3aa3f632fa985f9f8f73a253819723 by Evan Brown <ezb@google.com>:
      
      Move raw_hash_set::infoz_ into raw_hash_set::settings_. This reduces the size of raw_hash_sets by alignof(size_t) bytes when hashtablez is disabled.
      
      PiperOrigin-RevId: 363034264
      
      --
      c6fde3b17e5845191eb8b2bfc1760c8bfb9573ff by Mark Barolak <mbar@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 362990378
      
      --
      81713cf964905b43d1cbe32ce5fed97539029625 by Abseil Team <absl-team@google.com>:
      
      Fix typo in comment (execeptions -> exceptions).
      
      PiperOrigin-RevId: 362946191
      
      --
      3ee92ca470feca44da417b03ee45a915c6eb5155 by Abseil Team <absl-team@google.com>:
      
      Add absl::FindAndReportLeaks and routes it to the corresponding
      __lsan_do_recoverable_leak_check.
      
      PiperOrigin-RevId: 362622199
      
      --
      b95b7194b20e02c20d72289fbc79a0d35b82e256 by Abseil Team <absl-team@google.com>:
      
      Add `kWithEverything` to StatusToStringMode
      
      PiperOrigin-RevId: 362595218
      
      --
      0a960d96a0014eab7e1c55b479269450ed8e98d7 by Abseil Team <absl-team@google.com>:
      
      Accept e.g. ".__uniq" as a valid clone name.  Further, bring the implementation
      on par with libiberty's demangler grammar.
      
      Clang introduced option -funique-internal-linkage-names that adds the suffix
      ".__uniq.[0-9]+" to internal linkage functions to give them a globally unique
      identifier.  The suffix was designed to work with existing demanglers which do
      recognize a "_" along with the alphanumeric string. This change enhances the
      demangler to allow "_" with the alphanumeric string.
      
      Please refer to libiberty's cp-demangle.c where function d_clone_suffix
      implements the demangling of clone suffixes :
      
      1.  '_' is accepted as a valid character with the alphanumeric sequence.
      2.  The alphanumberic sequence is optional.
      3.  The digit sequence is optional.
      
      PiperOrigin-RevId: 362557420
      
      --
      2ac5ea212c150afd2f58025a5cab8c45d16949c6 by Abseil Team <absl-team@google.com>:
      
      Change variable name 'slots' to 'slot_count' to avoid name-clash with Qt builds.
      
      PiperOrigin-RevId: 362556289
      
      --
      934f0f409c9c548716a46363d6e243406fad4028 by Mark Barolak <mbar@google.com>:
      
      Clarify the comment on ABSL_CACHELINE_SIZE to indicate that the macro definition itself shouldn't change, but rather that call sites should change when possible.
      
      This addresses the request for improved documentation in https://github.com/abseil/abseil-cpp/pull/842.
      
      PiperOrigin-RevId: 362354288
      GitOrigin-RevId: 8e75347c10d85112296811be6ef35761744ad9bc
      Change-Id: I33ec8561d8d645c3353e9d2dd447501d0e1825a7
      dcf48993
  7. 10 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 2e9532cc
      Abseil Team authored
      --
      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
      2e9532cc
  8. 05 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · ab21820d
      Abseil Team authored
      --
      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
      ab21820d
  9. 03 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · b0735979
      Abseil Team authored
      --
      a74bdb72c3a6983e08a805938dd0e20e97d55bba by Abseil Team <absl-team@google.com>:
      
      Fix typo: calcualte -> calculate
      
      PiperOrigin-RevId: 360515509
      
      --
      3ddf8ac194e81a13e9de095e59dd061c1beacfe3 by Benjamin Barenblat <bbaren@google.com>:
      
      Make tests tolerant of FMA contraction
      
      Weaken Duration.ToDoubleSecondsCheckEdgeCases and
      Duration.ToDoubleSecondsCheckRandom to make them less sensitive to fused
      multiply/add contraction.
      
      PiperOrigin-RevId: 360297653
      GitOrigin-RevId: a74bdb72c3a6983e08a805938dd0e20e97d55bba
      Change-Id: I0c55383bc13040ea77511c4130d142368103dc57
      b0735979
  10. 01 Mar, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · a7669879
      Abseil Team authored
      --
      a9eb3c976c6d8ef4fca3d416847f8fca4bd90dd7 by Derek Mauro <dmauro@google.com>:
      
      Remove the deprecated container library, which doesn't do anything.
      This will help prevent user confusion, as seen in #183.
      
      PiperOrigin-RevId: 360172262
      
      --
      4f872f651e25a528bdc59ee4e24543fbbd358f00 by Abseil Team <absl-team@google.com>:
      
      Remove unused nspace alias.
      
      PiperOrigin-RevId: 359487559
      
      --
      43e877e464886cf9226012f5bb47910b8995e70f by Abseil Team <absl-team@google.com>:
      
      Create a StatusToStringMode to control how the ToString behaves.
      
      PiperOrigin-RevId: 359339603
      
      --
      0da1291569e167341613359846948c72c8a838e1 by Greg Falcon <gfalcon@google.com>:
      
      Fix a bug in SimpleAtoi/SimpleAtof, which accepted a prefix of "+-" (e.g., "+-5" was parsed as 5.0).
      
      This regression was introduced when we migrated these functions to use absl::from_chars.
      
      PiperOrigin-RevId: 359135105
      GitOrigin-RevId: a9eb3c976c6d8ef4fca3d416847f8fca4bd90dd7
      Change-Id: I0e2072cad80651e473ba1d34b1fb3a033dfaba80
      a7669879
  11. 23 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 998805a4
      Abseil Team authored
      --
      32b444c0540e8255cc216171aba57639903edc22 by CJ Johnson <johnsoncj@google.com>:
      
      Add missing `final` to `absl::Cleanup` since it is not an interface type and should never be used as a base class.
      
      PiperOrigin-RevId: 359045692
      GitOrigin-RevId: 32b444c0540e8255cc216171aba57639903edc22
      Change-Id: I4f72714cd6f2e101709f31958af28b358f15646b
      998805a4
  12. 22 Feb, 2021 2 commits
    • Abseil Team's avatar
      Export of internal Abseil changes · a50ae369
      Abseil Team authored
      --
      4ceae78ecef025a331985958bba12ce12d4d0a68 by Derek Mauro <dmauro@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 358888936
      
      --
      48f69b0b46e2041bb321e8af7374d7e0b45efc25 by Derek Mauro <dmauro@google.com>:
      
      Use the standard CTest mechanism BUILD_TESTING for enabling/disabling tests
      in CMake
      
      Fixes #901
      
      PiperOrigin-RevId: 358822190
      GitOrigin-RevId: 4ceae78ecef025a331985958bba12ce12d4d0a68
      Change-Id: Ib1ca69a42355f2a4cd4c7f5a47184c4fd8441f35
      a50ae369
    • John Paul Adrian Glaubitz's avatar
      Add support for more Linux architectures (#904) · a2d7f453
      John Paul Adrian Glaubitz authored
      * Add support for alpha
      
      * Add support for hppa
      
      * Add support for ia64
      
      * Add support for sh
      a2d7f453
  13. 19 Feb, 2021 5 commits
    • Abseil Team's avatar
      Export of internal Abseil changes · 0b5af594
      Abseil Team authored
      --
      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
      0b5af594
    • Abseil Team's avatar
      Export of internal Abseil changes · b5173c8d
      Abseil Team authored
      --
      f27dbf50d5db12279ab018f11c93ad1704043006 by Derek Mauro <dmauro@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 358298501
      
      --
      864c141a59e20e96234c06700d7519d43bc73d71 by Derek Mauro <dmauro@google.com>:
      
      Annotates the duration-to-int64 and duration-to-double conversion
      functions as "pure" to potentially optimize out repeated calls with
      the same argument
      
      This adds an ABSL_ATTRIBUTE_PURE_FUNCTION macro for this purpose.
      
      PiperOrigin-RevId: 358247225
      GitOrigin-RevId: f27dbf50d5db12279ab018f11c93ad1704043006
      Change-Id: I5c2238911711b15d9d3ae53da44db788f20b402b
      b5173c8d
    • John Paul Adrian Glaubitz's avatar
      Add support for m68k (#900) · f3697b4f
      John Paul Adrian Glaubitz authored
      Fixes #895
      f3697b4f
    • John Paul Adrian Glaubitz's avatar
      Add support for sparc and sparc64 (#899) · 3fcd00d7
      John Paul Adrian Glaubitz authored
      Fixes #893
      3fcd00d7
    • John Paul Adrian Glaubitz's avatar
      70558763
  14. 18 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · b315753c
      Abseil Team authored
      --
      2247e59ee5696e61c7cb24dce479db572980032d by Derek Mauro <dmauro@google.com>:
      
      Ensure ThreadIdentity::WaiterState data has the correct alignment
      
      PiperOrigin-RevId: 357969866
      
      --
      79bb81a2e6723b186536ad4b4f25cd7ee83f3e72 by Laramie Leavitt <lar@google.com>:
      
      Rework absl::MockingBitGen internal mock registry.
      
      Use a virtual base class with template-specialized derived classes to implement match method rather than taking the address of a function specialization and using casts everywhere.
      
      This combines several of the previously type-erased pointers into a single object, eliminates the separate cleanup container previously used, and eliminates some gratuitous static_cast<>s.
      
      PiperOrigin-RevId: 357827438
      
      --
      a2eb53d002c9b376360a70b2b0f6a18a1de1e16f by Todd Lipcon <tlipcon@google.com>:
      
      Reduce runtime of sequence_lock_test
      
      PiperOrigin-RevId: 357785571
      
      --
      dd1175ff13b560f01c4aaa64bc6759a5300e391c by Abseil Team <absl-team@google.com>:
      
      Don't assume that compiling for Windows means that MSVC or clang-cl is being used.
      
      PiperOrigin-RevId: 357760052
      
      --
      251a9cbede52e729b3a25911b6e225b779c285a8 by Andy Getzendanner <durandal@google.com>:
      
      Internal change.
      
      PiperOrigin-RevId: 357702979
      GitOrigin-RevId: 2247e59ee5696e61c7cb24dce479db572980032d
      Change-Id: Icd366d3775d88d623695209b5f328dbd69f01d27
      b315753c
  15. 13 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 143a2780
      Abseil Team authored
      --
      1211187ce27bbccc0198f1eb2e25ef9f913e2cdb by Abseil Team <absl-team@google.com>:
      
      Fix typo in github issue config
      
      PiperOrigin-RevId: 357034108
      GitOrigin-RevId: 1211187ce27bbccc0198f1eb2e25ef9f913e2cdb
      Change-Id: Iab3fabbf471ed4626609c7f3545e7e7011627c25
      143a2780
  16. 11 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · b343ac3a
      Abseil Team authored
      --
      684e488495a2d95def9a865569ad5ba7ec89967f by Abseil Team <absl-team@google.com>:
      
      Remove references to deleted clang-tidy checks.
      
      Tested:
          TAP --sample ran all affected tests and none failed
          http://test/OCL:356861384:BASE:356825575:1613005412689:548d66bd
      PiperOrigin-RevId: 356877726
      
      --
      f9d8549cd67866e13bb71b21280ec293684ab43b by Abseil Team <absl-team@google.com>:
      
      Add missing closing punctuation to two file-level comments.
      
      PiperOrigin-RevId: 356867260
      GitOrigin-RevId: 684e488495a2d95def9a865569ad5ba7ec89967f
      Change-Id: Ibe04878684c20a23b214ee7e5df9c6dd434bc3dc
      b343ac3a
  17. 10 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 1d1ad229
      Abseil Team authored
      --
      f9476c95cf7625d7b0fc4661f253b0aac4341044 by Abseil Team <absl-team@google.com>:
      
      Add a test to verify that the new checksum field in Hashtablez is calculated
      
      PiperOrigin-RevId: 356744293
      
      --
      ff8a3612463000e8c3d451e50367a3c65cb6cf21 by Abseil Team <absl-team@google.com>:
      
      Remove the implied support comment for port.h, attributes.h, and integral_types.h's C compatibility from the header documentations.
      
      Abseil-cpp is a C++ library; this brings port.h, attributes.h, and integral_types.h, into our stance for the rest of Abseil (aka, no assurance of C compatibility)
      
      There is no guarantee that future changes to port.h, attributes.h, and integral_types.h, and their dependencies, will remain compatible with C, even for macros and definitions that currently are.
      
      PiperOrigin-RevId: 356727505
      
      --
      be62292016381deee628dbb3f36cb6009bcc0282 by Abseil Team <absl-team@google.com>:
      
      internal change
      
      PiperOrigin-RevId: 356608125
      
      --
      13b35f17171df3d6853ea7088797b3be611505fc by Evan Brown <ezb@google.com>:
      
      Clarify the comments for CapacityToGrowth/GrowthToLowerboundCapacity methods to specify the intent that capacity should equal growth when `capacity+1 < kWidth`.
      
      Also add testing for this behavior.
      
      PiperOrigin-RevId: 356579041
      GitOrigin-RevId: f9476c95cf7625d7b0fc4661f253b0aac4341044
      Change-Id: Iadd094d109b4869998f2427319ef66d1cf1e8eff
      1d1ad229
  18. 09 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 2aa00ab2
      Abseil Team authored
      --
      0acc8470116819a62fd5ebbc2c64fdd703c93331 by Abseil Team <absl-team@google.com>:
      
      Add an attribute to HashtablezInfo which performs a bitwise XOR on all hashes. The purposes of this attribute is to identify if identical hash tables are being created. If we see a large number of identical tables, it's likely the code can be improved by using a common table as opposed to keep rebuilding the same one.
      
      PiperOrigin-RevId: 356338043
      GitOrigin-RevId: 0acc8470116819a62fd5ebbc2c64fdd703c93331
      Change-Id: If7d0a96629144fb41e6bef1ec93345a22df40733
      2aa00ab2
  19. 08 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · c36d825d
      Abseil Team authored
      --
      756156bf03da050e8b27539a8247d9af7e44c6a2 by Abseil Team <absl-team@google.com>:
      
      Fix a typo in cord.h: "accomodate" => "accommodate"
      
      PiperOrigin-RevId: 356168875
      
      --
      638befdb342b608ec28910ee931ee200fdbe1fef by Samuel Benzaquen <sbenza@google.com>:
      
      Fix float conversion for PPC.
      In PPC `long double` is a double-double representation which behaves weirdly
      wrt numeric_limits. Don't take `long double` into account when we are not
      handling `long double` natively anyway.
      
      Fix the convert test to always run the conversion even if we are not going to
      compare against libc's printf result. This allows exercising the code itself to
      make sure we don't trigger assertions or UB found by sanitizers.
      
      PiperOrigin-RevId: 355857729
      
      --
      ff5f893319fa76b273c7785b76ef6c95b1791076 by Abseil Team <absl-team@google.com>:
      
      Example usage tweak
      
      PiperOrigin-RevId: 355695750
      
      --
      0efc454f90023fa651b226e5e3ba7395a3b60c6d by Benjamin Barenblat <bbaren@google.com>:
      
      Remove endian-sensitivity from Abseil’s RNG
      
      Ensure that the Abseil random number generator produces identical output
      on both big- and little-endian platforms by byte-swapping appropriately
      on big-endian systems.
      
      PiperOrigin-RevId: 355635051
      GitOrigin-RevId: 756156bf03da050e8b27539a8247d9af7e44c6a2
      Change-Id: Iaaa69767b8e85d626742b9ba56fefb75f07c69ee
      c36d825d
  20. 03 Feb, 2021 2 commits
    • Abseil Team's avatar
      Export of internal Abseil changes · 9c6a50fd
      Abseil Team authored
      --
      4ff721439234e91caf6f7b772e5f554e7dd423c8 by Benjamin Barenblat <bbaren@google.com>:
      
      Remove endian-sensitivity from hash slow path
      
      Prior to this commit, the Abseil hash fast path was endian-agnostic, but
      the slow path assumed a little-endian platform. Change the slow path to
      be endian-correct, ensuring that values produced by the fast and slow
      paths are equal even on big-endian systems.
      
      PiperOrigin-RevId: 355424258
      
      --
      7f4fe1aa4de46ad0a2ef19fa9c061fc12a7391ed by Abseil Team <absl-team@google.com>:
      
      Directly store CordzInfo in the InlineData data contents of InlineRep
      
      This greatly reduces the cost of coping and moving cords. Especially the move constructor and move assignment are now back to lean loads and stores without needing any CordzInfo lookups for tracked cords.
      
      PiperOrigin-RevId: 355409161
      
      --
      3ca4ca84ed6d98f1e383ffd8d12c28876e905bb3 by Abseil Team <absl-team@google.com>:
      
      Add #include <unordered_map>
      
      PiperOrigin-RevId: 355386114
      
      --
      30b0ffad0621971b3135148fcc9e183b0dd2a6bb by Abseil Team <absl-team@google.com>:
      
      Optimize Cord copy constructor
      
      This change avoids double stores of the Cord copy constructor from the zero init of the InlineData / InlineRep contents followed by the assignment and inlines the copy constructor.
      
      PiperOrigin-RevId: 355287939
      
      --
      0c043fa7b6e41ca7cefc5edc1e17ad46223e4e77 by CJ Johnson <johnsoncj@google.com>:
      
      Now that the absl::Cleanup example returns absl::Status, since we decided on absl::FailedPreconditionError, the precondition should be a positive statement and then the check should be failure to adhere to that positive statement
      
      PiperOrigin-RevId: 355216923
      
      --
      9ed922ca5d28fe8790ec6bc0837cf39fbcc92896 by Gennadiy Rozental <rogeeff@google.com>:
      
      Do not set mvsc linker flags for clang-cl (fixes #874)
      
      Import of https://github.com/abseil/abseil-cpp/pull/891
      
      PiperOrigin-RevId: 355199380
      GitOrigin-RevId: 4ff721439234e91caf6f7b772e5f554e7dd423c8
      Change-Id: I3d9d2383549720d7a91f9108dfcd979ad6632fce
      9c6a50fd
    • Christian Fersch's avatar
  21. 02 Feb, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 20869f89
      Abseil Team authored
      --
      cea62ebc5d31c62aabcb94c066d9be506f34baf6 by Abseil Team <absl-team@google.com>:
      
      Fix typo in `Cord::EndsWith()` docs
      
      PiperOrigin-RevId: 355023067
      
      --
      f89225a55476478ec167be50dea543f5414836f9 by Abseil Team <absl-team@google.com>:
      
      Add set_cordz_info() and get_cordz_info() methods to InlineData
      
      This change has preparations for future (optional) integration of CordzInfo sampling data into Cord's InlineData for non inlined cords.
      
      PiperOrigin-RevId: 354965340
      
      --
      324057574aeb697bd3327cb905eb5bca16ade768 by Abseil Team <absl-team@google.com>:
      
      Fix two comment typos.
      
      PiperOrigin-RevId: 354952568
      
      --
      5bb93ca3d57ead3633e1efde4aa28718987ef64f by CJ Johnson <johnsoncj@google.com>:
      
      Clarify doc comment for absl::Cleanup by using absl::Status return type and clarify the engaged state by surfacing the initial value in the public header.
      
      PiperOrigin-RevId: 354935253
      
      --
      ec95424594b24a1aec9bf7972b2355f37285506a by Abseil Team <absl-team@google.com>:
      
      Remove `preserve_most` attribute from CordRep::Destroy()
      
      PiperOrigin-RevId: 354921927
      GitOrigin-RevId: cea62ebc5d31c62aabcb94c066d9be506f34baf6
      Change-Id: Ibe1d66197db7ce9554594e07b1c6e7c6dea3c9da
      20869f89
  22. 30 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 184d2f83
      Abseil Team authored
      --
      8c77b14bdee3f4cafb8ba520d4d050b15a949fd4 by Derek Mauro <dmauro@google.com>:
      
      Fix absl::Cleanup usage example
      
      PiperOrigin-RevId: 354702001
      
      --
      10365da7a0aacaa0c4774a4b618a76dff328611b by CJ Johnson <johnsoncj@google.com>:
      
      Swap the order of the C++11 and C++17 interfaces for absl::Cleanup to mirror the order used in the comment example
      
      PiperOrigin-RevId: 354675180
      GitOrigin-RevId: 8c77b14bdee3f4cafb8ba520d4d050b15a949fd4
      Change-Id: Ia2054b725ed737ff9e557cb3d973de7c34bc51b0
      184d2f83
  23. 29 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · a9a49560
      Abseil Team authored
      --
      c68f1886f5e8fd90eb0c2d2e68feaf00a7cdacda by CJ Johnson <johnsoncj@google.com>:
      
      Introduce absl::Cleanup to the OSS repo
      
      PiperOrigin-RevId: 354583156
      
      --
      17030cf388e10f7eb959e3e566326d1072ce392e by Abseil Team <absl-team@google.com>:
      
      Internal change only
      
      PiperOrigin-RevId: 354574953
      
      --
      e979d7236d4f3252e79ddda6739b67a9a326bf6d by CJ Johnson <johnsoncj@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 354545297
      
      --
      7ea02b3783f7f49ef97d86a8f6580a19cc57df14 by Abseil Team <absl-team@google.com>:
      
      Pre-allocate memory for vectors where the size is known.
      
      PiperOrigin-RevId: 354344576
      
      --
      9246c7cb11f1d6444f79ebe25acc69a8a9b870e0 by Matt Kulukundis <kfm@google.com>:
      
      Add support for Elbrus 2000 (e2k)
      
      Import of https://github.com/abseil/abseil-cpp/pull/889
      
      PiperOrigin-RevId: 354344013
      
      --
      0fc93d359cc1fb307552e917b37b7b2e7eed822f by Abseil Team <absl-team@google.com>:
      
      Integrate CordRepRing logic into cord (but do not enable it)
      
      PiperOrigin-RevId: 354312238
      
      --
      eda05622f7da71466723acb33403f783529df24b by Abseil Team <absl-team@google.com>:
      
      Protect ignore diagnostic with "__has_warning".
      
      PiperOrigin-RevId: 354112334
      
      --
      47716c5d8fb10efa4fdd801d28bac414c6f8ec32 by Abseil Team <absl-team@google.com>:
      
      Rearrange InlinedVector copy constructor and destructor to treat
      a few special cases inline and then tail-call a non-inlined routine
      for the rest.  In particular, we optimize for empty vectors in both
      cases.
      
      Added a couple of benchmarks that copy either an InlVec<int64> or
      an InlVec<InlVec<int64>>.
      
      Speed difference:
      ```
      BM_CopyTrivial/0                                    0.92ns +- 0%   0.47ns +- 0%  -48.91%  (p=0.000 n=11+12)
      BM_CopyTrivial/1                                    0.92ns +- 0%   1.15ns +- 0%  +25.00%  (p=0.000 n=10+9)
      BM_CopyTrivial/8                                    8.57ns +- 0%  10.72ns +- 1%  +25.16%  (p=0.000 n=10+12)
      BM_CopyNonTrivial/0                                 3.21ns +- 0%   0.70ns +- 0%  -78.23%  (p=0.000 n=12+10)
      BM_CopyNonTrivial/1                                 5.88ns +- 1%   5.51ns +- 0%   -6.28%  (p=0.000 n=10+8)
      BM_CopyNonTrivial/8                                 21.5ns +- 1%   15.2ns +- 2%  -29.23%  (p=0.000 n=12+12)
      ```
      
      Note: the slowdowns are a few cycles which is expected given the procedure
      call added in that case. We decided this is a good tradeoff given the code
      size reductions and the more significant speedups for empty vectors.
      
      Size difference (as measured by nm):
      ```
      BM_CopyTrivial     from 1048 bytes to 326 bytes.
      BM_CopyNonTrivial  from  749 bytes to 470 bytes.
      ```
      
      Code size for a large binary drops by ~500KB (from 349415719 to 348906015 348906191).
      
      All of the benchmarks that showed a significant difference:
      
      Ones that improve with this CL:
      ```
      BM_CopyNonTrivial/0                                 3.21ns +- 0%   0.70ns +- 0%  -78.23%  (p=0.000 n=12+10)
      BM_InlinedVectorFillString/0                        0.93ns +- 0%   0.24ns +- 0%  -74.19%  (p=0.000 n=12+10)
      BM_InlinedVectorAssignments/1                       10.5ns +- 0%    4.1ns +- 0%  -60.64%  (p=0.000 n=11+10)
      BM_InlinedVectorAssignments/2                       10.7ns +- 0%    4.4ns +- 0%  -59.08%  (p=0.000 n=11+11)
      BM_CopyTrivial/0                                    0.92ns +- 0%   0.47ns +- 0%  -48.91%  (p=0.000 n=11+12)
      BM_CopyNonTrivial/8                                 21.5ns +- 1%   15.2ns +- 2%  -29.23%  (p=0.000 n=12+12)
      BM_StdVectorEmpty                                   0.47ns +- 1%   0.35ns +- 0%  -24.73%  (p=0.000 n=12+12)
      BM_StdVectorSize                                    0.46ns +- 2%   0.35ns +- 0%  -24.32%  (p=0.000 n=12+12)
      BM_SwapElements<LargeCopyableOnly>/0                3.44ns +- 0%   2.76ns +- 1%  -19.83%  (p=0.000 n=11+11)
      BM_InlinedVectorFillRange/256                       20.7ns +- 1%   17.8ns +- 0%  -14.08%  (p=0.000 n=12+9)
      BM_CopyNonTrivial/1                                 5.88ns +- 1%   5.51ns +- 0%   -6.28%  (p=0.000 n=10+8)
      BM_SwapElements<LargeCopyableMovable>/1             4.19ns +- 0%   3.95ns +- 1%   -5.63%  (p=0.000 n=11+12)
      BM_SwapElements<LargeCopyableMovableSwappable>/1    4.18ns +- 0%   3.99ns +- 0%   -4.70%  (p=0.000 n=9+11)
      BM_SwapElements<LargeCopyableMovable>/0             2.41ns +- 0%   2.31ns +- 0%   -4.45%  (p=0.000 n=12+12)
      BM_InlinedVectorFillRange/64                        8.25ns +- 0%   8.04ns +- 0%   -2.51%  (p=0.000 n=12+11)
      BM_SwapElements<LargeCopyableOnly>/1                82.4ns +- 0%   81.5ns +- 0%   -1.06%  (p=0.000 n=12+12)
      ```
      
      Ones that get worse with this CL:
      ```
      BM_CopyTrivial/1                                    0.92ns +- 0%   1.15ns +- 0%  +25.00%  (p=0.000 n=10+9)
      BM_CopyTrivial/8                                    8.57ns +- 0%  10.72ns +- 1%  +25.16%  (p=0.000 n=10+12)
      BM_SwapElements<LargeCopyableMovableSwappable>/512  1.48ns +- 1%   1.66ns +- 1%  +11.88%  (p=0.000 n=12+12)
      BM_InlinedVectorFillString/1                        11.5ns +- 0%   12.8ns +- 1%  +11.62%  (p=0.000 n=12+11)
      BM_SwapElements<LargeCopyableMovableSwappable>/64   1.48ns +- 2%   1.66ns +- 1%  +11.66%  (p=0.000 n=12+11)
      BM_SwapElements<LargeCopyableMovableSwappable>/1k   1.48ns +- 1%   1.65ns +- 2%  +11.32%  (p=0.000 n=12+12)
      BM_SwapElements<LargeCopyableMovable>/512           1.48ns +- 2%   1.58ns +- 4%   +6.62%  (p=0.000 n=11+12)
      BM_SwapElements<LargeCopyableMovable>/1k            1.49ns +- 2%   1.58ns +- 3%   +6.05%  (p=0.000 n=12+12)
      BM_SwapElements<LargeCopyableMovable>/64            1.48ns +- 2%   1.57ns +- 4%   +6.04%  (p=0.000 n=11+12)
      BM_InlinedVectorFillRange/1                         4.81ns +- 0%   5.05ns +- 0%   +4.83%  (p=0.000 n=11+11)
      BM_InlinedVectorFillString/8                        79.4ns +- 1%   83.1ns +- 1%   +4.64%  (p=0.000 n=10+12)
      BM_StdVectorFillString/1                            16.3ns +- 0%   16.6ns +- 0%   +2.13%  (p=0.000 n=11+8)
      ```
      
      PiperOrigin-RevId: 353906786
      
      --
      8e26518b3cec9c598e5e9573c46c3bd1b03a67ef by Abseil Team <absl-team@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 353737330
      
      --
      f206ae0983e58c9904ed8b8f05f9caf564a446be by Matt Kulukundis <kfm@google.com>:
      
      Import of CCTZ from GitHub.
      
      PiperOrigin-RevId: 353682256
      GitOrigin-RevId: c68f1886f5e8fd90eb0c2d2e68feaf00a7cdacda
      Change-Id: I5790c1036c4f543c701d1039848fabf7ae881ad8
      a9a49560
  24. 28 Jan, 2021 1 commit
  25. 25 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · e4e2e57e
      Abseil Team authored
      --
      cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0 by Jorg Brown <jorg@google.com>:
      
      Add union padding to AsTree, to avoid issues on 32-bit MSVC 2015 compilers
      
      alignas() causes compiler errors as per https://godbolt.org/z/vaTKjn
      This change uses explicit padding to achieve what we want: https://godbolt.org/z/Mfjhhj
      
      PiperOrigin-RevId: 353211413
      
      --
      b1ac7430ffdefe58c01b29e9acd182cda4630e1d by Jorg Brown <jorg@google.com>:
      
      Make the casting functions flat() and ring() be static_cast, rather than reinterpret_cast.
      
      PiperOrigin-RevId: 353149543
      
      --
      c37a6761c31720317c8b0b7db62b693643a88586 by Abseil Team <absl-team@google.com>:
      
      Integrate CordRepRing logic into cord (but do not enable it)
      
      PiperOrigin-RevId: 353135656
      
      --
      2007fd3045ed6285106795cf8f2e6d792922f5e8 by Abseil Team <absl-team@google.com>:
      
      Fix a typo in the description of ::equal_range(). The correct return is actually a half-open range [first, last).
      
      PiperOrigin-RevId: 353122213
      
      --
      6683fa2ba7271dd1f575bd7742d97f47a034c9d2 by Abseil Team <absl-team@google.com>:
      
      Integrate CordRepRing logic into cord (but do not enable it)
      
      PiperOrigin-RevId: 353121763
      GitOrigin-RevId: cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0
      Change-Id: I6635163cd634706f5462c4065aa278e6bf193a72
      e4e2e57e
  26. 21 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 3a2d6572
      Abseil Team authored
      --
      3b43586da865534cf86401d2cae09c65c60b8474 by Abseil Team <absl-team@google.com>:
      
      Introduce CordRepRingReader class
      
      PiperOrigin-RevId: 353070937
      
      --
      0bff6e4bcca34fdd1e6610da5fb3c37fd49b2940 by Abseil Team <absl-team@google.com>:
      
      Fix docstring typo "Exmaple" -> "Example"
      
      PiperOrigin-RevId: 352927688
      
      --
      1ef4e0a1100cfa7bc9d9e8f155acf0e469348b56 by Abseil Team <absl-team@google.com>:
      
      Refactor tree initialization of ChunkIterator and CordReader
      
      PiperOrigin-RevId: 352916786
      
      --
      919c3eb175b87294184a405785eef4fab520d47e by Abseil Team <absl-team@google.com>:
      
      Disable `preserve_most` when compiling with sanitizers.
      
      PiperOrigin-RevId: 352890630
      GitOrigin-RevId: 3b43586da865534cf86401d2cae09c65c60b8474
      Change-Id: I8a733494b353af69a46862a4019a7f9b40148f49
      3a2d6572
  27. 20 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 22771d47
      Abseil Team authored
      --
      642ab296a2c9629c44f3f2ce6911cd2488bcf416 by Derek Mauro <dmauro@google.com>:
      
      Remove an obsolete check in CMakeLists.txt
      
      PiperOrigin-RevId: 352852564
      
      --
      ce78cb96bcfd162737dbcf35005da3d1d6a3486b by Abseil Team <absl-team@google.com>:
      
      Clarify that the calling *thread* must have locked the mutex in order to unlock
      it.
      
      PiperOrigin-RevId: 352801804
      
      --
      24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>:
      
      Fixes failing CMake string comparisons
      https://cmake.org/cmake/help/latest/policy/CMP0054.html
      
      Fixes #791
      
      PiperOrigin-RevId: 352791054
      
      --
      0ac10bc3f4dca2c4c4b51d7b8196a2eaee9537a1 by Abseil Team <absl-team@google.com>:
      
      Introduce CordRepRing class
      
      This change introduces the CordRepRing class that implements all the lower level / internal implementation for upcoming CordRepRing ring buffer support in cord.
      
      PiperOrigin-RevId: 352771994
      
      --
      4bd36dda61760785844f0f29f26d90cc18046f75 by Abseil Team <absl-team@google.com>:
      
      Optimize InlineData representation for cord sampling (cordz)
      
      This CL changes InlineData to allow us to store a (future) Cordz Info pointer directly into the inline representation:
      
      - make InlineData a class that provides a public API to set the active union members (tree or chars) and safely access that data.
      - change 'tree' and 'profiled' bits to be the 2 least significant bits, allowing us 62 continquous bits for storing a Cordz Info pointer.
      
      PiperOrigin-RevId: 352642411
      
      --
      dc55ba71bbce0e6a83e05a453990c51ac3d68426 by Mark Barolak <mbar@google.com>:
      
      Add unit test coverage for the mutating overload of absl::AsciiStrToLower.
      
      PiperOrigin-RevId: 352626006
      GitOrigin-RevId: 642ab296a2c9629c44f3f2ce6911cd2488bcf416
      Change-Id: I6c5929dd830d3c630e14e7fd5387fc3e25a69100
      22771d47
  28. 19 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · b2dcbba1
      Abseil Team authored
      --
      874f906d2b90d4c74b0edeac52811efc10323422 by Todd Lipcon <tlipcon@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 352140672
      GitOrigin-RevId: 874f906d2b90d4c74b0edeac52811efc10323422
      Change-Id: I151299caff75d404309f059dd0e5971f5a71655d
      b2dcbba1
  29. 14 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · ff361eb3
      Abseil Team authored
      --
      e36760a8db7f0417dad3429987c2b026278a1e07 by Andy Getzendanner <durandal@google.com>:
      
      Nit: s/GUARDED_BY/ABSL_GUARDED_BY/
      
      PiperOrigin-RevId: 351752933
      GitOrigin-RevId: e36760a8db7f0417dad3429987c2b026278a1e07
      Change-Id: Ib8394f030092b1832adde759cd37e0207acc7e4b
      ff361eb3
  30. 13 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 64461421
      Abseil Team authored
      --
      a0491c8d790972cd80e2d720fe1fdf5f711a6f1a by Greg Falcon <gfalcon@google.com>:
      
      Stop directly accessing CordRepFlat data via CordRep::data.
      
      The old pattern of access breaks the `CordRep` type abstraction; since `CordRep::data` is not in general guaranteed to contain the chunk's data, we shouldn't access it that way.
      
      This incidentally adds an assertion check (via the flat() accessor) that the CordRep is indeed flat on each such access, but a manual inspection of the code, as well as the fact that this code currently works, suggest that this is always true.)
      
      PiperOrigin-RevId: 351592344
      
      --
      f40c3b43ca5b1d7e23cd45f1ffac1783105ac1a3 by Abseil Team <absl-team@google.com>:
      
      Revert 18abb2902b9f06c63a968b24d3dda785ebf99a22
      
      PiperOrigin-RevId: 351523518
      
      --
      18abb2902b9f06c63a968b24d3dda785ebf99a22 by Abseil Team <absl-team@google.com>:
      
      Internal change
      
      PiperOrigin-RevId: 351512412
      
      --
      9b881602d45e95e06089792c7627cd56528a255a by Abseil Team <absl-team@google.com>:
      
      Keep time's global state in a cacheline-aligned structure.
      
      Keeping the global state as separate global variables results in two issues:
      1) False sharing with adjacent global data (e.g., cycle clock source), since
         the global fields are updated every O(10usec).
      2) The hot global fields (e.g., seq and samples) can reside on different
         cache lines.
      
      To fix this, simply wrap the global data in a ABSL_CACHE_ALIGNED structure.
      This is similar to what we do for MutexGlobals.
      
      PiperOrigin-RevId: 351389466
      GitOrigin-RevId: a0491c8d790972cd80e2d720fe1fdf5f711a6f1a
      Change-Id: Ie0fa80112043381cd37c84e2ab2b7334839f54b5
      64461421
  31. 12 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 322ae242
      Abseil Team authored
      --
      1609589925459c2c0b2a17912c0d65227f709db9 by Abseil Team <absl-team@google.com>:
      
      Clarify the "Potential Mutex deadlock" reason message.
      
      PiperOrigin-RevId: 351367862
      
      --
      88bf28863db2c2d2d48767c3e4dfab6a48bdff79 by Abseil Team <absl-team@google.com>:
      
      Print CPU number is fault handler.
      
      This CL adds code to print CPU number inside the fault handler.  This is only supported on Linux.  The CPU number is also a hint only.  There is no guarantee that it is indeed the CPU on which a fault happened.
      
      PiperOrigin-RevId: 351238373
      
      --
      66a9c8e44b5744fec1ca0d7b8db7e1d50772d9a2 by Samuel Benzaquen <sbenza@google.com>:
      
      Add better error message for ODR violations of flags.
      
      PiperOrigin-RevId: 351197423
      
      --
      6efd1efb341563148dd43255aaa4bf959dfd9554 by Chris Kennelly <ckennelly@google.com>:
      
      Assume bitwise builtins are available on GCC.
      
      These are long-standing builtins but are not consistently detected by
      ABSL_HAVE_BUILTIN.
      
      PiperOrigin-RevId: 350814036
      GitOrigin-RevId: 1609589925459c2c0b2a17912c0d65227f709db9
      Change-Id: Ied3fd2f135187f2c316b403fba45f3bbaea54138
      322ae242
  32. 08 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 62ce712e
      Abseil Team authored
      --
      b927776da818c674a674e46a7bbbdd54170a0ad3 by Todd Lipcon <tlipcon@google.com>:
      
      Include priority in the calculation of mutex waiter equivalence
      
      This changes the behavior of the absl::Mutex wait list to take into account
      waiter priority when creating "skip chains". A skip chain on the wait list
      is a set of adjacent waiters that share some property and enable skipping
      during traversal.
      
      Prior to this CL, the skip chains were formed of waiters with the same
      wait type (e.g. exclusive vs read) and Condition. With this CL, the priority
      is also taken into account.
      
      This avoids O(n) behavior when enqueueing a waiter onto a wait list where
      the oldest waiter is at a lower priority than the waiter to be enqueued.
      With the prior notion of equivalence class, a skip chain could contain
      waiters of different priority, so we had to walk the linked list one-by-one
      until finding the appropriate insertion point. With the new equivalence
      class computation, we can skip past all of the equivalent waiters to find
      the right insertion point.
      
      This gives a substantial improvement to the enqueue performance in the
      case where there's already a waiter at lower priority.
      
      Note that even though this code path isn't a hot one, it's performed while
      holding the Mutex's spinlock, which prevents other threads from unlocking
      the Mutex, so minimizing the time under the critical section can have
      "knock-on" throughput benefits.
      
      Notable performance differences:
      
      name                                                                    old cpu/op  new cpu/op  delta
      BM_MutexEnqueue/multiple_priorities:0/threads:4                         8.60µs ± 7%  8.69µs ± 6%     ~     (p=0.365 n=19+20)
      BM_MutexEnqueue/multiple_priorities:0/threads:64                        8.47µs ± 5%  8.64µs ±10%     ~     (p=0.569 n=19+20)
      BM_MutexEnqueue/multiple_priorities:0/threads:128                       8.56µs ± 3%  8.55µs ± 6%     ~     (p=0.563 n=17+17)
      BM_MutexEnqueue/multiple_priorities:0/threads:512                       8.98µs ± 8%  8.86µs ± 4%     ~     (p=0.232 n=19+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:4                         6.64µs ±10%  6.45µs ± 4%     ~     (p=0.097 n=20+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:64                        15.2µs ± 8%   9.1µs ± 4%  -39.93%  (p=0.000 n=20+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:128                       22.3µs ± 6%   9.4µs ± 4%  -57.82%  (p=0.000 n=20+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:512                       61.5µs ± 3%  10.1µs ± 8%  -83.53%  (p=0.000 n=20+20)
      
      name                                                                    old time/op             new time/op             delta
      BM_Mutex/real_time/threads:1                                            19.6ns ± 4%             19.8ns ±11%     ~           (p=0.534 n=17+17)
      BM_Mutex/real_time/threads:112                                           120ns ±17%              122ns ±14%     ~           (p=0.988 n=20+18)
      BM_MutexEnqueue/multiple_priorities:0/threads:4                         5.18µs ± 6%             5.23µs ± 6%     ~           (p=0.428 n=19+20)
      BM_MutexEnqueue/multiple_priorities:0/threads:64                        5.06µs ± 5%             5.18µs ±10%     ~           (p=0.235 n=19+20)
      BM_MutexEnqueue/multiple_priorities:0/threads:128                       5.16µs ± 3%             5.14µs ± 6%     ~           (p=0.474 n=17+17)
      BM_MutexEnqueue/multiple_priorities:0/threads:512                       5.40µs ± 8%             5.32µs ± 5%     ~           (p=0.196 n=20+18)
      BM_MutexEnqueue/multiple_priorities:1/threads:4                         3.99µs ±10%             3.88µs ± 3%     ~           (p=0.074 n=20+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:64                        8.48µs ± 9%             5.41µs ± 3%  -36.20%        (p=0.000 n=20+16)
      BM_MutexEnqueue/multiple_priorities:1/threads:128                       12.2µs ± 6%              5.6µs ± 4%  -54.43%        (p=0.000 n=20+17)
      BM_MutexEnqueue/multiple_priorities:1/threads:512                       32.1µs ± 3%              5.9µs ± 8%  -81.45%        (p=0.000 n=20+20)
      ...
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:32   1.69µs ± 4%             1.66µs ± 2%   -1.91%        (p=0.000 n=20+20)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:48   1.90µs ± 2%             1.82µs ± 2%   -4.09%        (p=0.000 n=20+19)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:64   2.19µs ± 2%             1.80µs ± 1%  -17.89%        (p=0.000 n=20+20)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:96   2.18µs ± 5%             1.81µs ± 1%  -16.94%        (p=0.000 n=17+19)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:128  2.18µs ± 1%             1.91µs ± 2%  -12.33%        (p=0.000 n=19+20)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:192  2.27µs ± 2%             1.89µs ± 1%  -16.79%        (p=0.000 n=20+19)
      BM_Contended<absl::Mutex>/cs_ns:2000/num_prios:2/real_time/threads:256  2.36µs ± 2%             1.83µs ± 1%  -22.25%        (p=0.000 n=20+19)
      
      PiperOrigin-RevId: 350775432
      
      --
      e7812590e5dbd75d21e2e8762713bd04c0353ef6 by Todd Lipcon <tlipcon@google.com>:
      
      Fix test timeouts for sequence_lock_test on TSAN
      
      PiperOrigin-RevId: 350680903
      
      --
      3090d8154d875f3eabce48876321ae8d6a197302 by Todd Lipcon <tlipcon@google.com>:
      
      Add benchmarks for Mutex performance with multiple priorities
      
      This adds a new benchmark to mutex_benchmark which forces threads to go
      through the slow "Enqueue" path. The benchmark runs with varying numbers
      of threads and with/without the presence of a lower-priority waiter.
      
      PiperOrigin-RevId: 350655403
      GitOrigin-RevId: b927776da818c674a674e46a7bbbdd54170a0ad3
      Change-Id: If739e5e205f0d3867661a52466b8f64e7e033b22
      62ce712e
  33. 07 Jan, 2021 1 commit
    • Abseil Team's avatar
      Export of internal Abseil changes · 92ba5359
      Abseil Team authored
      --
      e86453648e05d9bf30ff97a68fba8ce5134ee1c9 by Abseil Team <absl-team@google.com>:
      
      Fix compilation in C with clang on windows with -Wundef flag
      
      PiperOrigin-RevId: 350545275
      GitOrigin-RevId: e86453648e05d9bf30ff97a68fba8ce5134ee1c9
      Change-Id: I029538298ff894d5798b9c6f488af7aa1a3ec2a7
      92ba5359