Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tcmalloc/guarded_page_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ GuardedAllocWithStatus GuardedPageAllocator::TrySample(
// proportional to pool utilization, with pool utilization of 50% or more
Comment thread
cuiweixie marked this conversation as resolved.
Outdated
// resulting in always filtering currently covered allocations.
const size_t usage_pct = (allocated_pages() * 100) / max_allocated_pages_;
if (rand_.Next() % 50 <= usage_pct) {
if (rand_.Next() % 50 < usage_pct) {
// Decay even if the current allocation is filtered, so that we keep
// sampling even if we only see the same allocations over and over.
stacktrace_filter_.Decay();
Expand Down