Skip to content

Commit

Permalink
Add ID_INDEX event decoder
Browse files Browse the repository at this point in the history
Signed-off-by: Yu-cheng Yu <[email protected]>
  • Loading branch information
yyu-intel-com committed Nov 22, 2024
1 parent 7fa5c13 commit dd2d704
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion parser/perfdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ def thread_map():
UNInt64("pid"),
String("comm", 16))))

def id_index():
return Struct("id_index",
UNInt64("nr"),
Array(lambda ctx: ctx.nr,
Struct("id_index_entry",
UNInt64("id"),
UNInt64("idx"),
UNInt64("cpu"),
UNInt64("tid"))))

def as_is():
return Embedded(Struct("data", Bytes("data", lambda ctx: ctx.size - 8)))

Expand Down Expand Up @@ -372,7 +382,7 @@ def perf_event():
"HEADER_EVENT_TYPE": as_is(),
"TRACING_DATA": as_is(),
"HEADER_BUILD_ID": as_is(),
"ID_INDEX":as_is(),
"ID_INDEX":id_index(),
"AUXTRACE_INFO": as_is(),
"AUXTRACE": as_is(),
"AUXTRACE_ERROR": as_is(),
Expand Down

0 comments on commit dd2d704

Please sign in to comment.