diff --git a/runtime/vm/heap/sampler.cc b/runtime/vm/heap/sampler.cc index 71b7794ef21..b4dbf4c890b 100644 --- a/runtime/vm/heap/sampler.cc +++ b/runtime/vm/heap/sampler.cc @@ -65,7 +65,7 @@ void HeapProfileSampler::Initialize() { void HeapProfileSampler::EnableLocked() { if (enabled_) { SetNextSamplingIntervalLocked(GetNextSamplingIntervalLocked()); - } else if (!enabled_) { + } else { // Reset the TLAB boundaries to the true end to avoid unnecessary slow // path invocations when sampling is disabled. thread_->set_end(thread_->true_end());