aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2009-03-06 11:21:48 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-06 11:59:11 -0500
commit1ba28e02a18cbdbea123836f6c98efb09cbf59ec (patch)
tree41df06a06c702152902ffd7250f284a6efe9b0da /kernel/module.c
parent1427cdf0592368bdec57276edaf714040ee8744f (diff)
tracing: add trace_bprintk()
Impact: add a generic printk() for tracing, like trace_printk() trace_bprintk() uses the infrastructure to record events on ring_buffer. [ fweisbec@gmail.com: ported to latest -tip, made it work if !CONFIG_MODULES, never free the format strings from modules because we can't keep track of them and conditionnaly create the ftrace format strings section (reported by Steven Rostedt) ] Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1236356510-8381-4-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 22d7379709da..2dece104f9a1 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2158,6 +2158,12 @@ static noinline struct module *load_module(void __user *umod,
2158 &mod->num_tracepoints); 2158 &mod->num_tracepoints);
2159#endif 2159#endif
2160 2160
2161#ifdef CONFIG_TRACE_BPRINTK
2162 mod->trace_bprintk_fmt_start = section_objs(hdr, sechdrs, secstrings,
2163 "__trace_bprintk_fmt", sizeof(char *),
2164 &mod->num_trace_bprintk_fmt);
2165#endif
2166
2161#ifdef CONFIG_MODVERSIONS 2167#ifdef CONFIG_MODVERSIONS
2162 if ((mod->num_syms && !mod->crcs) 2168 if ((mod->num_syms && !mod->crcs)
2163 || (mod->num_gpl_syms && !mod->gpl_crcs) 2169 || (mod->num_gpl_syms && !mod->gpl_crcs)