diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-07-07 05:52:36 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-10 09:59:40 (GMT) |
commit | db59504d89db1462a5281fb55b1d962cb74a398f (patch) | |
tree | b33fcbee2ee8103c15f6e19ab3039af46fc62219 /kernel/trace/trace.h | |
parent | 9d22b536609abf0d64648f99518676ea58245e3b (diff) | |
download | linux-fsl-qoriq-db59504d89db1462a5281fb55b1d962cb74a398f.tar.xz |
ksym_tracer: Extract trace entry from struct trace_ksym
struct trace_ksym is used as an entry in hbp list, and is also
used as trace_entry stored in ring buffer.
This is not necessary and is a waste of memory in ring buffer.
There is also a bug that dereferencing field->ksym_hbp in
ksym_trace_output() can be invalid.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "K.Prasad" <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <4A52E2A4.4050007@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 7d5cc37..ff1ef41 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -215,17 +215,12 @@ struct syscall_trace_exit { #define KSYM_SELFTEST_ENTRY "ksym_selftest_dummy" extern int process_new_ksym_entry(char *ksymname, int op, unsigned long addr); -struct trace_ksym { +struct ksym_trace_entry { struct trace_entry ent; - struct hw_breakpoint *ksym_hbp; - unsigned long ksym_addr; unsigned long ip; -#ifdef CONFIG_PROFILE_KSYM_TRACER - unsigned long counter; -#endif - struct hlist_node ksym_hlist; + unsigned char type; char ksym_name[KSYM_NAME_LEN]; - char p_name[TASK_COMM_LEN]; + char cmd[TASK_COMM_LEN]; }; /* @@ -343,7 +338,7 @@ extern void __ftrace_bad_type(void); TRACE_SYSCALL_ENTER); \ IF_ASSIGN(var, ent, struct syscall_trace_exit, \ TRACE_SYSCALL_EXIT); \ - IF_ASSIGN(var, ent, struct trace_ksym, TRACE_KSYM); \ + IF_ASSIGN(var, ent, struct ksym_trace_entry, TRACE_KSYM);\ __ftrace_bad_type(); \ } while (0) |