summaryrefslogtreecommitdiff
path: root/absl/flags/reflection.cc
Commit message (Collapse)AuthorAge
* Export of internal Abseil changesGravatar Abseil Team2021-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- b2a781121ff72fb485b7e67539d5e4ff1eb66df2 by Gennadiy Rozental <rogeeff@google.com>: Consistently use absl::flat_hash_map instead of std::map in Flags implementation. PiperOrigin-RevId: 377132816 -- 9ab83a154d8f22d51fed0092bf94245b5af1f498 by Derek Mauro <dmauro@google.com>: Workaround for MSAN being unable to see through getentropy(). https://github.com/google/sanitizers/issues/1173 PiperOrigin-RevId: 377097059 -- 8d28e921442d1b246c26f3200f21027557c47657 by Greg Falcon <gfalcon@google.com>: Disable stack_consumption_test in tsan builds. A recent tsan change broke the way this test-only utility was counting stack usage. PiperOrigin-RevId: 377053169 GitOrigin-RevId: b2a781121ff72fb485b7e67539d5e4ff1eb66df2 Change-Id: Ib56356f8128f6c083f32b950091f3a56d9e2cd51
* Export of internal Abseil changesGravatar Abseil Team2021-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 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
* Export of internal Abseil changesGravatar Abseil Team2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 77e2a9c277721f23a8df983c1efc6ed97c167964 by Derek Mauro <dmauro@google.com>: Simplify an internal piece of CityHash to remove the conflicting definition of uint128 PiperOrigin-RevId: 342906008 -- 593dbb6d5fd32cc5d31e3ba1eda02e8ddeaeaaf6 by Gennadiy Rozental <rogeeff@google.com>: Skip retired flags in GetAllFlags output. This is a bug fix. We should not have released this interface producing retired flags. There should be no observable difference for the users who should not care about retired flags. PiperOrigin-RevId: 342889378 -- bb77e07abff4dbd0a9c97eb85ee85cb39b84d04a by Abseil Team <absl-team@google.com>: Extract `find_first_not_full` outside of the raw_hash_set. This function is used in the following scenarios: 0. [relatively hot] insert, when actual new element is added. 1. [relatively cold] resize (explicit or on capacity grow) 2. [relatively cold] copy constructor 3. [cold] rehash on insert/erase (aka cache) use cases Resize typically mitigated by `reserve` in performance critical cases. Rehashing happen relatively rare, when hash table become polluted with deleted slots. We keep `find_first_not_full` in header, so that compiler still can inline it, when necessary (most notably in insert use case). This reduce binary size since only one copy of this function will be present in the binary for all tables where the function is not inlined (at least in one case). PiperOrigin-RevId: 342736300 GitOrigin-RevId: 77e2a9c277721f23a8df983c1efc6ed97c167964 Change-Id: I3fe9d054c66049bb598ea35c45fc800b1cdaa9b6
* Export of internal Abseil changesGravatar Abseil Team2020-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- a5af5874c1c5cc02bd2a748d455321f82b6f2a93 by Andy Getzendanner <durandal@google.com>: fix compile fails with asan and -Wredundant-decls Import of https://github.com/abseil/abseil-cpp/pull/801 PiperOrigin-RevId: 336693223 -- ed9df42ab2b742386c6692c2bed015374c919d9c by Derek Mauro <dmauro@google.com>: Fix integer conversion warning Fixes #814 PiperOrigin-RevId: 336651814 -- 0ab4c23884e72dce17b67c1eb520f9dbb802565d by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 336585378 -- eba0e3dccd52a6e91bcff84075bef0affc650b74 by Matt Kulukundis <kfm@google.com>: Add bitset operations to Futex helper. PiperOrigin-RevId: 336409368 -- 8b0709a8b4500bf5f0af4b602d76a298d81645e8 by Abseil Team <absl-team@google.com>: Fix code indentation in a comment. PiperOrigin-RevId: 336368167 -- bc3961c87a7e7760c10319a5b0349c279f7ae3ad by Samuel Benzaquen <sbenza@google.com>: Improve performance of the registry: - Reduce contention - Reduce memory usage for each flag by `6*sizeof(void*)`. - Replace one immortal allocation per-flag with a single one for all the flags - Slightly improve single-threaded performance by avoiding the std::map indirections. PiperOrigin-RevId: 336365904 -- 264ad9f28f935aad8b6b1437f8bf804fa9104346 by Abseil Team <absl-team@google.com>: Fix typo in comment on absl::Condition. PiperOrigin-RevId: 336311680 -- b5b808a8c75ca0df7b09eff9a423ec171d80f771 by Derek Mauro <dmauro@google.com>: Add missing Apache license headers PiperOrigin-RevId: 336294980 -- 89446c3a4793df8b95060385cf3e219357c3db1d by Andy Soffer <asoffer@google.com>: Internal changes PiperOrigin-RevId: 336287465 -- 57c8be4e294881bc79a6a44b8e4bf7ecbb19b9b9 by Matt Kulukundis <kfm@google.com>: Extract Futex from an implementation detail of Wait to a private interface. PiperOrigin-RevId: 336123209 GitOrigin-RevId: a5af5874c1c5cc02bd2a748d455321f82b6f2a93 Change-Id: Ie5a0ebe28e571814e3e11d4c05ca308523ccf311
* Export of internal Abseil changesGravatar Abseil Team2020-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9f746b79e16d36dba908ed9e2a586d890fe54acc by Derek Mauro <dmauro@google.com>: Remove the Bazel mirror URL that we use in our WORKSPACE file This doesn't appear to be supported. We use --distdir caching in our tests. PiperOrigin-RevId: 327634738 -- e1f6f54830c415fc8bb8dc14483fae4cf9713d75 by Abseil Team <absl-team@google.com>: Removing comments following license() rules as they are rarely useful, redundant with LICENSE files, and tend to fall out of date. PiperOrigin-RevId: 327504063 -- b59c076638a57a74a3f8475f1dee8b536e32a15f by Gennadiy Rozental <rogeeff@google.com>: Change GetAllFlags API to return a collection of mutable flag handles. This will make this interface on par with FindCommandLineFlag and allow to call CommandLineFlag::ParseFrom on the handle returned by GetAllFlags. PiperOrigin-RevId: 327499084 -- bbf56b3c4a1d908d95e5a52aba38b1984151efff by Gennadiy Rozental <rogeeff@google.com>: Make raw_hash_set compile when AllocTraits::propagate_on_container_swap is false. PiperOrigin-RevId: 327371107 -- 837f62c85ea65c1d6b847a75816198c625fe62ff by Abseil Team <absl-team@google.com>: On macOS, `mem_alloc` is defined like this: rpc/types.h:86:#define mem_alloc(bsize) calloc(1, bsize) So if that file is included before container_memory.h, the variable mem_alloc may never get defined. This is fixed by using a different name. PiperOrigin-RevId: 327360224 -- aa8f5528382c0d01239ce75b645723aaf7e1ef46 by Gennadiy Rozental <rogeeff@google.com>: Release of absl::GetAllFlags API. PiperOrigin-RevId: 327275943 GitOrigin-RevId: 9f746b79e16d36dba908ed9e2a586d890fe54acc Change-Id: I99c5c87dd1712bf8df9a52397b0c1e400a3c3447
* Export of internal Abseil changesGravatar Abseil Team2020-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- e1d2e93a3328d9e4362c5510e81bd15ddd0dcf00 by Derek Mauro <dmauro@google.com>: ROLLBACK: Use auto-detected sanitizer attributes for ASAN, MSAN, and TSAN builds PiperOrigin-RevId: 323612219 -- 6fe0914715bcb680ac1dc533aae3461e2ca1ad50 by Derek Mauro <dmauro@google.com>: Use auto-detected sanitizer attributes for ASAN, MSAN, and TSAN builds PiperOrigin-RevId: 323597765 -- 9ad74e277348585f06a511aac31fff917a89a5d7 by Mark Barolak <mbar@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 323594550 -- 9e77ccb5adf7e9867cfa254105930f8fed19699d by Evan Brown <ezb@google.com>: Remove an unnecessary nullptr check in Cord::PrependTree(). We already check for nullptr at all callsites. PiperOrigin-RevId: 323583641 -- 31ab2355c1b91e474b67ff88b8597ad99f346511 by Gennadiy Rozental <rogeeff@google.com>: Avoid memory allocations while registering retired flags. PiperOrigin-RevId: 323523011 -- 33435e9b97b31763a80d3e41b5ab2459e862e99a by Jorg Brown <jorg@google.com>: Allow ABSL_PREDICT_FALSE to be used with a type that's explicitly convertible to bool. So far ABSL_PREDICT_TRUE could be used with these, but not ABSL_PREDICT_FALSE. PiperOrigin-RevId: 323514860 GitOrigin-RevId: e1d2e93a3328d9e4362c5510e81bd15ddd0dcf00 Change-Id: Iee5b030d9aec1ae2c0fe8997763cee7bd84b4090
* Export of internal Abseil changesGravatar Abseil Team2020-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4833151c207fac9f57a735efe6d5db4c83368415 by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 320398694 -- a1becb36b223230f0a45f204a5fb33b83d2deffe by Gennadiy Rozental <rogeeff@google.com>: Update CMakeLists.txt Import of https://github.com/abseil/abseil-cpp/pull/737 PiperOrigin-RevId: 320391906 -- b529c45856fe7a3447f1f3259286d57e13b1f292 by Abseil Team <absl-team@google.com>: Improves a comment about use of absl::Condition. PiperOrigin-RevId: 320384329 -- c7b1dacda2739c10dc1ccbfb56b07ed7fe2464a4 by Laramie Leavitt <lar@google.com>: Improve FastUniformBits performance for std::minstd_rand. The rejection algorithm was too pessimistic before, and not in line with the [rand.adapt.ibits]. Specifically, when sampling from an URBG with a non power of 2 range, FastUniformBits constructed a rejection threshold with a power-of-2 range that was too restrictive. For example, minstd_rand has a range of [1, 2147483646], which has a range of 2145386495, or about 30.999 bits. Before FastUniformBits rejected values between 1<<30 and 2145386495, which includes approximately 50% of the generated values. However, since a minimum of 3 calls are required to generate a full 64-bit value from an entropy pool of 30.9 bits, the correct value for rejection sampling is the range value which masks 21 (0x7fe00000) or 22 bits and rejects values greater than that. This reduces the probability of rejecting a sample to about 0.1% NOTE: Abseil random does not guarantee sequence stability over time, and this is expected to change sequences in some cases. PiperOrigin-RevId: 320285836 -- 15800a39557a07dd52e0add66a0ab67aed00590b by Gennadiy Rozental <rogeeff@google.com>: Internal change. PiperOrigin-RevId: 320220913 -- ef39348360873f6d19669755fe0b5d09a945a501 by Gennadiy Rozental <rogeeff@google.com>: Internal change PiperOrigin-RevId: 320181729 -- 4f9f6ef8034a24da1832e4c838c72f80fc2ea062 by Gennadiy Rozental <rogeeff@google.com>: Internal change PiperOrigin-RevId: 320176084 -- 6bfc8008462801657d231585bd5c37fc18bb25b6 by Gennadiy Rozental <rogeeff@google.com>: Internal change PiperOrigin-RevId: 320176070 -- b35b055ab1f41e6056031ff0641cabab23530027 by Abseil Team <absl-team@google.com>: Disabling using header module as well as building one for randen_hwaes_impl PiperOrigin-RevId: 320024299 GitOrigin-RevId: 4833151c207fac9f57a735efe6d5db4c83368415 Change-Id: I9cf102dbf46ed07752a508b7cda3ab3858857d0d
* Export of internal Abseil changesGravatar Abseil Team2020-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 739f9fb80212c21c015fec473e9e29803a156ef9 by Derek Mauro <dmauro@google.com>: Define FlagStateInterface::~FlagStateInterface() in the translation unit in which it is actually declared Fixes #717 PiperOrigin-RevId: 319083605 -- 913ef1f23113268b22d636d3ae3b992862efdb1a by Derek Mauro <dmauro@google.com>: Fix ABSL_LOCK_RETURNED statement PiperOrigin-RevId: 319078667 -- a43b1413da1770d638147c73e7e1693cfaf869c7 by Derek Mauro <dmauro@google.com>: Fix redeclaration ‘absl::Cord::InlineRep::kMaxInline’, which differs in ‘constexpr’ Fixes #725 PiperOrigin-RevId: 319060910 -- 1ad7d491a80f6c9de78a6fc20f09b7765d224503 by Abseil Team <absl-team@google.com>: Make absl SpinLock trivially destructible when possible PiperOrigin-RevId: 319049456 -- 659ecad3578dfa669854a82279fa590002bdb37f by Derek Mauro <dmauro@google.com>: Remove the static initialization of global variables used by absl::Mutex as requested by Chromium PiperOrigin-RevId: 319031204 -- 609c491d8bb4f8bb3b44c5a4c0bee51c583df24c by Abseil Team <absl-team@google.com>: Add implementation of %a and %A to absl::StrFormat. Prior to this it just fell back to sprintf. PiperOrigin-RevId: 318888039 -- 5e8ae6392bcd135248aac14c4b9f2a5116868678 by Abseil Team <absl-team@google.com>: Google-internal changes only. PiperOrigin-RevId: 318857077 -- 4a2578e33e8442954e29e5f0380ddfcf0f033f0d by Greg Falcon <gfalcon@google.com>: Change of enum constants to accommodate internal change. PiperOrigin-RevId: 318844716 -- 4b578b102816260c213675759f4c15911735578a by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 318704453 -- 0ee82fd24d548b260c9229fa1f54571dae1dfa24 by Gennadiy Rozental <rogeeff@google.com>: Allow lookup of retired flags. At the moment we issue warning on attempt to find a retired flag. This way we can't even check if flag is retired without issuing the warning. With this change we will only issue the warning if one tries to access any functionality of retired flag but it's name "is retired" status, and type. PiperOrigin-RevId: 318605017 -- 3e35fe9b4c79f636fa328c59e2aabb93e29b7c99 by Abseil Team <absl-team@google.com>: Fix error return from InstallSymbolDecorator(). PiperOrigin-RevId: 318490405 -- ae46063f3eb2998cb961f62a359d932e5908a4bc by Abseil Team <absl-team@google.com>: Do not make copies of iterated collection elements into the loop variable. PiperOrigin-RevId: 318423139 -- d06a075a12aab5f6ab98474677ce50d588b21de3 by Abseil Team <absl-team@google.com>: add missing word making the error code better English PiperOrigin-RevId: 318335052 GitOrigin-RevId: 739f9fb80212c21c015fec473e9e29803a156ef9 Change-Id: Id77a0a4b1959036b00555deef40e82d51884fbc1
* Export of internal Abseil changesGravatar Abseil Team2020-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 5b9d5ce21074c0541432555d383d1b9c5898b553 by Gennadiy Rozental <rogeeff@google.com>: Convert FlagSaver into public API PiperOrigin-RevId: 314799739 -- 5f796c9862b1177f161f4b10fe1a84698ebbb5cf by Abseil Team <absl-team@google.com>: Google-internal changes only. PiperOrigin-RevId: 314786474 -- 67f2ae0ac5ae73bcd9d57a058ac4fea8fc1243ba by Gennadiy Rozental <rogeeff@google.com>: Makes sure stacktrace_generic is only used with glibc. Fixes #701 PiperOrigin-RevId: 314726944 -- efb1ef3636b0698b79d3ee3590f12c4dff32a3cb by Samuel Benzaquen <sbenza@google.com>: Take the bits into account when reserving the space for the operation, not just the exponent. PiperOrigin-RevId: 314622744 GitOrigin-RevId: 5b9d5ce21074c0541432555d383d1b9c5898b553 Change-Id: I080a5e333e2dc1545b5aa0417882f7ac7116a20c
* Export of internal Abseil changesGravatar Abseil Team2020-06-03
-- 9e8b4a286d70df9487bff080816bd07ae38af5f8 by Evan Brown <ezb@google.com>: Add btree_node::transfer_n/transfer_n_backward and replace usage of uninitialized_move_n and value_destroy_n. PiperOrigin-RevId: 314600027 -- 6c452aa1ee7e46ab941ba7d1fa636da8ea3d7370 by Laramie Leavitt <lar@google.com>: Remove the MockingBitGenBase base class in favor of type-erasure in BitGenRef. In Abseil random, mocking was split across two different classes, MockingBitGenBase and MockingBitGen. This split existed because Google Mock is a test-only library that we don't link into production, so MockingBitGenBase provided a low-overhead scaffold used to lookup mocks when in test code, but which is unused in production code. That has been replaced by type-erasure which looks for a method named CallImpl with the correct signature. Weaken the coupling between MockingBitGen, DistributionCaller, and MockOverloadSet. Rename CallImpl to InvokeMock() Previously, the implementation of DistributionCaller was also split across different files using explicit instantiation of the DistributionCaller struct and some details in the Mocking classes. Now Distribution caller uses the presence of the InvokeMock() method to choose whether to use the mockable call path or the default call path. PiperOrigin-RevId: 314584095 -- 07853c47dc98698d67d65a3b9b662a65ab9def0a by Abseil Team <absl-team@google.com>: Add PC / backtrace / symbolization support for Apple platforms. Full backtrace support requires iOS 9+ PiperOrigin-RevId: 314415072 -- 43889f17a132b31f6558c6482721cbbc776128fd by Gennadiy Rozental <rogeeff@google.com>: Consolidate all reflection interface in the new module 'reflection' and expose interface to locate reflection handle by name. PiperOrigin-RevId: 314390358 GitOrigin-RevId: 9e8b4a286d70df9487bff080816bd07ae38af5f8 Change-Id: I8e0910437740cf9ea9da5000adddfcef127e1158