fixed 'bad record' issue in hip events
Change-Id: I601e508cf74ca5d9268dab3362085dbc512d390d
[ROCm/rocprofiler commit: 5cfc13a46c]
Dieser Commit ist enthalten in:
committet von
Evgeny Shcherbakov
Ursprung
212aefac7d
Commit
3eccfa97e8
@@ -294,6 +294,7 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep
|
||||
ptrn_ac = re.compile(r'hsa_amd_memory_async_copy')
|
||||
ptrn1_kernel = re.compile(r'^.*kernel\(');
|
||||
ptrn2_kernel = re.compile(r'\)\) .*$');
|
||||
ptrn_fixformat = re.compile(r'(\d+:\d+ \d+:\d+) (\w+)\s*(\(.*\))$');
|
||||
|
||||
if not os.path.isfile(file_name): return 0
|
||||
|
||||
@@ -315,6 +316,10 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep
|
||||
with open(file_name, mode='r') as fd:
|
||||
for line in fd.readlines():
|
||||
record = line[:-1]
|
||||
mfixformat = ptrn_fixformat.match(record)
|
||||
if mfixformat: #replace '=' in args with parentheses
|
||||
reformated_str = mfixformat.group(3).replace('=','(').replace(',',')')+')'
|
||||
record = mfixformat.group(1) + ' ' + mfixformat.group(2) + ' ' + reformated_str
|
||||
m = ptrn_val.match(record)
|
||||
if m:
|
||||
rec_vals = []
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren