From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755610AbcIAQVD (ORCPT ); Thu, 1 Sep 2016 12:21:03 -0400 Received: from smtprelay0148.hostedemail.com ([216.40.44.148]:51346 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754455AbcIAQU7 (ORCPT ); Thu, 1 Sep 2016 12:20:59 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:334:355:368:369:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:1801:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3354:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:4605:5007:6261:7875:7903:9040:9121:10004:10400:10848:10967:11026:11232:11233:11658:11914:12043:12296:12438:12555:12740:13095:13439:14096:14097:14181:14659:14721:21080:21433:21451:30012:30054:30062:30075:30089:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: crow98_7cd5037241550 X-Filterd-Recvd-Size: 3153 Date: Thu, 1 Sep 2016 12:20:56 -0400 From: Steven Rostedt To: Namhyung Kim Cc: LKML , Ingo Molnar Subject: Re: [PATCH] ftrace: Handle TRACE_BPUTS in print_graph_comment Message-ID: <20160901122056.7aa075ad@gandalf.local.home> In-Reply-To: <20160901024354.13720-1-namhyung@kernel.org> References: <20160901024354.13720-1-namhyung@kernel.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Sep 2016 11:43:54 +0900 Namhyung Kim wrote: > It missed to handle TRACE_BPUTS so messages recorded by trace_bputs() > will be shown with symbol info unnecessarily. > > You can see it with the trace_printk sample code: > > # cd /sys/kernel/tracing/ > # echo sys_sync > set_graph_function > # echo 1 > options/sym-offset > # echo function_graph > current_tracer > > Note that the sys_sync filter was there to prevent recording other > functions and the sym-offset option was needed since the first message > was called from a module init function so kallsyms doesn't have the > symbol and omitted in the output. > > # cd ~/build/kernel > # insmod samples/trace_printk/trace-printk.ko > > # cd - > # head trace > > Before: > > # tracer: function_graph > # > # CPU DURATION FUNCTION CALLS > # | | | | | | | > 1) | /* 0xffffffffa0002000: This is a static string that will use trace_bputs */ > 1) | /* This is a dynamic string that will use trace_puts */ > 1) | /* trace_printk_irq_work+0x5/0x7b [trace_printk]: (irq) This is a static string that will use trace_bputs */ > 1) | /* (irq) This is a dynamic string that will use trace_puts */ > 1) | /* (irq) This is a static string that will use trace_bprintk() */ > 1) | /* (irq) This is a dynamic string that will use trace_printk */ > > After: > > # tracer: function_graph > # > # CPU DURATION FUNCTION CALLS > # | | | | | | | > 1) | /* This is a static string that will use trace_bputs */ > 1) | /* This is a dynamic string that will use trace_puts */ > 1) | /* (irq) This is a static string that will use trace_bputs */ > 1) | /* (irq) This is a dynamic string that will use trace_puts */ > 1) | /* (irq) This is a static string that will use trace_bprintk() */ > 1) | /* (irq) This is a dynamic string that will use trace_printk */ > > Signed-off-by: Namhyung Kim > --- Applied, thanks Namhyung! -- Steve