From 3bb853c56d0ebd5d57ae485d4e2b97e51a1a2a25 Mon Sep 17 00:00:00 2001 From: Sriraksha Nagaraj Date: Thu, 13 Oct 2022 17:01:22 -0500 Subject: [PATCH] SWDEV-359118 - fix for misrepresentation for stream ids in Json file Some trace entries report the stream argument as 'stream=' and some report it as 'hStream='. Change-Id: I9e7c7af162db72ddadf6f2a3fe4f44a04bf77ed6 --- bin/tblextr.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/tblextr.py b/bin/tblextr.py index ab81add68d..839217a456 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -457,12 +457,18 @@ def fill_api_db(table_name, db, indir, api_name, api_pid, dep_pid, dep_list, dep rec_vals.append(corr_id) # extracting/converting stream id (stream_id, stream_found) = get_field(record_args, 'stream') - if stream_found == 0: - stream_id = 0 + if stream_found: + stream_id = get_stream_index(stream_id) + (rec_vals[5], found) = set_field(record_args, 'stream', stream_id) + if found == 0: fatal('set_field() failed for "stream", args: "' + record_args + '"') else: - stream_id = get_stream_index(stream_id) - (rec_vals[5], found) = set_field(record_args, 'stream', stream_id) - if found == 0: fatal('set_field() failed for "stream", args: "' + record_args + '"') + (stream_id, stream_found) = get_field(record_args, 'hStream') + if stream_found: + stream_id = get_stream_index(stream_id) + (rec_vals[5], found) = set_field(record_args, 'hStream', stream_id) + if found == 0: fatal('set_field() failed for "stream", args: "' + record_args + '"') + else : + stream_id = 0 if hip_strm_cr_event_ptrn.match(record_name): hip_streams.append(stream_id)