39 #ifndef ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_ 40 #define ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_ 54 namespace container_internal {
100 #if SWISSTABLE_HAVE_SSE2 101 total_probe_length /= 16;
103 total_probe_length /= 8;
106 info->
num_erases.store(0, std::memory_order_relaxed);
111 info->
size.store(size, std::memory_order_relaxed);
112 info->
capacity.store(capacity, std::memory_order_relaxed);
120 size_t distance_from_desired);
123 info->
size.fetch_sub(1, std::memory_order_relaxed);
124 info->
num_erases.fetch_add(1, std::memory_order_relaxed);
182 #if ABSL_PER_THREAD_TLS == 1 184 #endif // ABSL_PER_THREAD_TLS 189 #if ABSL_PER_THREAD_TLS == 0 191 static int64_t global_next_sample = 0;
193 #endif // !ABSL_HAVE_THREAD_LOCAL 263 std::atomic<HashtablezInfo*>
all_;
288 #endif // ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_
#define EXCLUSIVE_LOCKS_REQUIRED(...)
void SetHashtablezSampleParameter(int32_t rate)
HashtablezInfo * SampleSlow(int64_t *next_sample)
void * stack[kMaxStackDepth]
void RecordInsertSlow(HashtablezInfo *info, size_t hash, size_t distance_from_desired)
HashtablezInfoHandle(HashtablezInfoHandle &&o) noexcept
HashtablezInfo & operator=(const HashtablezInfo &)=delete
void SetHashtablezEnabled(bool enabled)
HashtablezInfo graveyard_
void RecordStorageChangedSlow(HashtablezInfo *info, size_t size, size_t capacity)
#define ABSL_PREDICT_FALSE(x)
void UnsampleSlow(HashtablezInfo *info)
void SetHashtablezMaxSamples(int32_t max)
void PrepareForSampling() EXCLUSIVE_LOCKS_REQUIRED(init_mu)
HashtablezInfoHandle & operator=(HashtablezInfoHandle &&o) noexcept
std::atomic< size_t > max_probe_length
void RecordEraseSlow(HashtablezInfo *info)
const bool kAbslContainerInternalSampleEverything
std::atomic< size_t > total_probe_length
HashtablezInfoHandle Sample()
void RecordRehash(size_t total_probe_length)
std::atomic< size_t > hashes_bitwise_and
std::atomic< size_t > hashes_bitwise_or
void RecordRehashSlow(HashtablezInfo *info, size_t total_probe_length)
void(*)(const HashtablezInfo &) DisposeCallback
HashtablezInfoHandle(HashtablezInfo *info)
void RecordInsert(size_t hash, size_t distance_from_desired)
HashtablezInfo *dead GUARDED_BY(init_mu)
hash_default_hash< typename T::first_type > hash
static constexpr int kMaxStackDepth
void swap(absl::InlinedVector< T, N, A > &a, absl::InlinedVector< T, N, A > &b) noexcept(noexcept(a.swap(b)))
std::atomic< size_t > dropped_samples_
std::atomic< DisposeCallback > dispose_
std::atomic< size_t > num_erases
std::atomic< HashtablezInfo * > all_
std::atomic< size_t > capacity
#define ABSL_PREDICT_TRUE(x)
void RecordStorageChanged(size_t size, size_t capacity)
friend void swap(HashtablezInfoHandle &lhs, HashtablezInfoHandle &rhs)
std::atomic< size_t > size_estimate_
#define ABSL_PER_THREAD_TLS_KEYWORD
T exchange(T &obj, U &&new_value)
std::atomic< size_t > size