All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] tracing: add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
@ 2013-07-18  8:31 zhangwei(Jovi)
  2014-07-09 19:22 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: zhangwei(Jovi) @ 2013-07-18  8:31 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Frederic Weisbecker, Ingo Molnar, linux-kernel@vger.kernel.org

There missed TRACE_ITER_PRINTK check in __trace_puts/__trace_bputs,
so add it, to constant with __trace_printk/__trace_bprintk,
those functions mainly called by same function: trace_printk.

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
---
 kernel/trace/trace.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4d70cc5..41340c3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -365,6 +365,9 @@ int __trace_puts(unsigned long ip, const char *str, int size)
 	int alloc;
 	int pc;

+	if (!(trace_flags & TRACE_ITER_PRINTK))
+		return 0;
+
 	pc = preempt_count();

 	alloc = sizeof(*entry) + size + 2; /* possible \n added */
@@ -409,6 +412,9 @@ int __trace_bputs(unsigned long ip, const char *str)
 	int size = sizeof(struct bputs_entry);
 	int pc;

+	if (!(trace_flags & TRACE_ITER_PRINTK))
+		return 0;
+
 	pc = preempt_count();

 	local_save_flags(irq_flags);
-- 
1.7.9.7



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-09 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18  8:31 [PATCH 2/3] tracing: add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs zhangwei(Jovi)
2014-07-09 19:22 ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.