From fd4767d954c4e8b9f2f896e4aa3ea2639bfe2f05 Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Thu, 24 Mar 2022 06:07:35 +0000 Subject: [PATCH] SWDEV-329261: Fix for Post-Processing HSA Memcopy Async Activities The Post-Processing script was depending HSA API call for async mem copies to correlate it with the HSA Async Memcpy Activity, now if user decided to include input file with filtering HSA Api calls without adding HSA Memcpy, then all the correlation data will be dropped and the Async activity will be reported with the information given from the HSA async activity result file Change-Id: I5123a5acab9b35a4c25793e7953fdfb74929c999 --- bin/tblextr.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index cc8ed1ae78..519a5e73cb 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -592,6 +592,8 @@ def fill_copy_db(table_name, db, indir): # querying tid value if (corr_id, proc_id) in hsa_patch_data: thread_id = hsa_patch_data[(corr_id, proc_id)] + else: + thread_id = -1 # completing record rec_vals.append(proc_id) # tid @@ -613,11 +615,12 @@ def fill_copy_db(table_name, db, indir): to_ns = int(rec_vals[0]) to_us = int((to_ns - START_NS) / 1000) - #if not proc_id in dep_dict: dep_dict[proc_id] = {} - dep_proc = dep_dict[proc_id] - #if not pid in dep_proc: dep_proc[pid] = { 'pid': HSA_PID, 'from': [], 'to': {}, 'id': [] } - dep_str = dep_proc[sect_id] - dep_str['to'][corr_id] = to_us + if thread_id != -1: + #if not proc_id in dep_dict: dep_dict[proc_id] = {} + dep_proc = dep_dict[proc_id] + #if not pid in dep_proc: dep_proc[pid] = { 'pid': HSA_PID, 'from': [], 'to': {}, 'id': [] } + dep_str = dep_proc[sect_id] + dep_str['to'][corr_id] = to_us return 1 #############################################################