diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2009-03-22 04:30:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-22 13:11:22 -0400 |
commit | cf027f645e6aee4f0ca6197a6b6a57f327fdb13f (patch) | |
tree | f8a20e8707967db5d9140f9069426f410a30dd32 /kernel/trace/trace.h | |
parent | 0cf53ff62b3e9e491ff5e5f05b193fb6ce643047 (diff) |
tracing: add run-time field descriptions for event filtering
This patch makes the field descriptions defined for event tracing
available at run-time, for the event-filtering mechanism introduced
in a subsequent patch.
The common event fields are prepended with 'common_' in the format
display, allowing them to be distinguished from the other fields
that might internally have same name and can therefore be
unambiguously used in filters.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1237710639.7703.46.camel@charm-linux>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 7cfb741be200..9288dc7ad14f 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -775,16 +775,26 @@ enum { | |||
775 | TRACE_EVENT_TYPE_RAW = 2, | 775 | TRACE_EVENT_TYPE_RAW = 2, |
776 | }; | 776 | }; |
777 | 777 | ||
778 | struct ftrace_event_field { | ||
779 | struct list_head link; | ||
780 | char *name; | ||
781 | char *type; | ||
782 | int offset; | ||
783 | int size; | ||
784 | }; | ||
785 | |||
778 | struct ftrace_event_call { | 786 | struct ftrace_event_call { |
779 | char *name; | 787 | char *name; |
780 | char *system; | 788 | char *system; |
781 | struct dentry *dir; | 789 | struct dentry *dir; |
782 | int enabled; | 790 | int enabled; |
783 | int (*regfunc)(void); | 791 | int (*regfunc)(void); |
784 | void (*unregfunc)(void); | 792 | void (*unregfunc)(void); |
785 | int id; | 793 | int id; |
786 | int (*raw_init)(void); | 794 | int (*raw_init)(void); |
787 | int (*show_format)(struct trace_seq *s); | 795 | int (*show_format)(struct trace_seq *s); |
796 | int (*define_fields)(void); | ||
797 | struct list_head fields; | ||
788 | 798 | ||
789 | #ifdef CONFIG_EVENT_PROFILE | 799 | #ifdef CONFIG_EVENT_PROFILE |
790 | atomic_t profile_count; | 800 | atomic_t profile_count; |
@@ -793,6 +803,8 @@ struct ftrace_event_call { | |||
793 | #endif | 803 | #endif |
794 | }; | 804 | }; |
795 | 805 | ||
806 | int trace_define_field(struct ftrace_event_call *call, char *type, | ||
807 | char *name, int offset, int size); | ||
796 | void event_trace_printk(unsigned long ip, const char *fmt, ...); | 808 | void event_trace_printk(unsigned long ip, const char *fmt, ...); |
797 | extern struct ftrace_event_call __start_ftrace_events[]; | 809 | extern struct ftrace_event_call __start_ftrace_events[]; |
798 | extern struct ftrace_event_call __stop_ftrace_events[]; | 810 | extern struct ftrace_event_call __stop_ftrace_events[]; |