Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757005Ab3GRIcg (ORCPT ); Thu, 18 Jul 2013 04:32:36 -0400 Received: from szxga01-in.huawei.com ([119.145.14.64]:12534 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753089Ab3GRIce (ORCPT ); Thu, 18 Jul 2013 04:32:34 -0400 Message-ID: <51E7A7D6.8090900@huawei.com> Date: Thu, 18 Jul 2013 16:31:18 +0800 From: "zhangwei(Jovi)" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Steven Rostedt CC: Frederic Weisbecker , Ingo Molnar , "linux-kernel@vger.kernel.org" Subject: [PATCH 2/3] tracing: add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.66.58.241] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 42 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) --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/