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
Цей коміт міститься в:
Ammar ELWazir
2022-06-13 10:30:18 -05:00
зафіксовано Ammar Elwazir
джерело 22f2e593c2
коміт 93a79eb99a
+1 -1
Переглянути файл
@@ -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]