cordz_info_statistics_test.cc
Go to the documentation of this file.
1 // Copyright 2021 The Abseil Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include <iostream>
16 #include <random>
17 #include <vector>
18 
19 #include "gmock/gmock.h"
20 #include "gtest/gtest.h"
21 #include "absl/base/config.h"
22 #include "absl/strings/cord.h"
23 #include "absl/strings/internal/cord_internal.h"
26 #include "absl/strings/internal/cord_rep_flat.h"
27 #include "absl/strings/internal/cord_rep_ring.h"
28 #include "absl/strings/internal/cordz_info.h"
29 #include "absl/strings/internal/cordz_sample_token.h"
30 #include "absl/strings/internal/cordz_statistics.h"
31 #include "absl/strings/internal/cordz_update_scope.h"
32 #include "absl/strings/internal/cordz_update_tracker.h"
33 #include "absl/synchronization/internal/thread_pool.h"
34 #include "absl/synchronization/notification.h"
35 
36 namespace absl {
38 namespace cord_internal {
39 
40 // Do not print statistics contents, the matcher prints them as needed.
41 inline void PrintTo(const CordzStatistics& stats, std::ostream* s) {
42  if (s) *s << "CordzStatistics{...}";
43 }
44 
45 namespace {
46 
48 
49 // Creates a flat of the specified allocated size
50 CordRepFlat* Flat(size_t size) {
51  // Round up to a tag size, as we are going to poke an exact tag size back into
52  // the allocated flat. 'size returning allocators' could grant us more than we
53  // wanted, but we are ok to poke the 'requested' size in the tag, even in the
54  // presence of sized deletes, so we need to make sure the size rounds
55  // perfectly to a tag value.
56  assert(size >= kMinFlatSize);
58  CordRepFlat* flat = CordRepFlat::New(size - kFlatOverhead);
59  flat->tag = AllocatedSizeToTag(size);
60  flat->length = size - kFlatOverhead;
61  return flat;
62 }
63 
64 // Creates an external of the specified length
65 CordRepExternal* External(int length = 512) {
66  return static_cast<CordRepExternal*>(
68 }
69 
70 // Creates a substring on the provided rep of length - 1
71 CordRepSubstring* Substring(CordRep* rep) {
72  auto* substring = new CordRepSubstring;
73  substring->length = rep->length - 1;
74  substring->tag = SUBSTRING;
75  substring->child = rep;
76  return substring;
77 }
78 
79 // Reference count helper
80 struct RefHelper {
81  std::vector<CordRep*> refs;
82 
83  ~RefHelper() {
84  for (CordRep* rep : refs) {
86  }
87  }
88 
89  // Invokes CordRep::Unref() on `rep` when this instance is destroyed.
90  template <typename T>
91  T* NeedsUnref(T* rep) {
92  refs.push_back(rep);
93  return rep;
94  }
95 
96  // Adds `n` reference counts to `rep` which will be unreffed when this
97  // instance is destroyed.
98  template <typename T>
99  T* Ref(T* rep, size_t n = 1) {
100  while (n--) {
101  NeedsUnref(CordRep::Ref(rep));
102  }
103  return rep;
104  }
105 };
106 
107 // Sizeof helper. Returns the allocated size of `p`, excluding any child
108 // elements for substring, concat and ring cord reps.
109 template <typename T>
110 size_t SizeOf(const T* rep) {
111  return sizeof(T);
112 }
113 
114 template <>
115 size_t SizeOf(const CordRepFlat* rep) {
116  return rep->AllocatedSize();
117 }
118 
119 template <>
120 size_t SizeOf(const CordRepExternal* rep) {
121  // See cord.cc
122  return sizeof(CordRepExternalImpl<intptr_t>) + rep->length;
123 }
124 
125 template <>
126 size_t SizeOf(const CordRepRing* rep) {
127  return CordRepRing::AllocSize(rep->capacity());
128 }
129 
130 // Computes fair share memory used in a naive 'we dare to recurse' way.
131 double FairShareImpl(CordRep* rep, size_t ref) {
132  double self = 0.0, children = 0.0;
133  ref *= rep->refcount.Get();
134  if (rep->tag >= FLAT) {
135  self = SizeOf(rep->flat());
136  } else if (rep->tag == EXTERNAL) {
137  self = SizeOf(rep->external());
138  } else if (rep->tag == SUBSTRING) {
139  self = SizeOf(rep->substring());
140  children = FairShareImpl(rep->substring()->child, ref);
141  } else if (rep->tag == BTREE) {
142  self = SizeOf(rep->btree());
143  for (CordRep*edge : rep->btree()->Edges()) {
144  children += FairShareImpl(edge, ref);
145  }
146  } else if (rep->tag == RING) {
147  self = SizeOf(rep->ring());
149  self += FairShareImpl(rep->ring()->entry_child(i), 1);
150  });
151  } else {
152  assert(false);
153  }
154  return self / ref + children;
155 }
156 
157 // Returns the fair share memory size from `ShareFhareImpl()` as a size_t.
158 size_t FairShare(CordRep* rep, size_t ref = 1) {
159  return static_cast<size_t>(FairShareImpl(rep, ref));
160 }
161 
162 // Samples the cord and returns CordzInfo::GetStatistics()
163 CordzStatistics SampleCord(CordRep* rep) {
164  InlineData cord(rep);
166  CordzStatistics stats = cord.cordz_info()->GetCordzStatistics();
167  cord.cordz_info()->Untrack();
168  return stats;
169 }
170 
171 MATCHER_P(EqStatistics, stats, "Statistics equal expected values") {
172  bool ok = true;
173 
174 #define STATS_MATCHER_EXPECT_EQ(member) \
175  if (stats.member != arg.member) { \
176  *result_listener << "\n stats." << #member \
177  << ": actual = " << arg.member << ", expected " \
178  << stats.member; \
179  ok = false; \
180  }
181 
183  STATS_MATCHER_EXPECT_EQ(node_count);
184  STATS_MATCHER_EXPECT_EQ(node_counts.flat);
185  STATS_MATCHER_EXPECT_EQ(node_counts.flat_64);
186  STATS_MATCHER_EXPECT_EQ(node_counts.flat_128);
187  STATS_MATCHER_EXPECT_EQ(node_counts.flat_256);
188  STATS_MATCHER_EXPECT_EQ(node_counts.flat_512);
189  STATS_MATCHER_EXPECT_EQ(node_counts.flat_1k);
190  STATS_MATCHER_EXPECT_EQ(node_counts.external);
191  STATS_MATCHER_EXPECT_EQ(node_counts.concat);
192  STATS_MATCHER_EXPECT_EQ(node_counts.substring);
193  STATS_MATCHER_EXPECT_EQ(node_counts.ring);
194  STATS_MATCHER_EXPECT_EQ(node_counts.btree);
195  STATS_MATCHER_EXPECT_EQ(estimated_memory_usage);
196  STATS_MATCHER_EXPECT_EQ(estimated_fair_share_memory_usage);
197 
198 #undef STATS_MATCHER_EXPECT_EQ
199 
200  return ok;
201 }
202 
203 TEST(CordzInfoStatisticsTest, Flat) {
204  RefHelper ref;
205  auto* flat = ref.NeedsUnref(Flat(512));
206 
207  CordzStatistics expected;
208  expected.size = flat->length;
209  expected.estimated_memory_usage = SizeOf(flat);
210  expected.estimated_fair_share_memory_usage = expected.estimated_memory_usage;
211  expected.node_count = 1;
212  expected.node_counts.flat = 1;
213  expected.node_counts.flat_512 = 1;
214 
215  EXPECT_THAT(SampleCord(flat), EqStatistics(expected));
216 }
217 
218 TEST(CordzInfoStatisticsTest, SharedFlat) {
219  RefHelper ref;
220  auto* flat = ref.Ref(ref.NeedsUnref(Flat(64)));
221 
222  CordzStatistics expected;
223  expected.size = flat->length;
224  expected.estimated_memory_usage = SizeOf(flat);
225  expected.estimated_fair_share_memory_usage = SizeOf(flat) / 2;
226  expected.node_count = 1;
227  expected.node_counts.flat = 1;
228  expected.node_counts.flat_64 = 1;
229 
230  EXPECT_THAT(SampleCord(flat), EqStatistics(expected));
231 }
232 
233 TEST(CordzInfoStatisticsTest, External) {
234  RefHelper ref;
235  auto* external = ref.NeedsUnref(External());
236 
237  CordzStatistics expected;
238  expected.size = external->length;
239  expected.estimated_memory_usage = SizeOf(external);
240  expected.estimated_fair_share_memory_usage = SizeOf(external);
241  expected.node_count = 1;
242  expected.node_counts.external = 1;
243 
244  EXPECT_THAT(SampleCord(external), EqStatistics(expected));
245 }
246 
247 TEST(CordzInfoStatisticsTest, SharedExternal) {
248  RefHelper ref;
249  auto* external = ref.Ref(ref.NeedsUnref(External()));
250 
251  CordzStatistics expected;
252  expected.size = external->length;
253  expected.estimated_memory_usage = SizeOf(external);
254  expected.estimated_fair_share_memory_usage = SizeOf(external) / 2;
255  expected.node_count = 1;
256  expected.node_counts.external = 1;
257 
258  EXPECT_THAT(SampleCord(external), EqStatistics(expected));
259 }
260 
261 TEST(CordzInfoStatisticsTest, Substring) {
262  RefHelper ref;
263  auto* flat = Flat(1024);
264  auto* substring = ref.NeedsUnref(Substring(flat));
265 
266  CordzStatistics expected;
267  expected.size = substring->length;
268  expected.estimated_memory_usage = SizeOf(substring) + SizeOf(flat);
269  expected.estimated_fair_share_memory_usage = expected.estimated_memory_usage;
270  expected.node_count = 2;
271  expected.node_counts.flat = 1;
272  expected.node_counts.flat_1k = 1;
273  expected.node_counts.substring = 1;
274 
275  EXPECT_THAT(SampleCord(substring), EqStatistics(expected));
276 }
277 
278 TEST(CordzInfoStatisticsTest, SharedSubstring) {
279  RefHelper ref;
280  auto* flat = ref.Ref(Flat(511), 2);
281  auto* substring = ref.Ref(ref.NeedsUnref(Substring(flat)));
282 
283  CordzStatistics expected;
284  expected.size = substring->length;
285  expected.estimated_memory_usage = SizeOf(flat) + SizeOf(substring);
286  expected.estimated_fair_share_memory_usage =
287  SizeOf(substring) / 2 + SizeOf(flat) / 6;
288  expected.node_count = 2;
289  expected.node_counts.flat = 1;
290  expected.node_counts.flat_512 = 1;
291  expected.node_counts.substring = 1;
292 
293  EXPECT_THAT(SampleCord(substring), EqStatistics(expected));
294 }
295 
296 
297 TEST(CordzInfoStatisticsTest, Ring) {
298  RefHelper ref;
299  auto* flat1 = Flat(240);
300  auto* flat2 = Flat(2000);
301  auto* flat3 = Flat(70);
302  auto* external = External(3000);
303  CordRepRing* ring = CordRepRing::Create(flat1);
304  ring = CordRepRing::Append(ring, flat2);
305  ring = CordRepRing::Append(ring, flat3);
306  ring = ref.NeedsUnref(CordRepRing::Append(ring, external));
307 
308  CordzStatistics expected;
309  expected.size = ring->length;
310  expected.estimated_memory_usage = SizeOf(ring) + SizeOf(flat1) +
311  SizeOf(flat2) + SizeOf(flat3) +
312  SizeOf(external);
313  expected.estimated_fair_share_memory_usage = expected.estimated_memory_usage;
314  expected.node_count = 5;
315  expected.node_counts.flat = 3;
316  expected.node_counts.flat_128 = 1;
317  expected.node_counts.flat_256 = 1;
318  expected.node_counts.external = 1;
319  expected.node_counts.ring = 1;
320 
321  EXPECT_THAT(SampleCord(ring), EqStatistics(expected));
322 }
323 
324 TEST(CordzInfoStatisticsTest, SharedSubstringRing) {
325  RefHelper ref;
326  auto* flat1 = ref.Ref(Flat(240));
327  auto* flat2 = Flat(200);
328  auto* flat3 = Flat(70);
329  auto* external = ref.Ref(External(3000), 5);
330  CordRepRing* ring = CordRepRing::Create(flat1);
331  ring = CordRepRing::Append(ring, flat2);
332  ring = CordRepRing::Append(ring, flat3);
333  ring = ref.Ref(CordRepRing::Append(ring, external), 4);
334  auto* substring = ref.Ref(ref.NeedsUnref(Substring(ring)));
335 
336 
337  CordzStatistics expected;
338  expected.size = substring->length;
339  expected.estimated_memory_usage = SizeOf(ring) + SizeOf(flat1) +
340  SizeOf(flat2) + SizeOf(flat3) +
341  SizeOf(external) + SizeOf(substring);
342  expected.estimated_fair_share_memory_usage = FairShare(substring);
343  expected.node_count = 6;
344  expected.node_counts.flat = 3;
345  expected.node_counts.flat_128 = 1;
346  expected.node_counts.flat_256 = 2;
347  expected.node_counts.external = 1;
348  expected.node_counts.ring = 1;
349  expected.node_counts.substring = 1;
350 
351  EXPECT_THAT(SampleCord(substring), EqStatistics(expected));
352 }
353 
354 TEST(CordzInfoStatisticsTest, BtreeLeaf) {
356  RefHelper ref;
357  auto* flat1 = Flat(2000);
358  auto* flat2 = Flat(200);
359  auto* substr = Substring(flat2);
360  auto* external = External(3000);
361 
362  CordRepBtree* tree = CordRepBtree::Create(flat1);
363  tree = CordRepBtree::Append(tree, substr);
364  tree = CordRepBtree::Append(tree, external);
365  size_t flat3_count = CordRepBtree::kMaxCapacity - 3;
366  size_t flat3_size = 0;
367  for (size_t i = 0; i < flat3_count; ++i) {
368  auto* flat3 = Flat(70);
369  flat3_size += SizeOf(flat3);
370  tree = CordRepBtree::Append(tree, flat3);
371  }
372  ref.NeedsUnref(tree);
373 
374  CordzStatistics expected;
375  expected.size = tree->length;
376  expected.estimated_memory_usage = SizeOf(tree) + SizeOf(flat1) +
377  SizeOf(flat2) + SizeOf(substr) +
378  flat3_size + SizeOf(external);
379  expected.estimated_fair_share_memory_usage = expected.estimated_memory_usage;
380  expected.node_count = 1 + 3 + 1 + flat3_count;
381  expected.node_counts.flat = 2 + flat3_count;
382  expected.node_counts.flat_128 = flat3_count;
383  expected.node_counts.flat_256 = 1;
384  expected.node_counts.external = 1;
385  expected.node_counts.substring = 1;
386  expected.node_counts.btree = 1;
387 
388  EXPECT_THAT(SampleCord(tree), EqStatistics(expected));
389 }
390 
391 TEST(CordzInfoStatisticsTest, BtreeNodeShared) {
392  RefHelper ref;
393  static constexpr int leaf_count = 3;
394  const size_t flat3_count = CordRepBtree::kMaxCapacity - 3;
395  ASSERT_THAT(flat3_count, Ge(0));
396 
397  CordRepBtree* tree = nullptr;
398  size_t mem_size = 0;
399  for (int i = 0; i < leaf_count; ++i) {
400  auto* flat1 = ref.Ref(Flat(2000), 9);
401  mem_size += SizeOf(flat1);
402  if (i == 0) {
403  tree = CordRepBtree::Create(flat1);
404  } else {
405  tree = CordRepBtree::Append(tree, flat1);
406  }
407 
408  auto* flat2 = Flat(200);
409  auto* substr = Substring(flat2);
410  mem_size += SizeOf(flat2) + SizeOf(substr);
411  tree = CordRepBtree::Append(tree, substr);
412 
413  auto* external = External(30);
414  mem_size += SizeOf(external);
415  tree = CordRepBtree::Append(tree, external);
416 
417  for (size_t i = 0; i < flat3_count; ++i) {
418  auto* flat3 = Flat(70);
419  mem_size += SizeOf(flat3);
420  tree = CordRepBtree::Append(tree, flat3);
421  }
422 
423  if (i == 0) {
424  mem_size += SizeOf(tree);
425  } else {
426  mem_size += SizeOf(tree->Edges().back()->btree());
427  }
428  }
429  ref.NeedsUnref(tree);
430 
431  // Ref count: 2 for top (add 1), 5 for leaf 0 (add 4).
432  ref.Ref(tree, 1);
433  ref.Ref(tree->Edges().front(), 4);
434 
435  CordzStatistics expected;
436  expected.size = tree->length;
437  expected.estimated_memory_usage = SizeOf(tree) + mem_size;
438  expected.estimated_fair_share_memory_usage = FairShare(tree);
439 
440  expected.node_count = 1 + leaf_count * (1 + 3 + 1 + flat3_count);
441  expected.node_counts.flat = leaf_count * (2 + flat3_count);
442  expected.node_counts.flat_128 = leaf_count * flat3_count;
443  expected.node_counts.flat_256 = leaf_count;
444  expected.node_counts.external = leaf_count;
445  expected.node_counts.substring = leaf_count;
446  expected.node_counts.btree = 1 + leaf_count;
447 
448  EXPECT_THAT(SampleCord(tree), EqStatistics(expected));
449 }
450 
451 TEST(CordzInfoStatisticsTest, Crc) {
452  RefHelper ref;
453  auto* left = Flat(1000);
454  auto* crc = ref.NeedsUnref(CordRepCrc::New(left, 12345));
455 
456  CordzStatistics expected;
457  expected.size = left->length;
458  expected.estimated_memory_usage = SizeOf(crc) + SizeOf(left);
459  expected.estimated_fair_share_memory_usage = expected.estimated_memory_usage;
460  expected.node_count = 2;
461  expected.node_counts.flat = 1;
462  expected.node_counts.flat_1k = 1;
463  expected.node_counts.crc = 1;
464 
465  EXPECT_THAT(SampleCord(crc), EqStatistics(expected));
466 }
467 
468 TEST(CordzInfoStatisticsTest, ThreadSafety) {
469  Notification stop;
470  static constexpr int kNumThreads = 8;
471  int64_t sampled_node_count = 0;
472 
473  {
475 
476  // Run analyzer thread emulating a CordzHandler collection.
477  pool.Schedule([&]() {
478  while (!stop.HasBeenNotified()) {
479  // Run every 10us (about 100K total collections).
480  absl::SleepFor(absl::Microseconds(10));
481  CordzSampleToken token;
482  for (const CordzInfo& cord_info : token) {
483  CordzStatistics stats = cord_info.GetCordzStatistics();
484  sampled_node_count += stats.node_count;
485  }
486  }
487  });
488 
489  // Run 'application threads'
490  for (int i = 0; i < kNumThreads; ++i) {
491  pool.Schedule([&]() {
492  // Track 0 - 2 cordz infos at a time, providing permutations of 0, 1
493  // and 2 CordzHandle and CordzInfo queues being active, with plenty of
494  // 'empty to non empty' transitions.
495  InlineData cords[2];
496  std::minstd_rand gen;
497  std::uniform_int_distribution<int> coin_toss(0, 1);
498 
499  while (!stop.HasBeenNotified()) {
500  for (InlineData& cord : cords) {
501  // 50/50 flip the state of the cord
502  if (coin_toss(gen) != 0) {
503  if (cord.is_tree()) {
504  // 50/50 simulate delete (untrack) or 'edit to empty'
505  if (coin_toss(gen) != 0) {
506  CordzInfo::MaybeUntrackCord(cord.cordz_info());
507  } else {
508  CordzUpdateScope scope(cord.cordz_info(),
510  scope.SetCordRep(nullptr);
511  }
512  CordRep::Unref(cord.as_tree());
513  cord.set_inline_size(0);
514  } else {
515  // Coin toss to 25% ring, 25% btree, and 50% flat.
516  CordRep* rep = Flat(256);
517  if (coin_toss(gen) != 0) {
518  if (coin_toss(gen) != 0) {
520  } else {
522  }
523  }
524  cord.make_tree(rep);
525 
526  // 50/50 sample
527  if (coin_toss(gen) != 0) {
529  }
530  }
531  }
532  }
533  }
534  for (InlineData& cord : cords) {
535  if (cord.is_tree()) {
536  CordzInfo::MaybeUntrackCord(cord.cordz_info());
537  CordRep::Unref(cord.as_tree());
538  }
539  }
540  });
541  }
542 
543  // Run for 1 second to give memory and thread safety analyzers plenty of
544  // time to detect any mishaps or undefined behaviors.
546  stop.Notify();
547  }
548 
549  std::cout << "Sampled " << sampled_node_count << " nodes\n";
550 }
551 
552 } // namespace
553 } // namespace cord_internal
555 } // namespace absl
STATS_MATCHER_EXPECT_EQ
#define STATS_MATCHER_EXPECT_EQ(member)
absl::cord_internal::kMinFlatSize
static constexpr size_t kMinFlatSize
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:43
absl::cord_internal::EXTERNAL
@ EXTERNAL
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:183
absl::cord_internal::AllocatedSizeToTag
uint8_t AllocatedSizeToTag(size_t size)
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:92
absl::cord_internal::CordRepBtree::kMaxCapacity
static constexpr size_t kMaxCapacity
Definition: cord_rep_btree.h:81
absl::synchronization_internal::ThreadPool
Definition: third_party/abseil-cpp/absl/synchronization/internal/thread_pool.h:33
absl::cord_internal::CordRepCrc::New
static CordRepCrc * New(CordRep *child, uint32_t crc)
Definition: cord_rep_crc.cc:27
absl::cord_internal::CordRep::Unref
static void Unref(CordRep *rep)
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:642
EXPECT_THAT
#define EXPECT_THAT(value, matcher)
absl::cord_internal::CordRepFlat::New
static CordRepFlat * New(size_t len)
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:128
absl::cord_internal::CordRep::external
CordRepExternal * external()
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:624
absl::cord_internal::CordzUpdateTracker::kUnknown
@ kUnknown
Definition: abseil-cpp/absl/strings/internal/cordz_update_tracker.h:41
absl::cord_internal::CordRepRing::index_type
uint32_t index_type
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.h:81
absl::cord_internal::RoundUpForTag
size_t RoundUpForTag(size_t size)
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:84
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
absl::cord_internal::CordRepRing::ForEach
void ForEach(index_type head, index_type tail, F &&f) const
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.h:333
absl::TEST
TEST(NotificationTest, SanityTest)
Definition: abseil-cpp/absl/synchronization/notification_test.cc:126
absl::FormatConversionChar::s
@ s
testing::Ge
internal::GeMatcher< Rhs > Ge(Rhs x)
Definition: cares/cares/test/gmock-1.8.0/gmock/gmock.h:8585
absl::SleepFor
void SleepFor(absl::Duration duration)
Definition: abseil-cpp/absl/time/clock.h:70
ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_END
Definition: third_party/abseil-cpp/absl/base/config.h:171
T
#define T(upbtypeconst, upbtype, ctype, default_value)
absl::cord_internal::CordzStatistics
Definition: abseil-cpp/absl/strings/internal/cordz_statistics.h:28
absl::cord_internal::CordRep::tag
uint8_t tag
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:232
absl::cord_internal::CordRep::ring
CordRepRing * ring()
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.h:572
refs
std::vector< CordRep * > refs
Definition: cordz_info_statistics_test.cc:81
ABSL_NAMESPACE_BEGIN
#define ABSL_NAMESPACE_BEGIN
Definition: third_party/abseil-cpp/absl/base/config.h:170
absl::MATCHER_P
MATCHER_P(HasValidCordzInfoOf, method, "CordzInfo matches cord")
Definition: abseil-cpp/absl/strings/cordz_test_helpers.h:56
absl::cord_internal::RefcountAndFlags::Get
int32_t Get() const
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:132
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
ASSERT_THAT
#define ASSERT_THAT(value, matcher)
absl::cord_internal::CordzInfo::MaybeUntrackCord
static void MaybeUntrackCord(CordzInfo *info)
Definition: abseil-cpp/absl/strings/internal/cordz_info.h:269
absl::cord_internal::CordRep::refcount
RefcountAndFlags refcount
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:229
absl::cord_internal::FLAT
@ FLAT
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:194
absl::cord_internal::kFlatOverhead
static constexpr size_t kFlatOverhead
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:42
gen_stats_data.stats
list stats
Definition: gen_stats_data.py:58
absl::cord_internal::PrintTo
void PrintTo(const CordzStatistics &stats, std::ostream *s)
Definition: cordz_info_statistics_test.cc:41
cord_rep_btree.h
ref
unsigned ref
Definition: cxa_demangle.cpp:4909
absl::cord_internal::CordRepRing::entry_child
CordRep *const & entry_child(index_type index) const
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.h:142
absl::cord_internal::CordRepBtree::Create
static CordRepBtree * Create(CordRep *rep)
Definition: cord_rep_btree.h:831
gen
OPENSSL_EXPORT GENERAL_NAME * gen
Definition: x509v3.h:495
absl::cord_internal::CordRepBtree::Append
static CordRepBtree * Append(CordRepBtree *tree, CordRep *rep)
Definition: cord_rep_btree.h:892
absl::cord_internal::RING
@ RING
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:182
absl::cord_internal::CordRep::length
size_t length
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:228
absl::Seconds
constexpr Duration Seconds(T n)
Definition: third_party/abseil-cpp/absl/time/time.h:419
absl::cord_internal::NewExternalRep
CordRep * NewExternalRep(absl::string_view data, Releaser &&releaser)
Definition: abseil-cpp/absl/strings/cord.h:1067
absl::cord_internal::BTREE
@ BTREE
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:181
absl::cord_internal::CordRep::btree
CordRepBtree * btree()
Definition: cord_rep_btree.h:589
kNumThreads
const int kNumThreads
Definition: thread_stress_test.cc:46
absl::cord_internal::CordRepRing::Create
static CordRepRing * Create(CordRep *child, size_t extra=0)
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.cc:360
absl::cord_internal::CordRepRing::AllocSize
static constexpr size_t AllocSize(size_t capacity)
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.h:488
absl::cord_internal::CordRepRing::Append
static CordRepRing * Append(CordRepRing *rep, CordRep *child)
Definition: abseil-cpp/absl/strings/internal/cord_rep_ring.cc:460
absl::cord_internal::SUBSTRING
@ SUBSTRING
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:179
rep
const CordRep * rep
Definition: cord_analysis.cc:53
ok
bool ok
Definition: async_end2end_test.cc:197
absl::cord_internal::CordRepBtree::Edges
absl::Span< CordRep *const > Edges() const
Definition: cord_rep_btree.h:616
absl::cord_internal::CordRep::Ref
static CordRep * Ref(CordRep *rep)
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:634
absl::cord_internal::CordRepSubstring::child
CordRep * child
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:282
pool
InternalDescriptorPool * pool
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:807
stop
static const char stop[]
Definition: benchmark-async-pummel.c:35
absl
Definition: abseil-cpp/absl/algorithm/algorithm.h:31
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
length
std::size_t length
Definition: abseil-cpp/absl/time/internal/test_util.cc:57
testing::Ref
internal::RefMatcher< T & > Ref(T &x)
Definition: cares/cares/test/gmock-1.8.0/gmock/gmock.h:8628
children
std::map< std::string, Node * > children
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc:257
absl::cord_internal::CordzInfo::TrackCord
static void TrackCord(InlineData &cord, MethodIdentifier method)
Definition: abseil-cpp/absl/strings/internal/cordz_info.cc:254
absl::cord_internal::CordRep::substring
CordRepSubstring * substring()
Definition: abseil-cpp/absl/strings/internal/cord_internal.h:614
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
cord_rep_crc.h
absl::cord_internal::CordRep::flat
CordRepFlat * flat()
Definition: abseil-cpp/absl/strings/internal/cord_rep_flat.h:173


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:04