From 93a79eb99a08ff50564aec0ae38b64e6d137d035 Mon Sep 17 00:00:00 2001 From: Ammar ELWazir Date: Mon, 13 Jun 2022 10:30:18 -0500 Subject: [PATCH] Google-Chrome Tracer parser attaching flow events to the wrong time slice This issue happens when we have slices that have overlapping timestamp values (i.e. start_ts + dur = start_ts of next slice) and the flow event references that shared timestamp value. The google chrome parser sorts all the events and just taking the most recent one. Rocprof is outputting flow attachment points as start+dur; the end ts of the slice that can overlap with the next slice if no gap between them. Solution proposal by Michael Steffen (Michael.Steffen@amd.com) Change-Id: Ifcde142144033c9012b01a78c95f047384f972dd --- bin/tblextr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index 27ab8af6f3..fb85fcfb87 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -557,7 +557,7 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep beg_ns = int(rec_vals[0]) end_ns = int(rec_vals[1]) dur_us = int((end_ns - beg_ns) / 1000) - from_us = int((beg_ns - START_NS) / 1000) + dur_us + from_us = int((beg_ns - START_NS) / 1000) + dur_us/2 if api_pid == HIP_PID or hsa_copy_deps == 1: if not proc_id in dep_dict: dep_dict[proc_id] = {} dep_proc = dep_dict[proc_id]