From 3eccfa97e8c8e0d5d6e897266a12a0f7468d5bcd Mon Sep 17 00:00:00 2001 From: Rachida Kebichi Date: Tue, 5 May 2020 22:00:29 -0400 Subject: [PATCH] fixed 'bad record' issue in hip events Change-Id: I601e508cf74ca5d9268dab3362085dbc512d390d [ROCm/rocprofiler commit: 5cfc13a46ceeeed188123caa6274ce377826c0f7] --- projects/rocprofiler/bin/tblextr.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/rocprofiler/bin/tblextr.py b/projects/rocprofiler/bin/tblextr.py index b5672c54e6..fd4aec5609 100755 --- a/projects/rocprofiler/bin/tblextr.py +++ b/projects/rocprofiler/bin/tblextr.py @@ -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 = []