Fix condition to check whether allocation tracing is enabled
This commit is contained in:
parent
7769218303
commit
96187618a0
|
@ -184,7 +184,7 @@ ArenaBlock* ArenaBlock::create(int dataSize, Reference<ArenaBlock>& next) {
|
|||
b->bigSize = reqSize;
|
||||
b->bigUsed = sizeof(ArenaBlock);
|
||||
|
||||
if (FLOW_KNOBS && g_allocation_tracing_disabled > 0 &&
|
||||
if (FLOW_KNOBS && g_allocation_tracing_disabled == 0 &&
|
||||
nondeterministicRandom()->random01() < (reqSize / FLOW_KNOBS->HUGE_ARENA_LOGGING_BYTES)) {
|
||||
++g_allocation_tracing_disabled;
|
||||
hugeArenaSample(reqSize);
|
||||
|
|
|
@ -445,7 +445,7 @@ void FastAllocator<Size>::getMagazine() {
|
|||
// FIXME: We should be able to allocate larger magazine sizes here if we
|
||||
// detect that the underlying system supports hugepages. Using hugepages
|
||||
// with smaller-than-2MiB magazine sizes strands memory. See issue #909.
|
||||
if(FLOW_KNOBS && g_allocation_tracing_disabled > 0 && nondeterministicRandom()->random01() < (magazine_size * Size)/FLOW_KNOBS->FAST_ALLOC_LOGGING_BYTES) {
|
||||
if(FLOW_KNOBS && g_allocation_tracing_disabled == 0 && nondeterministicRandom()->random01() < (magazine_size * Size)/FLOW_KNOBS->FAST_ALLOC_LOGGING_BYTES) {
|
||||
++g_allocation_tracing_disabled;
|
||||
TraceEvent("GetMagazineSample").detail("Size", Size).backtrace();
|
||||
--g_allocation_tracing_disabled;
|
||||
|
|
Loading…
Reference in New Issue