aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-04-14 09:24:02 -0700
committerSeongJae Park <sj@kernel.org>2024-04-14 09:24:02 -0700
commitefccfa16dc41e15a46f38dc6a7e66fe5fad76a0f (patch)
treeed66414c144cdbfb2f4b07e4caaebb0b6a18c66b
parent4a35f7c5abb1970065bab7fa411eb88d1fa3adb6 (diff)
downloaddamo-efccfa16dc41e15a46f38dc6a7e66fe5fad76a0f.tar.gz
damo_record: Use start_recording_v2()
Signed-off-by: SeongJae Park <sj@kernel.org>
-rw-r--r--_damo_records.py2
-rw-r--r--damo_record.py18
2 files changed, 13 insertions, 7 deletions
diff --git a/_damo_records.py b/_damo_records.py
index b47a5549..227102b4 100644
--- a/_damo_records.py
+++ b/_damo_records.py
@@ -708,7 +708,7 @@ def start_recording(tracepoint, file_path, file_format, file_permission,
def start_recording_v2(handle):
if handle.tracepoint is not None:
- hnalde.perf_pipe = subprocess.Popen(
+ handle.perf_pipe = subprocess.Popen(
[PERF, 'record', '-a', '-e', handle.tracepoint,
'-o', handle.file_path])
if handle.do_profile:
diff --git a/damo_record.py b/damo_record.py
index a1894178..d2840979 100644
--- a/damo_record.py
+++ b/damo_record.py
@@ -109,15 +109,21 @@ def main(args):
else:
tracepoint = _damo_records.perf_event_damos_before_apply
- data_for_cleanup.record_handle = _damo_records.start_recording(
- tracepoint, args.out, args.output_type, args.output_permission,
- monitoring_intervals,
- profile=args.profile is True, profile_target_pid=None,
+ record_handle = _damo_records.RecordingHandle(
+ # for access pattern monitoring
+ tracepoint=tracepoint, file_path=args.out,
+ file_format=args.output_type,
+ file_permission=args.output_permission,
+ monitoring_intervals=monitoring_intervals, perf_pipe=None,
+ # for perf profile
+ do_profile=args.profile is True, perf_profile_pipe=None,
+ # for childs recording and memory footprint
kdamonds=kdamonds, poll_add_child_tasks=args.include_child_tasks,
poll_add_mem_footprint=args.footprint)
- print('Press Ctrl+C to stop')
+ data_for_cleanup.record_handle = record_handle
- _damo_records.wait_recording(data_for_cleanup.record_handle)
+ print('Press Ctrl+C to stop')
+ _damo_records.start_recording_v2(record_handle)
cleanup_exit(0)
def set_argparser(parser):