From 0971185695cd4ed255909b4a523753d8df3defb3 Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Fri, 9 Dec 2022 19:27:27 +0000 Subject: [PATCH] [ VM ] Remove unnecessary condition check TEST=N/A Change-Id: I4c738a9be1aee9fab636ee2cbdb796f0ed226a86 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274060 Reviewed-by: Siva Annamalai Commit-Queue: Ben Konyi --- runtime/vm/heap/sampler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());