From c19c76dc2bddf7f10577c6214f867d891c1c4112 Mon Sep 17 00:00:00 2001 From: Jiakun Yan Date: Sun, 30 Jun 2024 23:53:50 -0700 Subject: [PATCH] fix(lct/pcounter): exit recording thread if not needed --- lct/pcounter/pcounter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lct/pcounter/pcounter.cpp b/lct/pcounter/pcounter.cpp index 3001a5b7..c754d205 100644 --- a/lct/pcounter/pcounter.cpp +++ b/lct/pcounter/pcounter.cpp @@ -475,6 +475,8 @@ void record_thread_fn(ctx_t* ctx, uint64_t record_interval) else if (ctx->dump_record_on_the_fly) { ctx->record(); ctx->dump(ctx->dump_ofile); + } else { + break; } usleep(record_interval); }