Rename /opt/rocm/rocprofiler.so link to proper librocprofiler64.so; Simplify --hsa-trace option just to one, no need with --stats and --timestamp on
Change-Id: I1dccfdd8843437bf9ed10ac259e84b34ef986be3
[ROCm/rocprofiler commit: 862f042c43]
이 커밋은 다음에 포함됨:
@@ -1,4 +1,5 @@
|
||||
import csv, sqlite3, re, sys
|
||||
from functools import reduce
|
||||
|
||||
# SQLite Database class
|
||||
class SQLiteDB:
|
||||
@@ -112,15 +113,18 @@ class SQLiteDB:
|
||||
with open(file_name, mode='a') as fd:
|
||||
fd.write(',{"args":{"name":"%s"},"ph":"M","pid":%s,"name":"process_name"}\n' %(label, pid));
|
||||
|
||||
def flow_json(self, base_id, from_pid, from_tid, from_us_list, to_pid, to_us_dict, start_us, file_name):
|
||||
def flow_json(self, base_id, from_pid, from_tid, from_us_list, to_pid, to_us_dict, corr_id_list, start_us, file_name):
|
||||
if not re.search(r'\.json$', file_name):
|
||||
raise Exception('wrong output file type: "' + file_name + '"' )
|
||||
with open(file_name, mode='a') as fd:
|
||||
dep_id = base_id
|
||||
for ind in range(len(from_tid)):
|
||||
if (len(corr_id_list) != 0): corr_id = corr_id_list[ind]
|
||||
else: corr_id = ind
|
||||
from_ts = from_us_list[ind] - start_us
|
||||
to_ts = to_us_dict[ind] - start_us
|
||||
fd.write(',{"ts":%d,"ph":"s","cat":"DataFlow","id":%d,"pid":%s,"tid":%d,"name":"dep"}\n' % (from_ts, dep_id, str(from_pid), from_tid[ind]))
|
||||
to_ts = to_us_dict[corr_id] - start_us
|
||||
if from_ts > to_ts: from_ts = to_ts
|
||||
fd.write(',{"ts":%d,"ph":"s","cat":"DataFlow","id":%d,"pid":%s,"tid":%s,"name":"dep"}\n' % (from_ts, dep_id, str(from_pid), from_tid[ind]))
|
||||
fd.write(',{"ts":%d,"ph":"t","cat":"DataFlow","id":%d,"pid":%s,"tid":0,"name":"dep"}\n' % (to_ts, dep_id, str(to_pid)))
|
||||
dep_id += 1
|
||||
|
||||
|
||||
새 이슈에서 참조
사용자 차단