mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
ftrace: Allow to specify filter field type for ftrace events
Adding FILTER_TRACE_FN event field type for function tracepoint event, so it can be properly recognized within filtering code. Currently all fields of ftrace subsystem events share the common field type FILTER_OTHER. Since the function trace fields need special care within the filtering code we need to recognize it properly, hence adding the FILTER_TRACE_FN event type. Adding filter parameter to the FTRACE_ENTRY macro, to specify the filter field type for the event. Link: http://lkml.kernel.org/r/1329317514-8131-7-git-send-email-jolsa@redhat.com Signed-off-by: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
ced39002f5
commit
02aa3162ed
5 changed files with 83 additions and 47 deletions
|
@ -66,6 +66,8 @@ FTRACE_ENTRY_REG(function, ftrace_entry,
|
|||
|
||||
F_printk(" %lx <-- %lx", __entry->ip, __entry->parent_ip),
|
||||
|
||||
FILTER_TRACE_FN,
|
||||
|
||||
perf_ftrace_event_register
|
||||
);
|
||||
|
||||
|
@ -80,7 +82,9 @@ FTRACE_ENTRY(funcgraph_entry, ftrace_graph_ent_entry,
|
|||
__field_desc( int, graph_ent, depth )
|
||||
),
|
||||
|
||||
F_printk("--> %lx (%d)", __entry->func, __entry->depth)
|
||||
F_printk("--> %lx (%d)", __entry->func, __entry->depth),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
/* Function return entry */
|
||||
|
@ -100,7 +104,9 @@ FTRACE_ENTRY(funcgraph_exit, ftrace_graph_ret_entry,
|
|||
F_printk("<-- %lx (%d) (start: %llx end: %llx) over: %d",
|
||||
__entry->func, __entry->depth,
|
||||
__entry->calltime, __entry->rettime,
|
||||
__entry->depth)
|
||||
__entry->depth),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -129,8 +135,9 @@ FTRACE_ENTRY(context_switch, ctx_switch_entry,
|
|||
F_printk("%u:%u:%u ==> %u:%u:%u [%03u]",
|
||||
__entry->prev_pid, __entry->prev_prio, __entry->prev_state,
|
||||
__entry->next_pid, __entry->next_prio, __entry->next_state,
|
||||
__entry->next_cpu
|
||||
)
|
||||
__entry->next_cpu),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -148,8 +155,9 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry,
|
|||
F_printk("%u:%u:%u ==+ %u:%u:%u [%03u]",
|
||||
__entry->prev_pid, __entry->prev_prio, __entry->prev_state,
|
||||
__entry->next_pid, __entry->next_prio, __entry->next_state,
|
||||
__entry->next_cpu
|
||||
)
|
||||
__entry->next_cpu),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -171,7 +179,9 @@ FTRACE_ENTRY(kernel_stack, stack_entry,
|
|||
"\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n",
|
||||
__entry->caller[0], __entry->caller[1], __entry->caller[2],
|
||||
__entry->caller[3], __entry->caller[4], __entry->caller[5],
|
||||
__entry->caller[6], __entry->caller[7])
|
||||
__entry->caller[6], __entry->caller[7]),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
FTRACE_ENTRY(user_stack, userstack_entry,
|
||||
|
@ -187,7 +197,9 @@ FTRACE_ENTRY(user_stack, userstack_entry,
|
|||
"\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n",
|
||||
__entry->caller[0], __entry->caller[1], __entry->caller[2],
|
||||
__entry->caller[3], __entry->caller[4], __entry->caller[5],
|
||||
__entry->caller[6], __entry->caller[7])
|
||||
__entry->caller[6], __entry->caller[7]),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -204,7 +216,9 @@ FTRACE_ENTRY(bprint, bprint_entry,
|
|||
),
|
||||
|
||||
F_printk("%08lx fmt:%p",
|
||||
__entry->ip, __entry->fmt)
|
||||
__entry->ip, __entry->fmt),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
FTRACE_ENTRY(print, print_entry,
|
||||
|
@ -217,7 +231,9 @@ FTRACE_ENTRY(print, print_entry,
|
|||
),
|
||||
|
||||
F_printk("%08lx %s",
|
||||
__entry->ip, __entry->buf)
|
||||
__entry->ip, __entry->buf),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw,
|
||||
|
@ -236,7 +252,9 @@ FTRACE_ENTRY(mmiotrace_rw, trace_mmiotrace_rw,
|
|||
|
||||
F_printk("%lx %lx %lx %d %x %x",
|
||||
(unsigned long)__entry->phys, __entry->value, __entry->pc,
|
||||
__entry->map_id, __entry->opcode, __entry->width)
|
||||
__entry->map_id, __entry->opcode, __entry->width),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map,
|
||||
|
@ -254,7 +272,9 @@ FTRACE_ENTRY(mmiotrace_map, trace_mmiotrace_map,
|
|||
|
||||
F_printk("%lx %lx %lx %d %x",
|
||||
(unsigned long)__entry->phys, __entry->virt, __entry->len,
|
||||
__entry->map_id, __entry->opcode)
|
||||
__entry->map_id, __entry->opcode),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
|
||||
|
@ -274,6 +294,8 @@ FTRACE_ENTRY(branch, trace_branch,
|
|||
|
||||
F_printk("%u:%s:%s (%u)",
|
||||
__entry->line,
|
||||
__entry->func, __entry->file, __entry->correct)
|
||||
__entry->func, __entry->file, __entry->correct),
|
||||
|
||||
FILTER_OTHER
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue