From 76ea4f1eeab8cf4fc67889a726431a19be69d8ca Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:02:29 +0800 Subject: [PATCH] fix no auto dump --- 3party/gperftools/src/profiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3party/gperftools/src/profiler.cc b/3party/gperftools/src/profiler.cc index 491e3ea..71a3cef 100644 --- a/3party/gperftools/src/profiler.cc +++ b/3party/gperftools/src/profiler.cc @@ -169,7 +169,7 @@ CpuProfilerSwitch(int signal_number) int cur_profile_count = profile_count; std::thread([interval, cur_profile_count] { std::this_thread::sleep_for(std::chrono::seconds(interval)); - if (profile_count == cur_profile_count) { + if (profile_count == cur_profile_count + 1) { RAW_LOG(INFO, "Trigger Auto stop CPU Profiling, duration=%ds", interval); ProfilerStop(); }