aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-04-27 11:07:23 -0700
committerSeongJae Park <sj@kernel.org>2024-04-27 11:07:23 -0700
commit2a4226de479537f52def8ed45fb74457fac1dd25 (patch)
tree4cf510e12d9617f5bfec20d05123bb0ee1520ce4
parent29160312183cfa7306b2bba519f6f756dccfe56d (diff)
downloaddamo-2a4226de479537f52def8ed45fb74457fac1dd25.tar.gz
_damo_records/start_recording(): Collapse unnecessarily split branches
Signed-off-by: SeongJae Park <sj@kernel.org>
-rw-r--r--_damo_records.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/_damo_records.py b/_damo_records.py
index c77b3955..08de2cdd 100644
--- a/_damo_records.py
+++ b/_damo_records.py
@@ -776,12 +776,7 @@ def start_recording(handle):
if handle.do_profile:
cmd = [PERF, 'record', '-o', '%s.profile' % handle.file_path]
handle.perf_profile_pipe = subprocess.Popen(cmd)
- while poll_target_pids(handle):
- if handle.mem_footprint_snapshots is not None:
- record_mem_footprint(handle.kdamonds,
- handle.mem_footprint_snapshots)
- time.sleep(1)
- while _damon.any_kdamond_running():
+ while poll_target_pids(handle) or _damon.any_kdamond_running():
if handle.mem_footprint_snapshots is not None:
record_mem_footprint(handle.kdamonds,
handle.mem_footprint_snapshots)