History

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.

Pierre Tardy committed 16 years ago

Commit c0251481 parent 75d9ef12 files · +35 −18Browse files

Showing the changes to tools/perf/scripts/python (1 of 2 files). Show all

Unified · Split

tools/perf/scripts/python/check-perf-trace.py+1−2
@@ -51,8 +51,7 @@ def kmem__kmalloc(event_name, context, common_cpu, · 50 unmodified lines
51 51
52 flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)),52 flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)),
53 53
54def trace_unhandled(event_name, context, common_cpu, common_secs, common_nsecs,54def trace_unhandled(event_name, context, event_fields_dict):
55 common_pid, common_comm):
56 try:55 try:
57 unhandled[event_name] += 156 unhandled[event_name] += 1
58 except TypeError:57 except TypeError: