Commit graph

15 commits

Author SHA1 Message Date
Abseil Team
62f05b1f57 Export of internal Abseil changes
--
3e6352709da9a529e608eabff862a12bfaecb587 by Gennadiy Rozental <rogeeff@google.com>:

Replace local copy of FastTypeId with one shared in absl/base/internal.

PiperOrigin-RevId: 304181357

--
c89ea428f732226f4dceb508cd6ba3955a1e49e1 by Andy Getzendanner <durandal@google.com>:

Typo fix: add a missing colon.

PiperOrigin-RevId: 304064210

--
de2ee7a96bdc7193ffcceb6a2fd6bf464955cbe7 by Samuel Benzaquen <sbenza@google.com>:

Reduce the overhead of the registration token by using an empty struct instead
of bool.

PiperOrigin-RevId: 304054311

--
222f05d24fb1df7e815946543a7dc78847c83f92 by Derek Mauro <dmauro@google.com>:

Turn off hashtablez in opensource builds.

Hashtablez is an unsupported, internal-only feature for collecting
information about hashtable usage and performance. By turning it off
in builds where it is unsupported, we get just a little more performance.

PiperOrigin-RevId: 304035460
GitOrigin-RevId: 3e6352709da9a529e608eabff862a12bfaecb587
Change-Id: I0bfe9b5df808a7e35c154b39e6c80e68b0da2b70
2020-04-01 15:19:51 -04:00
Abseil Team
d936052d32 Export of internal Abseil changes
--
2c5c118f0615ba90e48ee2f18eccc9f511740f6d by Samuel Benzaquen <sbenza@google.com>:

Rename internal macros to follow the convention in absl.

PiperOrigin-RevId: 299906738

--
92d84a707c7ebc4ec19bdd92d5765d1b6d218c1e by Derek Mauro <dmauro@google.com>:

Import GitHub #629: Skip the .exe suffix in the helpshort filter on Windows

PiperOrigin-RevId: 299892396

--
2a6910d4be6c67a8376628764121b528ff53504d by Abseil Team <absl-team@google.com>:

Use unsigned int128 intrinsic when available. It generates better branchless code.

PiperOrigin-RevId: 299848585

--
110c16cf0a739e1df5028fb6fbd03ef5dde1d278 by Derek Mauro <dmauro@google.com>:

Import GitHub #594: Avoid reading the registry for Windows UWP apps

PiperOrigin-RevId: 299821671

--
d8397d367e88163e5e8a47f379c716352dc91d03 by Greg Falcon <gfalcon@google.com>:

Add absl::Hash support for Cord.  The hash function is heterogeneous with other string types: a Cord and a string with the same byte sequence will hash to the same value.

SwissTable types know about Cord, and will allow heterogeneous lookup (e.g., you can pass a Cord to flat_hash_map<string, T>::find(), and vice versa.)

Add a missing dependency to the cmake Cord target.

PiperOrigin-RevId: 299443713
GitOrigin-RevId: 2c5c118f0615ba90e48ee2f18eccc9f511740f6d
Change-Id: I7b087c7984b0cb52c4b337d49266c467b98ebdf9
2020-03-09 16:10:21 -04:00
Abseil Team
37dd2562ec Export of internal Abseil changes
--
8bdb2020150ed0fd4a4e520e454dc5f54e33f776 by Eric Fiselier <ericwf@google.com>:

Workaround bug in GCC 9.2 and after.

PiperOrigin-RevId: 291982551

--
47ff4820e595f96c082a90d733725f6882d83e3b by Abseil Team <absl-team@google.com>:

Improve ABSL_ATTRIBUTE_PACKED documentation

Recommend to apply ABSL_ATTRIBUTE_PACKED to structure members instead of to an entire structure because applying this attribute to an entire structure may cause the compiler to generate suboptimal code. It reduces the alignment of the data structure from a value larger than one to one. When applied to a structure, ABSL_ATTRIBUTE_PACKED reduces the alignment of a structure (alignof()) to 1. As a result, the compiler can no longer assume that e.g. uint32 members are aligned on a four byte boundary and hence is forced to use single-byte load and store instructions on CPU architectures that do not support non-aligned loads or stores.

PiperOrigin-RevId: 291977920

--
902b7a86f860da699d3a2e5c738be5ef73ede3b4 by Mark Barolak <mbar@google.com>:

Internal change

PiperOrigin-RevId: 291963048

--
bb3bd3247e376d53a3080b105f13ec7566d3ae50 by Abseil Team <absl-team@google.com>:

Support the C++17 insert_or_assign() API in btree_map.

PiperOrigin-RevId: 291945474

--
ff3b3cfcbbc64f086f95501f48d49426bcde356f by Gennadiy Rozental <rogeeff@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 291861110

--
fd465cd9cbbacd3962f67a7346d6462edaddd809 by Derek Mauro <dmauro@google.com>:

Add flaky=1 to beta_distribution_test.

PiperOrigin-RevId: 291757364

--
3603adfb59c4128c542b670952cce250d59e1f67 by Derek Mauro <dmauro@google.com>:

Separate the initialization of NumCPUs() and NominalCPUFrequency()

The OSS version of Abseil never needs to call NominalCPUFrequency().
In some configurations, initializing NominalCPUFrequency() requires
spending at least 3ms measuring the CPU frequency. By separating the
initialization from NumCPUs(), which is called in most configurations,
we can save at least 3ms of program startup time.

PiperOrigin-RevId: 291737273

--
bea9e4a6bff5a0351d340deab966641867e08c4d by Abseil Team <absl-team@google.com>:

Change the cmake library names not to have a redundant `absl_` prefix.

PiperOrigin-RevId: 291640501

--
501b602ef260cd7c8c527342581ceffb3c5b6d4c by Gennadiy Rozental <rogeeff@google.com>:

Introducing benchmark for absl::GetFlag.

PiperOrigin-RevId: 291433394

--
4eeaddc788da4b91c272a8adca77ca6dbbbc1d44 by Xiaoyi Zhang <zhangxy@google.com>:

fix: Add support for more ARM processors detection

Import of https://github.com/abseil/abseil-cpp/pull/608

PiperOrigin-RevId: 291420397

--
a3087a8e883c5d71de7d9bd4ec8f4db5142dfcf5 by Derek Mauro <dmauro@google.com>:

Removes the flaky raw_hash_set prefetch test

PiperOrigin-RevId: 291197079

--
aad6c2121c102ac36216e771c83227cf3e3bfd66 by Andy Soffer <asoffer@google.com>:

Enable building Abseil as a DLL.
This is currently experimental and unsupported.

This CL does a few things:
1. Adds the ABSL_DLL macro to any class holding a static data member, or to global constants in headers.
2. Adds a whitelist of all files in the DLL and all the build targets that are conglomerated into the DLL.
3. When BUILD_SHARED_LIBS is specified, any build target that would be in the DLL still exists, but we swap out all of it's dependencies so it just depends on abseil_dll

PiperOrigin-RevId: 291192055

--
5e888cd6f2a7722805d41f872108a03a84e421c7 by Mark Barolak <mbar@google.com>:

Move absl/strings/internal/escaping.{cc,h} into internal build targets.

This puts absl/strings/internal/escaping.h behind a whitelist and it also resolves https://github.com/abseil/abseil-cpp/issues/604.

PiperOrigin-RevId: 291173320

--
166836d24970da87587c1728036f53f05a28f0af by Eric Fiselier <ericwf@google.com>:

Internal Change.

PiperOrigin-RevId: 291012718

--
996ddb3dffda02440fa93f30ca5d71b14b688875 by Abseil Team <absl-team@google.com>:

Fix shared libraries log spam for built-in types in absl::GetFlag

PiperOrigin-RevId: 290772743
GitOrigin-RevId: 8bdb2020150ed0fd4a4e520e454dc5f54e33f776
Change-Id: I8bf2265dd14ebbace220a1b6b982bb5040ad2a26
2020-01-28 16:07:41 -05:00
Abseil Team
12bc53e031 Export of internal Abseil changes
--
c99f979ad34f155fbeeea69b88bdc7458d89a21c by Derek Mauro <dmauro@google.com>:

Remove a floating point division by zero test.

This isn't testing behavior related to the library, and MSVC warns
about it in opt mode.

PiperOrigin-RevId: 285220804

--
68b015491f0dbf1ab547994673281abd1f34cd4b by Gennadiy Rozental <rogeeff@google.com>:

This CL introduces following changes to the class FlagImpl:
* We eliminate the CommandLineFlagLocks struct. Instead callback guard and callback function are combined into a single CallbackData struct, while primary data lock is stored separately.
* CallbackData member of class FlagImpl is initially set to be nullptr and is only allocated and initialized when a flag's callback is being set. For most flags we do not pay for the extra space and extra absl::Mutex now.
* Primary data guard is stored in data_guard_ data member. This is a properly aligned character buffer of necessary size. During initialization of the flag we construct absl::Mutex in this space using placement new call.
* We now avoid extra value copy after successful attempt to parse value out of string. Instead we swap flag's current value with tentative value we just produced.

PiperOrigin-RevId: 285132636

--
ed45d118fb818969eb13094cf7827c885dfc562c by Tom Manshreck <shreck@google.com>:

Change null-term* (and nul-term*) to NUL-term* in comments

PiperOrigin-RevId: 285036610

--
729619017944db895ce8d6d29c1995aa2e5628a5 by Derek Mauro <dmauro@google.com>:

Use the Posix implementation of thread identity on MinGW.
Some versions of MinGW suffer from thread_local bugs.

PiperOrigin-RevId: 285022920

--
39a25493503c76885bc3254c28f66a251c5b5bb0 by Greg Falcon <gfalcon@google.com>:

Implementation detail change.

Add further ABSL_NAMESPACE_BEGIN and _END annotation macros to files in Abseil.

PiperOrigin-RevId: 285012012
GitOrigin-RevId: c99f979ad34f155fbeeea69b88bdc7458d89a21c
Change-Id: I4c85d3704e45d11a9ac50d562f39640a6adbedc1
2019-12-12 15:37:13 -05:00
Abseil Team
fa8c75182f Export of internal Abseil changes
--
049ac45508e335c6f010f2d28d71016b9fa65b4e by Derek Mauro <dmauro@google.com>:

Fix librt detection

PiperOrigin-RevId: 280207723

--
6382c3a9fb2643af9dc031f92ca846c4a78e249c by Andy Getzendanner <durandal@google.com>:

Fix Conan builds

Import of https://github.com/abseil/abseil-cpp/pull/400

PiperOrigin-RevId: 280025424

--
aebcd52b1686ac82663a8d0193b60d0122a43372 by Samuel Benzaquen <sbenza@google.com>:

Enable the assertion in the iterator's operator== and operator!=

PiperOrigin-RevId: 279998951

--
5b61d909e2159ac6fd45e0e456818db1e725ecd1 by Derek Mauro <dmauro@google.com>:

Add best effort support for compiling much of Abseil with MinGW.
This involves disabling ABSL_ATTRIBUTE_WEAK and adding link flags.

A change to CCTZ is still necessary.

Tests were not run yet, but most of them now build.

PiperOrigin-RevId: 279966541

--
4336f8b10cff906e2defdd7d1d449cde4907da5d by Abseil Team <absl-team@google.com>:

Add comments and relax memory orders in base_internal::CallOnceImpl.

Add a comment to document the memory order guarantee if
base_internal::SpinLockWait() is called and returns kOnceDone.

Add a comment for the load/store sequence in base_internal::CallOnceImpl
based on Mike Burrows' explanation.

The atomic load of 'control' in the #ifndef NDEBUG block does not need
std::memory_order_acquire. It can use std::memory_order_relaxed.

The atomic compare_exchange_strong of 'control' does not need
std::memory_order_acquire in the success case. It can use
std::memory_order_relaxed.
PiperOrigin-RevId: 279814155

--
407de3a5e9af957cded54a136ca0468bde620d4d by Abseil Team <absl-team@google.com>:

Added a script to generate abseil.podspec from all BUILD.bazel files automatically.

PiperOrigin-RevId: 279811441

--
26139497d4a363d6c7bc989c554da593e8819a07 by Derek Mauro <dmauro@google.com>:

Add missing copyright and Apache License to //absl/functional/BUILD.bazel

PiperOrigin-RevId: 279795227

--
98ed625b02af6e5834edf52a920d8ca2dab4cd90 by Matt Kulukundis <kfm@google.com>:

Switch the implementation of hashtablez to *only* work on platforms that have a
PER_THREAD_TLS.

The old case is very slow (global mutex) and nobody collects data from that
configuration anyway.

PiperOrigin-RevId: 279775149

--
07225900ef672c005c38f467ad3f92f38d0922b3 by Derek Mauro <dmauro@google.com>:

Remove the minumum glibc version check

PiperOrigin-RevId: 279750412

--
ec09956a951b4f52228ecc81968b8db7ae19ed15 by Derek Mauro <dmauro@google.com>:

CMake only: link with -lrt to support older glibc versions

PiperOrigin-RevId: 279741661

--
97b113fb2e8246f6152c36330ba13793b37154b6 by Xiaoyi Zhang <zhangxy@google.com>:

Internal change.

PiperOrigin-RevId: 279390188

--
ca8f72f2721546cc9b01bd01b2ea144962e6e0c5 by Andy Getzendanner <durandal@google.com>:

Expose PutTwoDigits for internal use within Abseil.

PiperOrigin-RevId: 279374239

--
14c6384cc03bbdfdefd2e4b635f104af5dd7e026 by Derek Mauro <dmauro@google.com>:

Remove log_severity sources from the base target.
They are already compiled as part of a separate library.

PiperOrigin-RevId: 279372619

--
3c5d926c718f8bf394e3bee87b6ba8d94601e0d3 by Abseil Team <absl-team@google.com>:

s/indepdent/independent/g in SimpleAtof's documentation.

PiperOrigin-RevId: 279350836

--
de2c44be8a8edf9efa1fe2007cba3564f3e5b0b8 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 279346990

--
2ba078341423fcf6d0ba5ca1831f86570a26e615 by Samuel Benzaquen <sbenza@google.com>:

Add hash support for std::wstring, std::u16string and std::u32string.

PiperOrigin-RevId: 279320672

--
3272d3ffcfa55283a04f90e5868701912da95ef7 by Andy Soffer <asoffer@google.com>:

Removing a bunch of __restricts that amount to no performance differences. One
of these is the cause of https://github.com/abseil/abseil-cpp/issues/396. In
particular, in one of the Vector128Store functions, restricts on two pointers
that were indeed aliased seems to be the root cause of the issues.

Closes #396

PiperOrigin-RevId: 279318999

--
342f338ab31cc24344d5de8f28cf455bbb629a17 by Jorg Brown <jorg@google.com>:

Support uint128 in SimpleAtoi

PiperOrigin-RevId: 279234038

--
81cb0a04cf2dc4515d303679fc60968712191571 by Derek Mauro <dmauro@google.com>:

Change the check for futex availability to support older Linux systems

PiperOrigin-RevId: 279147079

--
cb4ca4aa4c8d2d710a5d483c56c4ce4f979e14b1 by Abseil Team <absl-team@google.com>:

Add IWYU pragma: export for int128 .inc files.

PiperOrigin-RevId: 279107098

--
b8df86ef610c366729f07326c726f3e34817b4dd by Abseil Team <absl-team@google.com>:

An optimization for Waiter::Post() in the SEM waiter mode.

Like the FUTEX waiter mode, Waiter::Post() only needs to call Poke() if
it incremented the atomic variable from 0.

PiperOrigin-RevId: 279086133
GitOrigin-RevId: 049ac45508e335c6f010f2d28d71016b9fa65b4e
Change-Id: I4c1a4073fff62cb6a1fcb1c104aa7d62dad588c2
2019-11-13 15:04:44 -05:00
Abseil Team
25597bdfc1 Export of internal Abseil changes
--
3e60f355db5afd7a864591d81a6c383b6c0a0780 by Samuel Benzaquen <sbenza@google.com>:

Internal change

PiperOrigin-RevId: 272531442

--
6d189240b8cebe3a390c730de491156d03049229 by Andy Getzendanner <durandal@google.com>:

Fix AtomicHook init-order fiasco under MSVC 2019.

On this platform, constexpr static init sometimes happens after dynamic init =/.  When it does, we should not zero hook_ (overwriting the value written there by dynamic init); instead we should leave it alone.  This works even when constexpr static init goes first since all uses of AtomicHook should have static storage duration and be zero-initialized.

https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html

PiperOrigin-RevId: 272525226

--
d01b14fc06bc75b41c51976ed32e7c304ea1aab7 by Abseil Team <absl-team@google.com>:

exclude emscripten from running tests involving long doubles

PiperOrigin-RevId: 272497628
GitOrigin-RevId: 3e60f355db5afd7a864591d81a6c383b6c0a0780
Change-Id: I3c8a8f5acaf7652a06ef40cf028ef5d2e142f81b
2019-10-03 12:32:02 -04:00
Abseil Team
83c1d65c90 Export of internal Abseil changes
--
972333fe1e43427849b8a634aa35061e81be3642 by Abseil Team <absl-team@google.com>:

Replace deprecated thread annotations macros.

PiperOrigin-RevId: 267332619

--
7039c6dc499a31c372b4872eda0772455931c360 by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 267220271

--
a3f524d2afc2535686f206a7ce06961016349d7a by Abseil Team <absl-team@google.com>:

Factor kernel_timeout out of synchronization.

PiperOrigin-RevId: 267217304

--
90287de4114ef9a06cafe50256a2d03349772c21 by Abseil Team <absl-team@google.com>:

Fixed comment typo.

PiperOrigin-RevId: 267198532

--
d312c1a1e52aeca1871ff0deead416d09a7f237e by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 267185804
GitOrigin-RevId: 972333fe1e43427849b8a634aa35061e81be3642
Change-Id: Ia8a2f877c57cef9854aad48f1753af872fc04dc8
2019-09-05 06:05:17 -04:00
Abseil Team
bf29470384 Export of internal Abseil changes.
--
bdce7e57e9e886eff1114d0266781b443f7ec639 by Derek Mauro <dmauro@google.com>:

Change {Get|Set}EnvironmentVariable to {Get|Set}EnvironmentVariableA for
compatibility with /DUNICODE.

PiperOrigin-RevId: 239229514

--
2276ed502326a044a84060d34eb19d499e3a3be2 by Derek Mauro <dmauro@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 239228622

--
a462efb970ff43b08a362ef2343fb75ac1295a50 by Derek Mauro <dmauro@google.com>:

Adding linking of CoreFoundation to CMakeLists in absl/time.
Import https://github.com/abseil/abseil-cpp/pull/280.

Fix #283

PiperOrigin-RevId: 239220785

--
fc23327b97f940c682aae1956cf7a1bf87f88c06 by Derek Mauro <dmauro@google.com>:

Add hermetic test script that uses Docker to build with a very recent
version of gcc (8.3.0 today) with libstdc++ and bazel.

PiperOrigin-RevId: 239220448

--
418c08a8f6a53e63b84e39473035774417ca3aa7 by Derek Mauro <dmauro@google.com>:

Disable part of the variant exeception safety test on move assignment
when using versions of libstd++ that contain a bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87431#c7

PiperOrigin-RevId: 239062455

--
799722217aeda79679577843c91d5be62cbcbb42 by Matt Calabrese <calabrese@google.com>:

Add internal-only IsSwappable traits corresponding to std::is_swappable and std::is_nothrow_swappable, which are used with the swap implementations of optional and variant.

PiperOrigin-RevId: 239049448

--
aa46a036038a3de5c68ac5e5d3b4bf76f818d2ea by CJ Johnson <johnsoncj@google.com>:

Make InlinedVectorStorage constructor explicit

PiperOrigin-RevId: 239044361

--
17949715b3aa21c794701f69f2154e91b6acabc3 by CJ Johnson <johnsoncj@google.com>:

Add absl namesapce to internal/inlined_vector.h

PiperOrigin-RevId: 239030789

--
834628325953078cc08ed10d23bb8890e5bec897 by Derek Mauro <dmauro@google.com>:

Add test script that uses Docker to build Abseil with gcc-4.8,
libstdc++, and cmake.

PiperOrigin-RevId: 239028433

--
80fe24149ed73ed2ced995ad1e372fb060c60427 by CJ Johnson <johnsoncj@google.com>:

Factors data members of InlinedVector into an impl type called InlinedVectorStorage so that (in future changes) the contents of a vector can be grouped together with a single pointer.

PiperOrigin-RevId: 239021086

--
585331436d5d4d79f845e45dcf79d918a0dc6169 by Derek Mauro <dmauro@google.com>:

Add -Wno-missing-field-initializers to gcc compiler flags.
gcc-4.x has spurious missing field initializer warnings.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750

PiperOrigin-RevId: 239017217

--
94602fe4e33ee3a552a7f2939c0f57a992f55075 by Abseil Team <absl-team@google.com>:

Formatting fixes.

PiperOrigin-RevId: 238983038

--
a1c1b63c08505574e0a8c491561840cecb2bb93e by Derek Mauro <dmauro@google.com>:

Add hermetic test script that uses Docker to build with a very recent
version of clang with libc++ and bazel.

PiperOrigin-RevId: 238669118

--
e525f8d20bc2f79a0d69336b902f63858f3bff9d by Derek Mauro <dmauro@google.com>:

Disable the test optionalTest.InPlaceTSFINAEBug until libc++ is updated.

PiperOrigin-RevId: 238661703

--
f99a2a0b5ec424a059678f7f226600f137b4c74e by Derek Mauro <dmauro@google.com>:

Correct the check for the FlatHashMap-Any test bug (list conditions
instead of platforms when possible)

PiperOrigin-RevId: 238653344

--
777928035dbcbf39f361eb7d10dc3696822f692f by Jon Cohen <cohenjon@google.com>:

Add install rules for Abseil CMake.

These are attempted to be limited to in-project installation.  This serves two purposes -- first it's morally the same as using Abseil in-source, except you don't have to rebuild us every time.  Second, the presence of an install rule makes life massively simpler for package manager maintainers.

Currently this doesn't install absl tests or testonly libraries.  This can be added in a follow-up patch.

Fixes #38, Fixes #80, Closes #182

PiperOrigin-RevId: 238645836

--
ded1c6ce697c191b7a6ff14572b3e6d183117b2c by Derek Mauro <dmauro@google.com>:

Add hermetic test script that uses Docker to build with a very recent
version of clang with libstdc++ and bazel.

PiperOrigin-RevId: 238517815
GitOrigin-RevId: bdce7e57e9e886eff1114d0266781b443f7ec639
Change-Id: I6f745869cb8ef63851891ccac05ae9a7dd241c4f
2019-03-19 14:19:10 -04:00
nik7273
38b704384c Changed HTTP URLs to HTTPS where possible (#270) 2019-03-08 10:27:53 -05:00
Abseil Team
308ce31528 Export of internal Abseil changes.
--
e4e4a3460b64ba0571be217b04ec286bfac6b6bf by Tom Manshreck <shreck@google.com>:

Internal change

PiperOrigin-RevId: 235573160

--
200323f1243e20c201d20bdab4c15a20346a27e5 by CJ Johnson <johnsoncj@google.com>:

Removed unneded template parameter from InlinedVector internal functions

PiperOrigin-RevId: 234910222

--
2f1bba53c9ca40d0718c4c1edfcfea40edd5049e by CJ Johnson <johnsoncj@google.com>:

Add comment highlighting the fact that the InlinedVector(&&, alloc) move constructor overload will still commit pointer theft in one case

PiperOrigin-RevId: 234899890
GitOrigin-RevId: e4e4a3460b64ba0571be217b04ec286bfac6b6bf
Change-Id: I0aabbabb96e9a057a55ed6b42591ea43b4609efe
2019-02-25 15:03:46 -05:00
Abseil Team
93d155bc44 Export of internal Abseil changes.
--
3d20ce6cd6541579abecaba169d4b8716d511272 by Jon Cohen <cohenjon@google.com>:

Only use LSAN for clang version >= 3.5.  This should fix https://github.com/abseil/abseil-cpp/issues/244

PiperOrigin-RevId: 234675129

--
e15bd4ec7a81aa95cc3d09fa1e0e81d58ae478fb by Conrad Parker <conradparker@google.com>:

Fix errors in apply() sample code

The following changes are made:
 * Make the example method public.
 * Give the two user functions different names to avoid confusion about
   whether apply() can select the correct overload of a function based
   on its tuple argument (it can't).
 * Pass tuple2 to the second example apply() invocation, instead of
   passing its contents individually.
 * Fix a s/tuple/tuple3/ typo in the third example apply() invocation.

PiperOrigin-RevId: 234223407

--
de0ed71e21bc76ddf9fe715fdbaef74cd0df95c7 by Abseil Team <absl-team@google.com>:

First test if a macro is defined to avoid -Wundef.

ABSL clients may need to compile their code with the -Wundef warning
flag. It will be helpful if ABSL header files can be compiled without
the -Wundef warning.

How to avoid the -Wundef warning: If a macro may be undefined, we need
to first test whether the macro is defined before testing its value. We
can't rely on the C preprocessor rule that an undefined macro has the
value 0L.

PiperOrigin-RevId: 234201123

--
fa484ad7dae0cac21140a96662809ecb0ec8eb5d by Abseil Team <absl-team@google.com>:

Internal change.

PiperOrigin-RevId: 234185697

--
d69b1baef681e27954b065375ecf9c2320463b2b by Samuel Benzaquen <sbenza@google.com>:

Mix pointers more thoroughly.
Some pointer alignments interact badly with the mixing constant. By mixing twice we reduce this problem.

PiperOrigin-RevId: 234178401

--
1041d0e474610f3a8fea0db90958857327d6da1c by Samuel Benzaquen <sbenza@google.com>:

Record rehashes in the hashtablez struct.
Only recording the probe length on insertion causes a huge overestimation of
the total probe length at any given time.

With natural growth, elements are inserted when the load factor is between
(max load/2, max load). However, after a rehash the majority of elements are
actually inserted when the load factor is less than max/2 and have a much lower
average probe length.

Also reset some values when the table is cleared.

PiperOrigin-RevId: 234013580

--
299205caf3c89c47339f7409bc831746602cea84 by Mark Barolak <mbar@google.com>:

Fix a sample code snippet that assumes `absl::string_view::const_iterator` is `const char*`.  This is generally true, however in C++17 builds, absl::string_view is an alias for std::string_view and on MSVC, the std::string_view::const_iterator is an object instead of just a pointer.

PiperOrigin-RevId: 233844595

--
af6c6370cf51a1e6c1469c79dfb2a486a4009136 by Abseil Team <absl-team@google.com>:

Internal change.

PiperOrigin-RevId: 233773470

--
6e59e4b8e2bb6101b448f0f32b0bea81fe399ccf by Abseil Team <absl-team@google.com>:

fix typo in {Starts|Ends}WithIgnoreCase comment in match.h

PiperOrigin-RevId: 233662951
GitOrigin-RevId: 3d20ce6cd6541579abecaba169d4b8716d511272
Change-Id: Ib9a29b1c38c6aedf5d9f3f7f00596e8d30e864dd
2019-02-20 18:02:20 -05:00
Abseil Team
2901ec32a9 Export of internal Abseil changes.
--
5da9755667df37e38ccaf6938c9f408e294110bb by Shaindel Schwartz <shaindel@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 232942734

--
b6fb275769c66fdd2bd92b119198c59e9a7dd737 by Samuel Benzaquen <sbenza@google.com>:

Fix integral underflow when from-arg width is INT_MIN.

PiperOrigin-RevId: 232888037

--
4135dbba4a26c4642277fc2a7e2a833d593daa1c by Abseil Team <absl-team@google.com>:

Add the insert_return_type alias to raw_hash_set.

PiperOrigin-RevId: 232683892

--
0b120b7d3693800bbb886f6fc607ae54a9338cb1 by Abseil Team <absl-team@google.com>:

Macros to detect and disabled SafeStack
https://clang.llvm.org/docs/SafeStack.html

PiperOrigin-RevId: 232680114

--
a77b3fb533a9e37966d1d6ef5ccd09c73fff2ca1 by Abseil Team <absl-team@google.com>:

Avoid potential red zone clobber

Pushing on the stack on x86-64 may clobber local variables held below
%rsp in the red zone. Avoid this by using lea on x86-64.

PiperOrigin-RevId: 232592478

--
bf326a0eefa92f4e704287563df0c5a5b1873b6d by Eric Fiselier <ericwf@google.com>:

Add additional tests for AbslHashValue.

PiperOrigin-RevId: 232344325

--
816e4f98fd7632c944c779db87b7dac4e138afcf by Eric Fiselier <ericwf@google.com>:

Avoid upcoming GCC 9.0 warnings about base class init.

Currently, in trunk, GCC has a new warning under -Wextra
that diagnoses when a derived class fails to explicitly
initialize the base class in a constructor initializer list.

This patch avoids this warning.

PiperOrigin-RevId: 232327626

--
779c0f44b3c2b7a04d4bdf978641eb8180515bf6 by Eric Fiselier <ericwf@google.com>:

Guard against C++2a char8_t change.

PiperOrigin-RevId: 232326178

--
41e5395b85bbbfb5bf418cc21b04ad4ccb15a284 by Eric Fiselier <ericwf@google.com>:

Avoid Clang Warning

PiperOrigin-RevId: 232138866
GitOrigin-RevId: 5da9755667df37e38ccaf6938c9f408e294110bb
Change-Id: I49ee4f58db177b81b039d7d949f671c97c5a7933
2019-02-07 17:48:22 -05:00
Abseil Team
0dffca4e36 Export of internal Abseil changes.
--
5804cc13b413412988248835459b90cd15ec43d9 by Abseil Team <absl-team@google.com>:

Mark raw_hash_set::clear() with the ABSL_ATTRIBUTE_REINITIALIZES attribute.

This prevents false positives in the clang-tidy check bugprone-use-after-move;
it allows reset() to be called on a moved-from raw_hash_set without any
warnings, and the raw_hash_set will thereafter be regarded as initialized again.

PiperOrigin-RevId: 230717196

--
ff5961a5600ae19b69a9cba6912126cdf2858f38 by CJ Johnson <johnsoncj@google.com>:

Swaps DisableIfIntegral<> for EnableIfInputIterator<> for Iterator member functions of InlinedVector

PiperOrigin-RevId: 230559521

--
3f9754ccbeecbd40f235c6f2465279e045ff51d9 by Derek Mauro <dmauro@google.com>:

Import GitHub PR 254
https://github.com/abseil/abseil-cpp/pull/254

Fixes warnings from -Wclass-memaccess (base_internal::ThreadIdentity?
with no trivial copy-assignment).

PiperOrigin-RevId: 230536048

--
8af03a654ce9a4a7f55384bc7eb1ed64878ac2ec by Chris Kennelly <ckennelly@google.com>:

absl: cap SpinLock backoff to 4ms

The current backoff logic has 3 problems:
1. It can produce too high values (up to 256ms), which can negatively
affect tail latency. The value was chosen long time ago and now it's
a good idea to reconsider it.
2. It does not have low bound, so on any iteration it can produce
a very small value that will lead to unnecessary cpu consumption.
3. It does not increase low bound with the number of iterations.
So if the SpinLock is actually somehow locked for a very prolonged time,
a waiter can still wake periodically.

Rework the logic to solve these problems.
Add lower bound of 128us, no code should rely on absence of episodic
delays in this range as they can occur everywhere.
Lower upper bound to 4ms. A thread sleeping for 4ms does not consume
significant cpu time (see below).
Grow lower bound with the number of iterations.

This is cpu consumption of a process doing usleep(x) in a loop
(sampled with ps):

    64us -> 4.0%
   128us -> 2.7%
   256us -> 3.5%
   512us -> 2.8%
  1024us -> 1.6%
  2048us -> 0.6%
  4096us -> 0.3%
  8192us -> 0.0%

Few millisecond sleeps do not consume significant time.

PiperOrigin-RevId: 230534015

--
37ebba92289ca556cb2412cd8b3cb4c1ead3def7 by Samuel Benzaquen <sbenza@google.com>:

Add override and dispose hooks to the hashtable sampler.

PiperOrigin-RevId: 230353438

--
89c8f90175233ce9964eb3412df04e8a3cff0c0f by Andy Getzendanner <durandal@google.com>:

Fix a comment typo.

PiperOrigin-RevId: 229986838
GitOrigin-RevId: 5804cc13b413412988248835459b90cd15ec43d9
Change-Id: Iedb5e2cc9c0b924635c1c87b537780ab6b5b899f
2019-01-24 11:10:30 -05:00
Abseil Team
b16aeb6756 Export of internal Abseil changes.
--
5f1cf6547231f1b1daad6d1b785df6b0b999b3c9 by Samuel Benzaquen <sbenza@google.com>:

Fix uninitialized member in the `iterator` class by using a union of the two
possible states of the iterator.
This silences a Wuninitialized warning in gcc>=7.

PiperOrigin-RevId: 228175148

--
98b4e3204c0ec3cfd4cb037e24d443ea4b63fc84 by CJ Johnson <johnsoncj@google.com>:

Factors out the implementation of InlinedVector::swap(...) into a private member function

PiperOrigin-RevId: 228173383

--
f1432ad3a8b05285c6d55bc4754cfae765485b7f by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 227891984

--
03fc00c7a4efc6000e6d9125cb2e252bffda76fe by Andy Getzendanner <durandal@google.com>:

Add a missing linebreak to a comment and markdownify two unordered lists.

PiperOrigin-RevId: 227861389

--
0d66c9afba4fc9aa52e61d9fb410e165018a7b48 by Abseil Team <absl-team@google.com>:

Add an API to register a new source for the cycle clock.

PiperOrigin-RevId: 227779218

--
14d3f9b70c8818b8541e5fb2f6ca4c59d479de31 by Andy Getzendanner <durandal@google.com>:

Correct a typo in a stripping marker.

PiperOrigin-RevId: 227750014

--
59df88740f4e315beb57a8772f8bcf7879440c74 by Matt Kulukundis <kfm@google.com>:

Switch thread local handling to be more cross platform

PiperOrigin-RevId: 227695133

--
75deed5bfcb5c42534e933f104aa7d94e11e348d by Abseil Team <absl-team@google.com>:

Rollback workaround toolchain bug for incorrect handling of thread_local in inline
functions

PiperOrigin-RevId: 227689133

--
54994bf0afec026e6e0e7a199df0bbb4b7d9a4aa by Derek Mauro <dmauro@google.com>:

Add -pthread to linkopts where it actually belongs, on the library
that uses it.
Fixes https://github.com/abseil/abseil-cpp/issues/240.

PiperOrigin-RevId: 227612492

--
893875f3536b7e0a1bad993aa6b2e083abb3b25a by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 227582833

--
506c9b8e9002ca3389c7040473b68d4cbf94bdcc by Matt Kulukundis <kfm@google.com>:

Workaround toolchain bug for incorrect handling of thread_local in inline
functions

PiperOrigin-RevId: 227561449

--
29ee90d96dfe3114cf93f9bb92ea0cc9e768a407 by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 227054634
GitOrigin-RevId: 5f1cf6547231f1b1daad6d1b785df6b0b999b3c9
Change-Id: Ibc90566d92ee6e0ad7e150f513ec7f5d22ec0a94
2019-01-07 15:22:43 -05:00
Abseil Team
968a34ffda Export of internal Abseil changes.
--
7fa1107161a03dac53fb84c2b06d8092616c7b13 by Abseil Team <absl-team@google.com>:

Harden the generic stacktrace implementation for use during early program execution

PiperOrigin-RevId: 226375950

--
079f9969329f5eb66f647dd3c44b17541b1bf217 by Matt Kulukundis <kfm@google.com>:

Workaround platforms that have over-aggressive warnings on -Wexit-time-destructors

PiperOrigin-RevId: 226362948

--
1447943f509be681ca5495add0162c750ef237f1 by Matt Kulukundis <kfm@google.com>:

Switch from 64 to size_t atomics so they work on embedded platforms that do not
have 64 bit atomics.

PiperOrigin-RevId: 226210704

--
d14d49837ae2bcde74051e0c79c18ee0f43866b9 by Tom Manshreck <shreck@google.com>:

Develop initial documentation for API breaking changes process:

PiperOrigin-RevId: 226210021

--
7ea3d7fe0e86979dab83a5fc9cc3bf1d6cb3bd53 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 226195522

--
7de873e880d7f016a4fa1e08d626f0535cc470af by Abseil Team <absl-team@google.com>:

Make Abseil LICENSE files newline terminated, with a single
trailing blank line.  Also remove line-ending whitespace.

PiperOrigin-RevId: 226182949

--
7d00643fadfad7f0d992c68bd9d2ed2e5bc960b0 by Matt Kulukundis <kfm@google.com>:

Internal cleanup

PiperOrigin-RevId: 226045282

--
c4a0a11c0ce2875271191e477f3d36eaaeca4613 by Matt Kulukundis <kfm@google.com>:

Internal cleanup

PiperOrigin-RevId: 226038273

--
8ee4ebbb1ae5cda119e436e5ff7e3aa966608c10 by Matt Kulukundis <kfm@google.com>:

Adds a global sampler which tracks a fraction of live tables for collecting
telemetry data.

PiperOrigin-RevId: 226032080

--
d576446f050518cd1b0ae447d682d8552f0e7e30 by Mark Barolak <mbar@google.com>:

Replace an internal CaseEqual function with calls to the identical absl::EqualsIgnoreCase.  This closes out a rather old TODO.

PiperOrigin-RevId: 226024779

--
6b23f1ee028a5ffa608c920424f1220a117a8f3d by Abseil Team <absl-team@google.com>:

Add December 2018 LTS branch to list of LTS branches.

PiperOrigin-RevId: 226011333

--
bb0833a43bdaef4c8c059b17bcd27ba9a085a114 by Mark Barolak <mbar@google.com>:

Explicitly state that when the SimpleAtoi family of functions encounter an error, the value of their output parameter is unspecified.

Also standardize the name of the output parameter to be `out`.

PiperOrigin-RevId: 225997035

--
46c1876b1a248eabda7545daa61a74a4cdfe9077 by Abseil Team <absl-team@google.com>:

Remove deprecated CMake function absl_test, absl_library and absl_header_library

PiperOrigin-RevId: 225950041
GitOrigin-RevId: 7fa1107161a03dac53fb84c2b06d8092616c7b13
Change-Id: I2ca9d3aada9292614527d1339a7557494139b806
2018-12-21 14:43:20 -05:00