commit | 1ae9b71c474628d60eb251a3f62967fe64151bb2 | [log] [tgz] |
---|---|---|
author | Abseil Team <absl-team@google.com> | Tue Apr 20 07:17:48 2021 -0700 |
committer | Dino Radaković <dinor@google.com> | Tue Apr 20 08:45:46 2021 -0700 |
tree | cb4fb71be788b327f78bd0d2fc8ec7b4f2a022c5 | |
parent | 732c6540c19610d2653ce73c09eb6cb66da15f42 [diff] |
Export of internal Abseil changes -- ac1df60490c9583e475e22de7adfc40023196fbf by Martijn Vels <mvels@google.com>: Change Cord constructor(string_view) to explicit make_tree and Cordz tracking This CL changes the ctor to use an easier to maintain model where Cord code explicitly invokes Cordz update or new / tree logic, which avoids the ambiguity of the 'branched' InlineRep::set_tree code. This removes the need to equip InlineRep with 'MethodIdentifier' or other necessary call info, and also is a cleaner model: InlineRep is carrying too much code now that should plainly sit in Cord, especially with all internal abstractions having moved to InlineData. See child CL(s) for desired state PiperOrigin-RevId: 369433619 -- b665af7f586e6c679a8b27d4f78d5a1d2b596058 by Abseil Team <absl-team@google.com>: Rename the 'Compare' template type to 'LessThan', as the passed-in function is expected to act like operator<. It is worth avoiding confusion with std::compare, which returns an int (-1/0/1), as due to implicit casting this can lead to hard-to-spot bugs. PiperOrigin-RevId: 369391118 -- c3c775269cad0f4982ec63f3616dd78bb9e52dca by Martijn Vels <mvels@google.com>: Integrate CordzUpdateTracker into CordzInfo PiperOrigin-RevId: 369348824 -- 771d81ed357496c117179e1daec76eba5155932d by Martijn Vels <mvels@google.com>: Replace mutex() with Lock() / Unlock() function Mini design future tracking of CordzInfo sampled cords: CordzInfo holds a CordRep* reference without a reference count. Cord is responsible for synchronizing updates for sampled cords such that the CordRep* contained in CordzInfo is at all times valid. This is done by scoping Lock() and Unlock() calls around the code modifying the code of a sampled cord. For example (using the future CL CordzUpdateScope()): CordzInfo* cordz_info = get_cordz_info(); CordzUpdateScope scope(cordz_info, CordzUpdateTracker::kRemovePrefix); CordRep* rep = RemovePrefixImpl(root); set_tree(rep); if (cordz_info) { cordz_info->SetCordRep(rep); } On CordzInfo::Unlock(), if the internal rep is null, the cord is no longer sampled, and CordzInfo will be deleted. Thus any update resulting in the Cord being inlined will automatically no longer be sampled. PiperOrigin-RevId: 369338802 -- 5563c12df04a1e965a03b50bdd032739c55c0706 by Martijn Vels <mvels@google.com>: Add UpdateTracker to CordzStatistics PiperOrigin-RevId: 369318178 -- 6b4d8463722a3e55a3e8f6cb3741a41055e7f83e by Martijn Vels <mvels@google.com>: Add kClear, kConstructor* and kUnknown values and fix typo PiperOrigin-RevId: 369297163 -- 041adcbc929789d6d53371a8236840fc350e1eeb by Derek Mauro <dmauro@google.com>: Switch from malloc to operator new in pool_urbg.cc so it can only fail by throwing/aborting PiperOrigin-RevId: 369274087 -- 5d97a5f43e3f2d02d0a5bbe586d93b5751812981 by Benjamin Barenblat <bbaren@google.com>: Correct Thumb function bound computation in the symbolizer On 32-bit ARM, all functions are aligned to multiples of two bytes, and the lowest-order bit in a function’s address is ignored by the CPU when computing branch targets. That bit is still present in instructions and ELF symbol tables, though; it’s repurposed to indicate whether the function contains ARM or Thumb code. If the symbolizer doesn’t ignore that bit, it will believe Thumb functions have boundaries that are off by one byte, so instruct the symbolizer to null out the lowest-order bit after retrieving it from the symbol table. PiperOrigin-RevId: 369254082 -- 462bb307c6cc332c1e2c3adb5f0cad51804bf937 by Derek Mauro <dmauro@google.com>: Add a check for malloc failure in pool_urbg.cc GitHub #940 PiperOrigin-RevId: 369238100 GitOrigin-RevId: ac1df60490c9583e475e22de7adfc40023196fbf Change-Id: Ic6ec91c62cd3a0031f6a75a43a83da959ece2d25
The repository contains the Abseil C++ library code. Abseil is an open-source collection of C++ code (compliant to C++11) designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
If you want to just get started, make sure you at least run through the Abseil Quickstart. The Quickstart contains information about setting up your development environment, downloading the Abseil code, running tests, and getting a simple binary working.
Bazel and CMake are the official build systems for Abseil.
See the quickstart for more information on building Abseil using the Bazel build system.
If you require CMake support, please check the CMake build instructions and CMake Quickstart.
Abseil is officially supported on many platforms. See the Abseil platform support guide for details on supported operating systems, compilers, CPUs, etc.
Abseil contains the following C++ library components:
base
Abseil Fundamentals base
library contains initialization code and other code which all other Abseil code depends on. Code within base
may not depend on any other code (other than the C++ standard library).algorithm
algorithm
library contains additions to the C++ <algorithm>
library and container-based versions of such algorithms.cleanup
cleanup
library contains the control-flow-construct-like type absl::Cleanup
which is used for executing a callback on scope exit.container
container
library contains additional STL-style containers, including Abseil's unordered "Swiss table" containers.debugging
debugging
library contains code useful for enabling leak checks, and stacktrace and symbolization utilities.hash
hash
library contains the hashing framework and default hash functor implementations for hashable types in Abseil.memory
memory
library contains C++11-compatible versions of std::make_unique()
and related memory management facilities.meta
meta
library contains C++11-compatible versions of type checks available within C++14 and C++17 versions of the C++ <type_traits>
library.numeric
numeric
library contains C++11-compatible 128-bit integers.status
status
contains abstractions for error handling, specifically absl::Status
and absl::StatusOr<T>
.strings
strings
library contains a variety of strings routines and utilities, including a C++11-compatible version of the C++17 std::string_view
type.synchronization
synchronization
library contains concurrency primitives (Abseil's absl::Mutex
class, an alternative to std::mutex
) and a variety of synchronization abstractions.time
time
library contains abstractions for computing with absolute points in time, durations of time, and formatting and parsing time within time zones.types
types
library contains non-container utility types, like a C++11-compatible version of the C++17 std::optional
type.utility
utility
library contains utility and helper code.Abseil recommends users "live-at-head" (update to the latest commit from the master branch as often as possible). However, we realize this philosophy doesn't work for every project, so we also provide Long Term Support Releases to which we backport fixes for severe bugs. See our release management document for more details.
The Abseil C++ library is licensed under the terms of the Apache license. See LICENSE for more information.
For more information about Abseil: