From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757884AbcHaCQw (ORCPT ); Tue, 30 Aug 2016 22:16:52 -0400 Received: from smtprelay0015.hostedemail.com ([216.40.44.15]:50279 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754214AbcHaCQu (ORCPT ); Tue, 30 Aug 2016 22:16:50 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:355: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:2194:2199:2393:2553:2559:2562:2691:2693:2895:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6261:7774:7875:7903:8603:9108:10004:10400:10450:10455:10562:10848:10967:11026:11232:11473:11658:11914:12438:12663:12740:13138:13146:13230:13231:13439:14096:14097:14180:14181:14659:14721:19904:19999:21060:21063:21067:21080:30012:30045:30054:30070: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:1,LUA_SUMMARY:none X-HE-Tag: bone16_75b1b1a7c8b2e X-Filterd-Recvd-Size: 3326 Date: Tue, 30 Aug 2016 22:16:47 -0400 From: Steven Rostedt To: Namhyung Kim Cc: LKML , Ingo Molnar , Josh Poimboeuf Subject: Re: [PATCH] ftrace: Access ret_stack->subtime only in the function profiler Message-ID: <20160830221647.6a9716cc@gandalf.local.home> In-Reply-To: <20160831021138.GA26190@danjae.aot.lge.com> References: <20160829030518.5383-1-namhyung@kernel.org> <20160829160700.71dc249a@gandalf.local.home> <20160830013441.GA13062@sejong> <20160831021138.GA26190@danjae.aot.lge.com> 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 Wed, 31 Aug 2016 11:11:38 +0900 Namhyung Kim wrote: > On Tue, Aug 30, 2016 at 10:34:41AM +0900, Namhyung Kim wrote: > > Hi Steve, > > > > On Mon, Aug 29, 2016 at 04:07:00PM -0400, Steven Rostedt wrote: > > > On Mon, 29 Aug 2016 12:05:18 +0900 > > > Namhyung Kim wrote: > > > > > > > The subtime is used only for function profiler with function graph > > > > tracer enabled. Move the definition of subtime under > > > > CONFIG_FUNCTION_PROFILER to reduce the memory usage. Also move the > > > > initialization of subtime into the graph entry callback. > > > > > > Hmm, I think documentation needs to be updated. Although it was never > > > implemented, I believe I added the subtime to not only work with the > > > profiler, but also with the normal tracing (to have the time of the > > > internal functions subtracted from the upper level functions). But it > > > appears that part was never implemented. > > > > > > I'm fine with the patch, or actually implementing what graph-time > > > states in Documentation/ftrace.txt. If we take this patch, that comment > > > needs to be made to only mention the profiler (and the option should > > > only be shown when the profiler is enabled). > > > > Ah, missed the documentation part. To implement it in the normal > > tracing, I think we need to add 'subtime' field to struct > > ftrace_graph_ret which will increase disk size. Are you ok with this? > > On second thought, I think I can do it by just adding value of subtime > to ftrace_graph_ret.calltime when graph-time is off. Then the > calltime would not be the timestamp at function entry, but it seems > not guaranteed due to the sleep-time anyway. Now I wonder why it > doesn't have 'duration' in the ftrace_graph_ret instead of having > calltime and rettime. > As it hasn't worked, like forever, I'm thinking of nuking it. Nobody seemed to have noticed. I haven't needed to use it, and apparently nobody else has either. Why support a feature that nobody uses? I have used it for profiling, but not normal function graph tracing. You can see the function times inside and do the logic post processing. Best bet is to just update the documentation to what the current code does. -- Steve