diff options
author | Abseil Team <absl-team@google.com> | 2021-10-27 13:22:18 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2021-10-28 00:09:21 -0400 |
commit | cc413f8b674d61e3aa948386432e526e051afca0 (patch) | |
tree | 87292c6510661a0443c346c7b8be360c824647a4 /absl/container/internal/hashtablez_sampler.h | |
parent | f70eadadd7767c3a97774b63c4c23981fa89af9f (diff) | |
download | abseil-cc413f8b674d61e3aa948386432e526e051afca0.tar.gz abseil-cc413f8b674d61e3aa948386432e526e051afca0.tar.bz2 abseil-cc413f8b674d61e3aa948386432e526e051afca0.zip |
Export of internal Abseil changes
--
05a099a580753f8e96cee38572e94dcdc079361b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405966217
--
c6b81e9ebc183d8389f14ecd091c8bad08cfe0aa by Abseil Team <absl-team@google.com>:
Add `inline_element_size` to hashtablez (so that we can compute the weighted load factors properly e.g., in b/187896534).
PiperOrigin-RevId: 405917711
--
3e3673de4e54e4142c54b09e1644dfa3de4bb296 by Abseil Team <absl-team@google.com>:
align indent of code comment in mutex.h
PiperOrigin-RevId: 405871997
--
2248301a5b14f8d2be5b2e9088f3528a353ea491 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 405639236
--
bc7d3c56fdad3dde4b89324af142529f2afe5f1b by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 405508045
--
66472387276ef02505d99195747be862768bb35b by Laramie Leavitt <lar@google.com>:
Also use uint8_t golden values in randen_test.cc
This makes randen_test, randen_slow_test, and randen_hwaes_test essentially
identical, as is the intent.
PiperOrigin-RevId: 405484423
GitOrigin-RevId: 05a099a580753f8e96cee38572e94dcdc079361b
Change-Id: I3dd5b0cfdb98d6e1ab02266194ba67d15428c2f8
Diffstat (limited to 'absl/container/internal/hashtablez_sampler.h')
-rw-r--r-- | absl/container/internal/hashtablez_sampler.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/container/internal/hashtablez_sampler.h b/absl/container/internal/hashtablez_sampler.h index 812118e3..91fcdb34 100644 --- a/absl/container/internal/hashtablez_sampler.h +++ b/absl/container/internal/hashtablez_sampler.h @@ -91,6 +91,7 @@ struct HashtablezInfo : public profiling_internal::Sample<HashtablezInfo> { absl::Time create_time; int32_t depth; void* stack[kMaxStackDepth]; + size_t inline_element_size; }; inline void RecordRehashSlow(HashtablezInfo* info, size_t total_probe_length) { @@ -143,7 +144,7 @@ inline void RecordEraseSlow(HashtablezInfo* info) { std::memory_order_relaxed); } -HashtablezInfo* SampleSlow(int64_t* next_sample); +HashtablezInfo* SampleSlow(int64_t* next_sample, size_t inline_element_size); void UnsampleSlow(HashtablezInfo* info); #if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) @@ -238,12 +239,14 @@ extern ABSL_PER_THREAD_TLS_KEYWORD int64_t global_next_sample; // Returns an RAII sampling handle that manages registration and unregistation // with the global sampler. -inline HashtablezInfoHandle Sample() { +inline HashtablezInfoHandle Sample( + size_t inline_element_size ABSL_ATTRIBUTE_UNUSED) { #if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) if (ABSL_PREDICT_TRUE(--global_next_sample > 0)) { return HashtablezInfoHandle(nullptr); } - return HashtablezInfoHandle(SampleSlow(&global_next_sample)); + return HashtablezInfoHandle( + SampleSlow(&global_next_sample, inline_element_size)); #else return HashtablezInfoHandle(nullptr); #endif // !ABSL_PER_THREAD_TLS |