Enumerations
enum CordFeatureDefaults
| Name | Value |
|---|---|
| kCordShallowSubcordsDefault | false |
Default feature enable states for cord ring buffers
Defined at line 63 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
enum Constants
| Name | Value |
|---|---|
| kInlinedVectorSize | 47 |
| kMaxBytesToCopy | 511 |
Defined at line 71 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
enum CordRepKind
| Name | Value |
|---|---|
| UNUSED_0 | 0 |
| SUBSTRING | 1 |
| CRC | 2 |
| BTREE | 3 |
| UNUSED_4 | 4 |
| EXTERNAL | 5 |
| FLAT | 6 |
| MAX_FLAT_TAG | 248 |
Various representations that we allow
Defined at line 212 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
Records
-
class ConstInitExternalStorage -
class CordRep -
class CordRepBtree -
class CordRepBtreeNavigator -
class CordRepBtreeReader -
class CordRepBtreeTestPeer -
class CordRepConcat -
class CordRepCrc -
class CordRepExternal -
class CordRepExternalImpl -
class CordRepFlat -
class CordRepSubstring -
class CordzHandle -
class CordzInfo -
class CordzSnapshot -
class CordzStatistics -
class CordzUpdateScope -
class CordzUpdateTracker -
class InlineData -
class Rank0 -
class Rank1 -
class RefcountAndFlags
Functions
-
absl::string_view EdgeData (const CordRep * edge)Returns the `absl::string_view` data reference for the provided data edge.
Requires 'IsDataEdge(edge) == true`.
Defined at line 45 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h
-
size_t GetEstimatedMemoryUsage (absl::Nonnull<const CordRep *> rep)Returns the *approximate* number of bytes held in full or in part by this
Cord (which may not remain the same between invocations). Cords that share
memory could each be "charged" independently for the same shared memory.
-
bool IsCordBtreeExhaustiveValidationEnabled () -
void LogFatalNodeType (CordRep * rep)Emits a fatal error "Unexpected node type: xyz" and aborts the program.
-
void InitializeCordRepExternal (absl::string_view data, absl::Nonnull<CordRepExternal *> rep)Does non-template-specific `CordRepExternal` initialization.
Requires `data` to be non-empty.
-
bool IsDataEdge (const CordRep * edge)Returns true if the provided rep is a FLAT, EXTERNAL or a SUBSTRING node
holding a FLAT or EXTERNAL child rep. Requires `rep != nullptr`.
Defined at line 32 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h
-
CordRep * RemoveCrcNode (CordRep * rep)Consumes `rep` and returns a CordRep* with any outer CordRepCrc wrapper
removed. This is usually a no-op (returning `rep`), but this will remove and
unref an outer CordRepCrc node.
Defined at line 54 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h
-
uint8_t AllocatedSizeToTagUnchecked (size_t size)Converts the provided rounded size to the corresponding tag
Defined at line 55 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
void SetCordBtreeExhaustiveValidation (bool do_exaustive_validation)`SetCordBtreeExhaustiveValidation()` can be set to force exhaustive
validation in debug assertions, and code that calls `IsValid()`
explicitly. By default, assertions should be relatively cheap and
AssertValid() can easily lead to O(n^2) complexity as recursive / full tree
validation is O(n).
-
size_t GetMorePreciseMemoryUsage (absl::Nonnull<const CordRep *> rep)Returns the *approximate* number of bytes held in full or in part by this
Cord for the distinct memory held by this cord. This is similar to
`GetEstimatedMemoryUsage()`, except that if the cord has multiple references
to the same memory, that memory is only counted once.
For example:
absl::Cord cord;
cord.append(some_other_cord);
cord.append(some_other_cord);
// Calls GetEstimatedMemoryUsage() and counts `other_cord` twice:
cord.EstimatedMemoryUsage(kTotal);
// Calls GetMorePreciseMemoryUsage() and counts `other_cord` once:
cord.EstimatedMemoryUsage(kTotalMorePrecise);
This is more expensive than `GetEstimatedMemoryUsage()` as it requires
deduplicating all memory references.
-
size_t TagToAllocatedSize (uint8_t tag)Converts the provided tag to the corresponding allocated size
Defined at line 64 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
bool cordz_should_profile_slow ()Determines if the next sample should be profiled. If it is, the value pointed
at by next_sample will be set with the interval until the next sample.
-
size_t GetEstimatedFairShareMemoryUsage (absl::Nonnull<const CordRep *> rep)Returns the *approximate* number of bytes held in full or in part by this
CordRep weighted by the sharing ratio of that data. For example, if some data
edge is shared by 4 different Cords, then each cord is attribute 1/4th of
the total memory usage as a 'fair share' of the total memory usage.
-
void enable_shallow_subcords (bool enable)Defined at line 67 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
bool cordz_should_profile ()Defined at line 68 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_functions.h
-
void cordz_set_next_sample_for_testing (int64_t )Defined at line 69 of file ../../third_party/abseil-cpp/absl/strings/internal/cordz_functions.h
-
CordRep * SkipCrcNode (CordRep * rep)Returns `rep` if it is not a CordRepCrc node, or its child if it is.
Does not consume or create a reference on `rep` or the returned value.
Defined at line 71 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h
-
size_t RoundUp (size_t n, size_t m)RoundUp logically performs `((n + m - 1) / m) * m` to round up to the nearest
multiple of `m`, optimized for the invariant that `m` is a power of 2.
Defined at line 78 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
const CordRep * SkipCrcNode (const CordRep * rep)Defined at line 80 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h
-
size_t RoundUpForTag (size_t size)Returns the size to the nearest equal or larger value that can be
expressed exactly as a tag value.
Defined at line 84 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
uint8_t AllocatedSizeToTag (size_t size)Converts the allocated size to a tag, rounding down if the size
does not exactly match a 'tag expressible' size value. The result is
undefined if the size exceeds the maximum size that can be encoded in
a tag, i.e., if size is larger than TagToAllocatedSize(
<max
tag>).
Defined at line 92 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
template <bool nullify_tail = false>void SmallMemmove (char * dst, const char * src, size_t n)Fast implementation of memmove for up to 15 bytes. This implementation is
safe for overlapping regions. If nullify_tail is true, the destination is
padded with '
\
0' up to 15 bytes.
Defined at line 94 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
size_t TagToLength (uint8_t tag)Converts the provided tag to the corresponding available data length
Defined at line 99 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h
-
template <typename Releaser, typename = ::absl::base_internal::invoke_result_t< Releaser, absl::string_view>>void InvokeReleaser (Rank1 , Releaser && releaser, absl::string_view data)Defined at line 361 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
template <typename Releaser, typename = ::absl::base_internal::invoke_result_t<Releaser>>void InvokeReleaser (Rank0 , Releaser && releaser, absl::string_view )Defined at line 367 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
char GetOrNull (absl::string_view data, size_t pos)Defined at line 455 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
int32_t get_cordz_mean_interval ()Returns the current sample rate. This represents the average interval
between samples.
-
bool operator== (const InlineData & lhs, const InlineData & rhs)Defined at line 526 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
bool operator!= (const InlineData & lhs, const InlineData & rhs)Defined at line 535 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
void set_cordz_mean_interval (int32_t mean_interval)Sets the sample rate with the average interval between samples.
-
void swap (InlineData & lhs, InlineData & rhs)Defined at line 895 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_internal.h
-
template <typename Releaser>absl::Nonnull<CordRep *> NewExternalRep (absl::string_view data, Releaser && releaser)NOLINTNEXTLINE - suppress clang-tidy raw pointer return.
Defined at line 1093 of file ../../third_party/abseil-cpp/absl/strings/cord.h
-
absl::Nonnull<CordRep *> NewExternalRep (absl::string_view datavoid (&)(absl::string_view) releaser)Overload for function reference types that dispatches using a function
pointer because there are no `alignof()` or `sizeof()` a function reference.
NOLINTNEXTLINE - suppress clang-tidy raw pointer return.
Defined at line 1106 of file ../../third_party/abseil-cpp/absl/strings/cord.h
Variables
int64_t cordz_next_sample
std::atomic<bool> shallow_subcords_enabled