From f69c938f52cb7790d4eec5ebbd874e61efdf5e6d Mon Sep 17 00:00:00 2001 From: Evgeny Date: Tue, 3 Mar 2020 11:15:55 -0600 Subject: [PATCH] json fix for no copies case Change-Id: Ia1fddad50e50a1b5df7d5e6b8b25a2fe9fcdb439 --- bin/tblextr.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index 60b2f8e36a..6e2cd98cc3 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -512,6 +512,9 @@ else: fill_kernel_db('A', db) any_trace_found = ext_trace_found | kfd_trace_found | hsa_trace_found | hip_trace_found + copy_trace_found = 0 + if hsa_activity_found or len(ops_filtr): copy_trace_found = 1 + if any_trace_found: db.open_json(jsonfile) @@ -547,9 +550,10 @@ else: dform.gen_table_bins(db, 'HSA', hsa_statfile, 'Name', 'DurationNs') dform.gen_api_json_trace(db, 'HSA', START_US, jsonfile) - dform.post_process_data(db, 'COPY') - dform.gen_table_bins(db, 'COPY', copy_statfile, 'Name', 'DurationNs') - dform.gen_api_json_trace(db, 'COPY', START_US, jsonfile) + if copy_trace_found: + dform.post_process_data(db, 'COPY') + dform.gen_table_bins(db, 'COPY', copy_statfile, 'Name', 'DurationNs') + dform.gen_api_json_trace(db, 'COPY', START_US, jsonfile) if hip_trace_found: dform.post_process_data(db, 'HIP')