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


[ROCm/rocprofiler commit: fd4767d954]
这个提交包含在:
Ammar ELWazir 编写, Ammar Elwazir 于 2022-03-24 10:22:52 -04:00 提交
1 父节点 bd56d8eb67
当前提交 314abc4cca
1 个文件已更改
+8 -5
+8 -5
查看文件
@@ -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
#############################################################