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.
Showing the changes to tools/perf/scripts/python (1 of 2 files). Show all
Unified · Split
| @@ -51,8 +51,7 @@ def kmem__kmalloc(event_name, context, common_cpu, · 50 unmodified lines | ||
| 51 | 51 | |
| 52 | 52 | flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)), |
| 53 | 53 | |
| 54 | −def trace_unhandled(event_name, context, common_cpu, common_secs, common_nsecs, | |
| 55 | − common_pid, common_comm): | |
| 54 | +def trace_unhandled(event_name, context, event_fields_dict): | |
| 56 | 55 | try: |
| 57 | 56 | unhandled[event_name] += 1 |
| 58 | 57 | except TypeError: |