summaryrefslogtreecommitdiff
path: root/absl/flags
Commit message (Collapse)AuthorAge
* Add a comment to absl/flags/parse.cc indicating that the flags defined there ↵Gravatar Mark Barolak2023-07-11
| | | | | | | are not intended to be read or set from C++ code. PiperOrigin-RevId: 547264846 Change-Id: Idd0958f308ec74f907c22cce965fac2e06692e2c
* Bug fixGravatar Tsige Solomon2023-06-15
| | | | | PiperOrigin-RevId: 540586646 Change-Id: Iac1e133647fbaa5036ac9ef7322f9af5886c658e
* Adding more support and testing for int128 and uint128 flags from cl/534444213Gravatar Abseil Team2023-06-12
| | | | | PiperOrigin-RevId: 539726003 Change-Id: Ie38f8d48a7b4c9d498fc1c4c4af6138048f80f68
* Update XML output to properly print special characters. Non printable ↵Gravatar Gennadiy Rozental2023-06-07
| | | | | | | characters are skipped in output. All the "whitespace-like" (including \t, \r, \n) characters printed as plain space ' '. PiperOrigin-RevId: 538479923 Change-Id: I62dff39bb21f376d00a7b9480f8f1d31d7015e45
* Adding support for int128 and uint128 flag typesGravatar Abseil Team2023-06-01
| | | | | PiperOrigin-RevId: 537120102 Change-Id: I7952e53aca10319eb433e4c4d60cf3d7fe74d19a
* Migrate most RAW_LOGs and RAW_CHECKs in tests to regular LOG and CHECK.Gravatar Andy Getzendanner2023-05-23
| | | | | | | | | | | The non-RAW_ versions provide better output but weren't available when most of these tests were written. There are just a couple spots where RAW_ is actually needed, e.g. signal handlers and malloc hooks. Also fix a couple warnings in layout_test.cc newly surfaced because the optimizer understands CHECK_XX differently than INTERNAL_CHECK. PiperOrigin-RevId: 534584435 Change-Id: I8d36fa809ffdaae5a3813064bd602cb8611c1613
* Fix spelling mistakesGravatar Vertexwahn2023-05-02
|
* Fix spelling mistakesGravatar Vertexwahn2023-04-27
|
* Fix some spelling mistakesGravatar Vertexwahn2023-04-24
|
* Replace absl::type_traits_internal::is_trivially_copyable withGravatar Derek Mauro2023-04-12
| | | | | | | std::is_trivially_copyable PiperOrigin-RevId: 523724345 Change-Id: Id68c79c3bbb253d892bdef4659ac8a926e023d12
* Use stdout for help output even in case of errors.Gravatar Gennadiy Rozental2023-04-06
| | | | | PiperOrigin-RevId: 522393331 Change-Id: Ia5f4ad6a2d16c033ea97f3c7e27e8eb7ee429242
* Add a call to handle usage flags in case of unrecognized flagsGravatar Gennadiy Rozental2023-03-24
| | | | | PiperOrigin-RevId: 519090305 Change-Id: Ic97a36da33e1e0681765a913f3c54c3d818eebdc
* Change ParseAbseilFlagsOnly function to include handling of usage flags and ↵Gravatar Gennadiy Rozental2023-03-21
| | | | | | | exit on syntax errors. PiperOrigin-RevId: 518198160 Change-Id: Ib4fe53e0b0b371472b6b9473aeb84779953b6a38
* Correct semantic and documentation for the ReportUnrecognizedFlags interfaceGravatar Gennadiy Rozental2023-03-13
| | | | | PiperOrigin-RevId: 516411395 Change-Id: I442fc9435bd7a829802c325e2e4106aa6775c263
* Introduce two new public APIs for parsing command line flags.Gravatar Gennadiy Rozental2023-03-08
| | | | | | | | | | | ParseAbseilFlagsOnly To be used to parse Abseil Flags only and classify the rest of the arguments. ReportUnrecognizedFlags To be used to report unrecognized flags. PiperOrigin-RevId: 515082682 Change-Id: I73271b56cc512a5e78b5fcd035564b3672d62ca8
* Finally delete ArgListAction after cleanup is completed.Gravatar Gennadiy Rozental2023-03-01
| | | | | PiperOrigin-RevId: 513379475 Change-Id: I0d7af3a0d2bf4da6eec66a5320ecc402d2e8fec8
* Eliminate internal ArgvListAction enum.Gravatar Gennadiy Rozental2023-02-27
| | | | | PiperOrigin-RevId: 512697257 Change-Id: I828ac7a4ada482d60beba767ef9da6e2c0077c33
* Merge pull request #1394 from AtariDreams:constructorsGravatar Copybara-Service2023-02-21
|\ | | | | | | | | PiperOrigin-RevId: 511271203 Change-Id: I1ed352e06265b705b62d401a50b4699d01f7f1d7
| * Convert empty constructors to default onesGravatar Rose2023-02-17
| | | | | | | | These make the changed constructors match closer to the other ones that are default.
* | Prefer emplace back over push_back where emplace_back is more appropriateGravatar Rose2023-02-16
|/ | | | This also helps a lot with dealing with conversions and data structure creation under the hood.
* Fix missing includes/dependenciesGravatar Derek Mauro2023-02-02
| | | | | PiperOrigin-RevId: 506622658 Change-Id: I17ae2d97a6cadb7bdd8ebd0ec0dd3976568cb7e1
* Merge pull request #1356 from MBkkt:patch-6Gravatar Copybara-Service2023-01-09
|\ | | | | | | | | PiperOrigin-RevId: 500726761 Change-Id: I42fbd4d2d8015e907b3c40417d35be2bbb63085e
| * Fix missing includeGravatar Valery Mironov2023-01-06
|/
* Suggest similar flags in case of undefined flags.Gravatar Abseil Team2023-01-04
| | | | | | | Using Damerau-Levenshtein distance to calculate potential candidates to suggest. PiperOrigin-RevId: 499449034 Change-Id: I805aafefcd0f4f85585ac33a041c15360619c96a
* Only build the section of flag_benchmark used for viewing theGravatar Derek Mauro2022-12-12
| | | | | | | | | | | | | | disassembly under LLVM. Due to the issue described in https://github.com/abseil/abseil-cpp/issues/1340 and https://github.com/google/benchmark/commit/8545dfb3ea301f5c77626a046d4756ef9f2e4970 it no longer builds under GCC. The other changes are necessary to fix the build using the latest benchmark snapshot Fixes #1340 PiperOrigin-RevId: 494809290 Change-Id: I4a03b2e2dcbdc273e59f1f09f204322e388e7cea
* Fix a few lint findings in flags' usage.ccGravatar Michael Diamond2022-11-06
| | | | | PiperOrigin-RevId: 486480813 Change-Id: I05292dd0550dfb4130bbe47eafa96ff5b58c040b
* Fix "unsafe narrowing" warnings in absl, 8/n.Gravatar Abseil Team2022-09-12
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in */internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 473868797 Change-Id: Ibe0b76e33f9e001d59862beaac54fb47bacd39b2
* Fix "unsafe narrowing" warnings in absl, 9/n.Gravatar Abseil Team2022-09-08
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on miscellaneous non-test source files.) Bug: chromium:1292951 PiperOrigin-RevId: 473054605 Change-Id: Ifd7b24966613ca915511a3a607095508068200b8
* Rollback of fix "unsafe narrowing" warnings in absl, 8/n.Gravatar Derek Mauro2022-09-01
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in */internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 471561809 Change-Id: I7abd6d83706f5ca135f1ce3458192a498a6280b9
* Fix "unsafe narrowing" warnings in absl, 8/n.Gravatar Abseil Team2022-09-01
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in */internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 471549854 Change-Id: Id685d0e4666212926f4e001b8ef4930b6a33a4cc
* Typo fixGravatar Gennadiy Rozental2022-08-31
| | | | | PiperOrigin-RevId: 471290034 Change-Id: If5bbb990c302827c656c6437e6932221261d1319
* Added some more no_test.. tags to build targets for controlling testing.Gravatar Abseil Team2022-08-31
| | | | | PiperOrigin-RevId: 471256712 Change-Id: I2a1e4846a524bccd3c935a40abab0c0218afdfc0
* Release the Abseil Logging libraryGravatar Gennadiy Rozental2022-08-25
| | | | | PiperOrigin-RevId: 470080638 Change-Id: I8d9ddfabc7704c383ed5a73abf0411f4c58a4bf7
* Update GoogleTest version used by AbseilGravatar Derek Mauro2022-06-16
| | | | | | | | | | | | As part of this update, GoogleTest is now using the Abseil flags implementation, and the flags usage_test needs to be modified to pass. If building with bazel and --define=absl=1 to force GoogleTest to use Abseil, a WORKSPACE dependency on the abseil branch of the RE2 project is now required. PiperOrigin-RevId: 455512245 Change-Id: I2025df0c86006fac97a80713524c9d0aae8b358e
* Revert GoogleTest version used by Abseil to commit ↵Gravatar Dino Radakovic2022-06-16
| | | | | | | | | 28e1da21d8d677bc98f12ccc7fc159ff19e8e817 Using GoogleTest at 0320f517fd920866d918e564105d68fd4362040a breaks Windows DLLs. PiperOrigin-RevId: 455452411 Change-Id: Iff89a01351c01487786a22701efedf25860fadf9
* Update GoogleTest version used by AbseilGravatar Derek Mauro2022-06-15
| | | | | | | | | | | | As part of this update, GoogleTest is now using the Abseil flags implementation, and the flags usage_test needs to be modified to pass. If building with bazel and --define=absl=1 to force GoogleTest to use Abseil, a WORKSPACE dependency on the abseil branch of the RE2 project is now required. PiperOrigin-RevId: 455257879 Change-Id: Id1548ce7d6a95b747b72a4f255d31ced98e36006
* flags/marshalling_test: work around bogus GCC 12 -Wmaybe-uninitialized warningGravatar Derek Mauro2022-06-14
| | | | | PiperOrigin-RevId: 454934969 Change-Id: Ia4c157133e73ff16390179b37f7a789fc03fa92e
* Add documentation on optional flags to the flags library overview.Gravatar Tom Manshreck2022-06-08
| | | | | PiperOrigin-RevId: 453766125 Change-Id: Id4d88ae20bdadc960a65bc1010eea746f1eba051
* Disable tests on some platforms where they currently fail.Gravatar Tom Rybka2022-06-02
| | | | | PiperOrigin-RevId: 452542838 Change-Id: I45d80b220c0450d27423bb23504e95c25811877b
* Export of internal Abseil changesGravatar Abseil Team2022-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f4c7e510922668c68be4aa79a00867c3d3ca9f95 by Derek Mauro <dmauro@google.com>: Many improvements to LeakChecker builds The presence of the LeakChecker is now detected when possible. GCC users using LeakChecker in standalone mode still need to use -DLEAK_CHECKER. This is now documented in the header. The hacky targets used for testing leak checking have been removed in favor of testing in AddressSanitizer mode on Kokoro. Fixes #885 Fixes #1153 PiperOrigin-RevId: 441203393 Change-Id: Ibe64ef6b104bcaf31839ff7184e558cc86abdd1c -- 5c70a23aa83b8152ab95d2cf21662fc63c80ef7d by Abseil Team <absl-team@google.com>: Add a benchmark for stacktrace PiperOrigin-RevId: 441196473 Change-Id: I4c9aa2e797aa2cae09abfaaee3abe5c09eb62fc4 -- 50b406052273b9d5bad04a7860a96e4d5d956c02 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 441114481 Change-Id: I667af7a50d5631ca91289dd24c91ba90233e0184 -- 568b4eaac120b420bce5290179d407d2b57d5bae by Dino Radakovic <dinor@google.com>: Internal change PiperOrigin-RevId: 440894155 Change-Id: Ia587ffc65a8321126585fb363b7c0ca8cc2a0da2 -- d53948eace4f3a10ac5a6c1496dc51b81adc412c by Abseil Team <absl-team@google.com>: Explicitly give internal linkage to symbols which are not used outside of their translation units. PiperOrigin-RevId: 440424519 Change-Id: I531c5e229d443375483b7550a34f48042589a99b GitOrigin-RevId: f4c7e510922668c68be4aa79a00867c3d3ca9f95
* Export of internal Abseil changesGravatar Abseil Team2022-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- b984c7c1cbee4253192c833046bfcfa16dca8ccf by Dino Radakovic <dinor@google.com>: Restrict visibility of absl/flags:commandlineflag_internal PiperOrigin-RevId: 438591894 Change-Id: I12a6392b2c7f9f1263c741dfd6c43ae22e903aad -- 81315601aab70bb6ac2d17655a727d7f9ee2ff95 by Justin Lebar <jlebar@google.com>: Update example in str_join.h to use a lambda. PiperOrigin-RevId: 438390035 Change-Id: Icc707b972e5a369a71ad774004fdf0a17a9b33a7 -- 1c3c7921224e505faca8617b073f657d3737219f by Dino Radakovic <dinor@google.com>: Internal change PiperOrigin-RevId: 438386036 Change-Id: I6066da1b5a1ddf5af265944a31ed298297b4f2e1 -- 2d6885f78481f04e0e7ee86060aec15b677144f3 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 438378389 Change-Id: If70dd9114114eb44e85afccd521e7fb7e1436b88 -- 7f8282ddee7fcd032e01cbfe65c11c2d166cceb8 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 438374554 Change-Id: I993367952af1dc83bd5aa0ae19a64c024f457fdd -- ce65ba28f6031e45db8fa5118a05410f5166fd7a by Abseil Team <absl-team@google.com>: Spelling gardening: Heterogeneous has an "e" after the "n". PiperOrigin-RevId: 438374411 Change-Id: If1a9098a5d04338837998883739c7b555efa62b4 GitOrigin-RevId: b984c7c1cbee4253192c833046bfcfa16dca8ccf
* Export of internal Abseil changesGravatar Abseil Team2022-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fb671efb2a70f452f17a884b17cf18817b977a8f by Abseil Team <absl-team@google.com>: Remove extra semicolon in ABSL_INTERNAL_ASSERT_IS_FULL macro To fix compilation when empty statement warning is treated as error. PiperOrigin-RevId: 438342663 Change-Id: I3067fbeffa2691888f37554e88f229f24fb55ecc -- a58c9396f1d88d11347aed36ef2e1b633071363c by Martijn Vels <mvels@google.com>: Fix kMaxHeight bounds to kMaxDepth for CordrepBtreeNavigator Added unit test (confirmed failure mode with old code) and extra assertion in the implementation. PiperOrigin-RevId: 438327463 Change-Id: I32242c86b0c879b8a42cb9a92075e537d588e09f -- f348e85dbfc9187ef59085fa2b999374f1670338 by Jorge Gorbe Moya <jgorbe@google.com>: Make the flags enum in `RefcountAndFlags` a named enum to workaround an lldb issue (https://github.com/llvm/llvm-project/issues/54602). PiperOrigin-RevId: 438146097 Change-Id: Ibc2ee26489d99de515a779a903b6458dd0befef7 -- a960a3e9fb2a2e3418f806178e73d8566b78bc85 by Gennadiy Rozental <rogeeff@google.com>: Introduce support for std::optional<T>/absl::optional<T> flag types. PiperOrigin-RevId: 438129500 Change-Id: I3d925c0a7f9ce9f857277fac3b0bf664ccd3a95c GitOrigin-RevId: fb671efb2a70f452f17a884b17cf18817b977a8f
* Export of internal Abseil changesGravatar Abseil Team2022-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f0b7d230a90c82c6fee7adcb46a213d2582b6a7b by Martijn Vels <mvels@google.com>: Optimize substring logic now that CONCAT is removed This CL adds a static Substring() method to CordRepSubstring, and implements substring logic in cord.cc in terms of the new function. This cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed. PiperOrigin-RevId: 431756805 Change-Id: I39c875b5af119916780e68598c7fc619fb2e8476 -- fa7d1bedf0e1244303844869a332c2a5dbd9ac0f by Derek Mauro <dmauro@google.com>: Allow macro expansion within ABSL_FLAG and ABSL_DECLARE_FLAG args PiperOrigin-RevId: 431721184 Change-Id: I6e19713fb541205d796f940998db5ee25178d55e -- 1b328badd92304ed1c634f23e1c191be57b7bb15 by Laramie Leavitt <lar@google.com>: Add #include for std:: types PiperOrigin-RevId: 431546757 Change-Id: I75efbcd3c77e6f53e4db66494101d30d670d988e -- e25323b299d4d3840218702860f537cdd2a3926f by Thomas Köppe <tkoeppe@google.com>: Add hashing support for pointers to member. Also add tests for function pointers to the existing "pointer" test. PiperOrigin-RevId: 431067588 Change-Id: I3686010635d9fee34c47a418b72402e10737cdbc -- ab27b012a61cf10109fd51932b3b0b05ee78f32f by Laramie Leavitt <lar@google.com>: Avoid use of std::pow in ChiSquare test. PiperOrigin-RevId: 431015830 Change-Id: Idd767ff2f51009ee171de48757207b38330ffea3 -- 28c359135d89061177958580fe4a7493802499cb by Laramie Leavitt <lar@google.com>: Add #include <type_traits> for std::false_type PiperOrigin-RevId: 431005757 Change-Id: I85a6a918778601e19512aaea744424cf39018521 -- a920730f23669479d92e3a696d65d0bc3a5b1de1 by Laramie Leavitt <lar@google.com>: #include <utility> for std::declval PiperOrigin-RevId: 431004934 Change-Id: I295237b2d44e9a15e4083698ea121b68ce0a1bb7 GitOrigin-RevId: f0b7d230a90c82c6fee7adcb46a213d2582b6a7b
* Export of internal Abseil changesGravatar Abseil Team2022-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 389189dbb322df0d0468ab13edf7dc185dc63833 by Abseil Team <absl-team@google.com>: absl str_format.h can compile with -Wconversion and -Wsign-compare PiperOrigin-RevId: 420799960 -- 762e5adc429fc143756c42fe92fe8073c87c075f by Abseil Team <absl-team@google.com>: GetStackTraceWithContext: Fix min_dropped_frames when no frames are recorded Previously, if there were still frames to skip, they would be included in min_dropped_frames. PiperOrigin-RevId: 420766341 -- 7d4374b8eaa410f4f98ec03d6a8997dccadfb271 by Abseil Team <absl-team@google.com>: absl::flags compiles with -Wconversion and -Wsign-compare PiperOrigin-RevId: 420476807 -- 5f00f7805419d725fa1ff57b388e4c0750d1d6b0 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 420282152 -- bd5471fc34956acf3888bf90287b2aee4415c96d by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 420282033 -- 61c78020804e4290e9b2fe151aeaf99b198716ee by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 420281867 -- dbe3aad24b65ea11664401a307ea3d2f28e8a7b9 by Derek Mauro <dmauro@google.com>: Remove the incorrect test for the availability of [[nodiscard]] It should have been ABSL_HAVE_CPP_ATTRIBUTE(nodiscard) instead of ABSL_HAVE_ATTRIBUTE(nodiscard). As a result, some code is not compliant with [[nodiscard]], so we cannot simply correct the availability test. Recommend that C++17-only code use the standard [[nodiscard] directly. PiperOrigin-RevId: 420150702 GitOrigin-RevId: 389189dbb322df0d0468ab13edf7dc185dc63833 Change-Id: Idf6ebae3c4edd945c9032c7db3d0ab32d16e8078
* Export of internal Abseil changesGravatar Abseil Team2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | -- 620668e56950d7cfc39db2cd321adf265199ad77 by Abseil Team <absl-team@google.com>: absl::random compiles (at least for some cases) with -Wconversion -Wsign-compare PiperOrigin-RevId: 419595521 -- 746651e5fbcab6080d25c4eef8617fc289a448f6 by Abseil Team <absl-team@google.com>: Annotate FlagImpl storage buffer Flag type can contain legit uninitialized bits, e.g. padding. When the code calls bit_cast as int64_t, it will contain those bits as well. Then when we pass the int into the store it's UB for C++ and will be reported by the new msan. PiperOrigin-RevId: 418666492 GitOrigin-RevId: 620668e56950d7cfc39db2cd321adf265199ad77 Change-Id: Idd1190f5c98a0a13c4019f3d92cec0313822084c
* Export of internal Abseil changesGravatar Abseil Team2021-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 07240ca7822d007cdcc79f2c40bd58b2c2010348 by Abseil Team <absl-team@google.com>: Correct the comment from "AlphaNum" to "Arg". PiperOrigin-RevId: 416139192 -- adcba4a6b3763626e1db7b1e8c108b3114903557 by Martijn Vels <mvels@google.com>: Fix NewExternalRep() to require data being non-empty, and remove nullptr return. PiperOrigin-RevId: 416135865 -- c0d14cd918fb16f15d1d84de9284b5c5ecc1f8f2 by Abseil Team <absl-team@google.com>: Fix doc comment for absl::ascii_isprint(). The comment was incorrectly saying that it includes all whitespace. It doesn't; the only whitespace char it includes is ' '. PiperOrigin-RevId: 416112524 -- d83327800159c07002b6865e21232a12463e02dd by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 416099978 -- baf11e9ca42ca9140cdbf8075f971db8d65b1195 by Ilya Tokar <tokarip@google.com>: Prevent compiler from optimizing Group_Match* benchmarks away. Currently we benchmark single store of precomputed value. Not all affected benchmarks show performance changes: BM_Group_Match 0.53ns ± 1% 0.53ns ± 0% -0.42% (p=0.038 n=10+10) BM_Group_MatchEmpty 0.26ns ± 1% 0.26ns ± 1% ~ (p=1.000 n=10+10) BM_Group_MatchEmptyOrDeleted 0.26ns ± 1% 0.26ns ± 1% ~ (p=0.121 n=10+10) BM_Group_CountLeadingEmptyOrDeleted 0.26ns ± 1% 0.45ns ± 0% +70.05% (p=0.000 n=10+8) BM_Group_MatchFirstEmptyOrDeleted 0.26ns ± 0% 0.44ns ± 1% +65.91% (p=0.000 n=8+9) But inspecting the generated code shows the difference, e. g. BM_Group_MatchFirstEmptyOrDeleted Before: add $0xffffffffffffffff,%rbx jne 30 After: pcmpeqd %xmm0,%xmm0 pcmpgtb -0x30(%rbp),%xmm0 pmovmskb %xmm0,%eax add: 0x23$0xffffffffffffffff,%rbx jne 40 PiperOrigin-RevId: 416083515 -- 122fbff893dc4571b3e75e4b241eb4495b925610 by Abseil Team <absl-team@google.com>: Put namespace guard in ABSL_DECLARE_FLAG to make declaring a flag in a namespace a compiler error instead of a linker error. PiperOrigin-RevId: 416036072 -- 020fd8a20f5fa319e948846e003391fcb9e03868 by Ilya Tokar <tokarip@google.com>: Make Cord::InlineRep::set_data unconditionally zero out memory. Currently there is a single case where we don't zero out memory as an optimization. Unconditional zeroing doesn't show any changes in benchmarks, except for the unrelated improvement: BM_CordPartialCopyToCord/1M/1 12.6ns ± 4% 12.6ns ± 4% ~ (p=0.857 n=16+19) BM_CordPartialCopyToCord/1M/128 44.9ns ± 7% 45.0ns ± 3% ~ (p=0.468 n=18+17) BM_CordPartialCopyToCord/1M/1k 64.5ns ± 4% 61.4ns ± 4% -4.82% (p=0.000 n=19+17) BM_CordPartialCopyToCord/1M/8k 139ns ± 3% 128ns ±15% -7.76% (p=0.009 n=17+20) BM_CordPartialCopyToCord/1M/16k 193ns ± 6% 168ns ± 6% -13.17% (p=0.000 n=17+17) BM_CordPartialCopyToCord/4M/16k 199ns ± 4% 177ns ± 4% -11.36% (p=0.000 n=17+18) BM_CordPartialCopyToCord/4M/32k 275ns ± 3% 250ns ± 4% -9.00% (p=0.000 n=18+18) BM_CordPartialCopyToCord/4M/64k 291ns ± 4% 266ns ± 5% -8.53% (p=0.000 n=18+16) BM_CordPartialCopyToCord/4M/128k 322ns ± 5% 291ns ± 4% -9.43% (p=0.000 n=20+18) BM_CordPartialCopyToCord/8M/32k 281ns ± 5% 251ns ± 4% -10.38% (p=0.000 n=20+16) BM_CordPartialCopyToCord/8M/64k 293ns ± 6% 267ns ± 4% -8.87% (p=0.000 n=16+19) BM_CordPartialCopyToCord/8M/128k 334ns ± 3% 305ns ± 2% -8.56% (p=0.000 n=17+16) This is clearly an alignmnet effect since number of the executed instructions is the same: M_CordPartialCopyToCord/1M/1 155 ± 0% 155 ± 0% ~ (all samples are equal) BM_CordPartialCopyToCord/1M/128 446 ± 0% 446 ± 0% ~ (p=0.332 n=36+39) BM_CordPartialCopyToCord/1M/1k 473 ± 0% 473 ± 0% ~ (p=0.969 n=40+40) BM_CordPartialCopyToCord/1M/8k 808 ± 0% 808 ± 0% ~ (p=0.127 n=40+39) BM_CordPartialCopyToCord/1M/16k 957 ± 0% 957 ± 0% ~ (p=0.532 n=40+40) BM_CordPartialCopyToCord/4M/16k 952 ± 0% 952 ± 0% ~ (p=0.686 n=39+39) BM_CordPartialCopyToCord/4M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.690 n=40+40) BM_CordPartialCopyToCord/4M/64k 1.23k ± 0% 1.23k ± 0% ~ (p=0.182 n=40+39) BM_CordPartialCopyToCord/4M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.711 n=40+40) BM_CordPartialCopyToCord/8M/32k 1.12k ± 0% 1.12k ± 0% ~ (p=0.697 n=40+40) BM_CordPartialCopyToCord/8M/64k 1.23k ± 0% 1.23k ± 0% +0.00% (p=0.049 n=40+40) BM_CordPartialCopyToCord/8M/128k 1.44k ± 0% 1.44k ± 0% ~ (p=0.507 n=40+40) This makes code simpler and doesn't regress performance. PiperOrigin-RevId: 415560574 -- 37305b2690b31682088749e4d62f40d7095bdc54 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 415558737 -- 86aaed569b9e743c1eb813a5f48def978a793db3 by Martijn Vels <mvels@google.com>: Internal change PiperOrigin-RevId: 415515201 -- 6cdb8786cdcb4fa0b8a4b72fc98940877d1fdeff by Abseil Team <absl-team@google.com>: Update SubmitMutexProfileData to accept wait_cycles instead of wait_timestamp PiperOrigin-RevId: 415360871 -- 9f979d307aa16ad09f214e04876cbe84395c0901 by Abseil Team <absl-team@google.com>: absl::flat_hash_set compiles with -Wconversion -Wsign-compare PiperOrigin-RevId: 415357498 -- 9eceb14174708f15e61259d449b214a8a4c7f9e7 by Abseil Team <absl-team@google.com>: Fix AddressIsReadable for the corner case of (aligned) addr == NULL. PiperOrigin-RevId: 415307792 -- 1a39ffe55898375e2d7f88c17c99db5a1b95b313 by Martijn Vels <mvels@google.com>: Internal change PiperOrigin-RevId: 415162872 -- 64378549b110d5f5762185a5906c520fba70f0e7 by Abseil Team <absl-team@google.com>: Fix a typo in the comments PiperOrigin-RevId: 415088461 -- 41aae8322e913b82710153c22b97c611fdb6e1fb by Abseil Team <absl-team@google.com>: Switch from `connect` to `rt_sigreturn` -- the latter is much less problematic for system call sandboxes. PiperOrigin-RevId: 415073965 -- 870c5e3388b6a35611bff538626fe7a1c8c87171 by Abseil Team <absl-team@google.com>: Add ABSL_HAVE_HWADDRESS_SANITIZER and ABSL_HAVE_LEAK_SANITIZER PiperOrigin-RevId: 414871189 -- f213ed60a66b58da7ac40555adfb1d529ff0a4db by Derek Mauro <dmauro@google.com>: Remove reference to __SANITIZE_MEMORY__, which does not exist It appears to have been copied by pattern matching from the ASAN/TSAN code blocks. https://github.com/gcc-mirror/gcc/blob/f47662204de27f7685699eeef89aa173ccf32d85/gcc/cppbuiltin.c#L79-L126 PiperOrigin-RevId: 414806587 -- b152891e73ab515f397ceb53f66c8ee2f33863ea by Abseil Team <absl-team@google.com>: Rollback previous commit: SYS_open is not defined in certain environments. PiperOrigin-RevId: 414521820 -- 5a1cbb282331023902e1374dd0d920c4effbe47f by Abseil Team <absl-team@google.com>: Use syscall(SYS_open, ...) instead of open() to avoid possible symbol interposition. Also add some warning notes. PiperOrigin-RevId: 414508186 -- 1824d6593612710aafdc599a89b0adced7d787f6 by Abseil Team <absl-team@google.com>: Correct aarch64 macro check The macro is __aarch64__, not __arch64__. PiperOrigin-RevId: 414446225 -- a1536a57b64dfd53945d33a01cfc08b18c99c97b by Abseil Team <absl-team@google.com>: Fix backwards comment in the last commit. PiperOrigin-RevId: 414281214 -- 11ac021ba779513667a31cf2563ddafc57d6d913 by Abseil Team <absl-team@google.com>: AddressIsReadable() didn't work correctly on ARM when the given pointer was misaligned at the end of the page. Fix that by aligning the pointer on an 8-byte boundary before checking it. PiperOrigin-RevId: 414203863 GitOrigin-RevId: 07240ca7822d007cdcc79f2c40bd58b2c2010348 Change-Id: If5f129194d59f5c9e5d84efd8cd9e17a70e072ab
* Export of internal Abseil changesGravatar Abseil Team2021-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- e2a571b818faaec4185426a8cf71fd2970674423 by Matt Kulukundis <kfm@google.com>: Fix missed use of old RTTI macro PiperOrigin-RevId: 413239579 -- e3c15a3fe0a4e44d6e08d69ad912b2245a403bd6 by Derek Mauro <dmauro@google.com>: Makes erase_if return the number of erased elements for compatibility with C++20 https://en.cppreference.com/w/cpp/container/unordered_map/erase_if This may technically be an API break, but no actual breaks were found in Google code. Fixes to open source code should be trivial. Closes #1065 PiperOrigin-RevId: 413204392 -- c1fb1ddbc2def3f3d177e5b80b9934bdbb7b16fc by Matt Kulukundis <kfm@google.com>: Consolidate to a single HAS_RTTI macro PiperOrigin-RevId: 413169336 GitOrigin-RevId: e2a571b818faaec4185426a8cf71fd2970674423 Change-Id: I74b78ebd5fc172e3f5fcbd13a58cf53f7b250ae9
* Export of internal Abseil changesGravatar Abseil Team2021-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4324716dc5384f03dcd7e36e8cca0e944e4dac74 by Evan Brown <ezb@google.com>: Clarify comments about API differences from std::{set,map} in btree headers. We note that the most important API differences are mentioned in the next paragraph and that other API differences are minor. An example of another minor API difference is the note about std::launder in the comment for `extract`. Motivation: readers shouldn't feel like they need to read the entire header file to understand why b-tree containers are not "drop-in replacements" for STL containers. PiperOrigin-RevId: 408703780 -- 7e8da4f14afd25d11713eee6b743ba31605332bf by Derek Mauro <dmauro@google.com>: Remove the test for absl::base_internal::NominalCPUFrequency() from OSS code This is an internal-only function that should never by called by OSS code. By its nature fails on unsupported platforms. Google code has tests for this function on supported internal platforms. Fixes #1053 PiperOrigin-RevId: 408692861 -- 37bad2e003b17e3f82d6fd5d90ae183553c018b0 by Abseil Team <absl-team@google.com>: To avoid triggering -Wmissing-variable-declarations warnings, ABSL_FLAG now declares the Flag before defining it. PiperOrigin-RevId: 408673990 GitOrigin-RevId: 4324716dc5384f03dcd7e36e8cca0e944e4dac74 Change-Id: I8c8ea73c4a4e38729c5bfdfa3fefb5d593e0536c
* Export of internal Abseil changesGravatar Abseil Team2021-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b by Martijn Vels <mvels@google.com>: Add common [container.requirements] type definitions to `CharRange` and `ChunkRange` The presence of these allow these range classes to be used in various utility functions which require some minimum type of container. For example, this change allows tests to use `EXPECT_THAT(cord.Chunks(), ElementsAre(...))` PiperOrigin-RevId: 406941278 -- 0c195f073632e21d9a4bce158047b2ba8551c2d1 by Evan Brown <ezb@google.com>: Use explicit exponential growth in SubstituteAndAppendArray. PiperOrigin-RevId: 406931952 -- afb043bccd809a55cab78abadb7548a057d9eda0 by Jorg Brown <jorg@google.com>: Use longer var names in macro to avoid clang-tidy warning PiperOrigin-RevId: 406930978 -- 80397e2604e6b3d929a34742c3a32581b34d3ac4 by Martijn Vels <mvels@google.com>: Add future kAppendBuffer and kPrependBuffer API trackers for Cordz sampling PiperOrigin-RevId: 406912759 -- e910ce919ef83933f08a690e8b7325c7cc5b6d5d by Martijn Vels <mvels@google.com>: Implement Prepend(string_view) in terms of PrependArray(string_view, MethodIdentifier). PiperOrigin-RevId: 406891665 -- c9cff43d4c0568ed01f2fca0f6ef038ae03112b5 by Martijn Vels <mvels@google.com>: Add 'Rebuild' logic to CordRepBtree There are btree hostile scenarios where an application could perform repeated split/insert/merge operations on a cord leading to a tree exceeding the maximum height. While this should be rare in practice, this change adds a Rebuild() method that will rebuild a tree with a 100% fill factor, and we will invoke this rebuild when a tree exceeds the maximum height. This basically follows the similar 'balance' logic in Concat trees (although the latter is common in Concat uses) PiperOrigin-RevId: 406875739 -- 5b2b8fb88f1ebfdc1c670088152da2cb2ea4c376 by Martijn Vels <mvels@google.com>: Add 'in place' enabled RemoveSuffix An in-place RemoveSuffix is more efficient than SubTree() as it can directly modify privately owned nodes and flats allowing easy re-use of free capacity in right-most flats that may turn into Substring edges when using SubTree. PiperOrigin-RevId: 406431230 -- f09903c0a3d7344f59aaf1380a16ea10829217d4 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 406430373 -- 9957af575c33bb18dc170572a4ee8cc5901df6b2 by Greg Falcon <gfalcon@google.com>: Initial groundwork to allow storing checksum data inside CordRep instances. This uses a RefcountAndFlags bit that was reserved for this purpose, and will be leveraged in a follow-up change to allow attaching checksums to a Cord's value. This change splits RefcountAndFlags::IsOne() into two distinct operations: * IsOne(): This returns true when the associated CordRep is not shared with other threads. This is useful for functions that consume CordRep instances; for example, code that consumes an unshared CordRep can assume ownership of its children without modifying those refcounts. * IsMutable(): This returns true when the associated CordRep reference is not shared with other threads, *and* does not store an associated checksum value. This is useful for functions that modify a CordRep's contents: code may modify the bytes of a mutable-unshared CordRep without fear of races with other threads, or of invalidating a stored checksum. The tricky part of this CL is ensuring that the correct choice between IsMutable() and IsOne() was made at each point. An incorrect application of IsOne() could lead to correctness bugs in the future. Code conditioned on IsOne() may delete the CordRep in question, or assume ownership of its children, but must not modify the CordRep's data without explicitly adjusting the CRC. PiperOrigin-RevId: 406191103 -- 686544814079e5ab6d4593cca0c068b510be400a by Martijn Vels <mvels@google.com>: Reduce the size in the LargeString test when running with Sanitizers PiperOrigin-RevId: 406186945 -- 735b4490bdb695c35731f06ce4b8de14ce2be6ed by Alex Strelnikov <strel@google.com>: Release absl::SimpleHexAtoi. PiperOrigin-RevId: 406143188 GitOrigin-RevId: f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b Change-Id: Ic6527ac40fa03ea02ca813e8bb7868a219544de4
* Remove bazelbuild/rules_cc dependency (#1038)Gravatar Vertexwahn2021-10-14
|