mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
perf scripts python: Give field dict to unhandled callback
trace_unhandled() callback does not allow to access event fields, this patch resolves the problem. It can also been used as a more pythonic and flexible way for script writters to demux event types This will for example greatly simplify pytimechart event demux. Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Tom Zanussi <tzanussi@gmail.com> Cc: Ingo Molnar <mingo@elte.hu>, Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <1275340329-2397-1-git-send-email-tardyp@gmail.com> Signed-off-by: Pierre Tardy <tardyp@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
75d9ef1707
commit
c02514850d
2 changed files with 35 additions and 18 deletions
|
@ -51,8 +51,7 @@ def kmem__kmalloc(event_name, context, common_cpu,
|
|||
|
||||
flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)),
|
||||
|
||||
def trace_unhandled(event_name, context, common_cpu, common_secs, common_nsecs,
|
||||
common_pid, common_comm):
|
||||
def trace_unhandled(event_name, context, event_fields_dict):
|
||||
try:
|
||||
unhandled[event_name] += 1
|
||||
except TypeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue