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 | flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)), | 52 | flag_str("kmem__kmalloc", "gfp_flags", gfp_flags)), |
| 53 | 53 | ||
| 54 | def trace_unhandled(event_name, context, common_cpu, common_secs, common_nsecs, | 54 | def trace_unhandled(event_name, context, event_fields_dict): |
| 55 | common_pid, common_comm): | ||
| 56 | try: | 55 | try: |
| 57 | unhandled[event_name] += 1 | 56 | unhandled[event_name] += 1 |
| 58 | except TypeError: | 57 | except TypeError: |