From dff73bfed620f1ccfc6b52d3fa12e6501bf4250b Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Fri, 3 May 2024 20:39:27 -0500 Subject: [PATCH] JSON can be generated from --stats now Change-Id: Ia9733c4a99f00ff67e63a6845ed28fad3f98d754 --- bin/tblextr.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index 0e05b53b1e..0123c343a1 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -1136,8 +1136,7 @@ else: if hsa_activity_found or len(ops_filtr): copy_trace_found = 1 - if any_trace_found: - db.open_json(jsonfile) + db.open_json(jsonfile) if ext_trace_found: db.label_json(EXT_PID, "Markers and Ranges", jsonfile) @@ -1150,7 +1149,7 @@ else: db.label_json(COPY_PID, "COPY", jsonfile) - if any_trace_found and max_gpu_id >= 0: + if max_gpu_id >= 0: for ind in range(0, int(max_gpu_id) + 1): db.label_json(int(ind) + int(GPU_BASE_PID), "GPU" + str(ind), jsonfile) db.label_json(int(ind) + int(GPU_BASE_PID) + 512 , "GPU Barriers" + str(ind), jsonfile) @@ -1161,7 +1160,7 @@ else: if len(var_table) != 0: dform.post_process_data(db, "KERN", csvfile) dform.gen_table_bins(db, "KERN", statfile, "KernelName", "DurationNs") - if hsa_trace_found and "BeginNs" in var_list: + if "BeginNs" in var_list: dform.gen_kernel_json_trace(db, "KERN", GPU_BASE_PID, START_NS, jsonfile) if hsa_trace_found: @@ -1217,9 +1216,8 @@ else: ) dep_id += len(from_us_list) - if any_trace_found: - db.metadata_json(jsonfile, sysinfo_file) - db.close_json(jsonfile) + db.metadata_json(jsonfile, sysinfo_file) + db.close_json(jsonfile) if mcopy_data_enabled: memory_manager.dump_data("MM", memcopy_info_file)