From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbcLLQt0 (ORCPT ); Mon, 12 Dec 2016 11:49:26 -0500 Received: from smtprelay0200.hostedemail.com ([216.40.44.200]:58211 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752646AbcLLQtY (ORCPT ); Mon, 12 Dec 2016 11:49:24 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 30,2,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:2393:2553:2559:2562:2693:2907:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3874:4423:4605:5007:6261:7875:10010:10400:10848:10967:11026:11232:11658:11914:12295:12438:12663:12740:12760:13161:13229:13255:13439:13618:14181:14659:14721:21067:21080:30054:30062: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:1:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: ship93_34b291988042d X-Filterd-Recvd-Size: 3367 Date: Mon, 12 Dec 2016 11:49:20 -0500 From: Steven Rostedt To: Namhyung Kim Cc: "Cc: LKML" , Ingo Molnar , Andrew Morton , stable , Namhyung Kim Subject: Re: [for-next][PATCH 7/8] fgraph: Handle a case where a tracer ignores set_graph_notrace Message-ID: <20161212114920.252e8b31@gandalf.local.home> In-Reply-To: References: <20161209142656.855277710@goodmis.org> <20161209142820.696843036@goodmis.org> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; 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 Tue, 13 Dec 2016 01:30:01 +0900 Namhyung Kim wrote: > Sorry to miss updating those tracers. I guess it's no more necessary once > the patch 8 is applied so that functions in the notrace filter will not be > recorded. > > Or maybe we need to change the prepare_ftrace_return() so that the > graph_entry callback should be called after ftrace_push_return_trace() as > some archs do. I plan on updating fgraph in general so this should all be handled then. > > > > > Have the print functions handle cases where a tracer still records functions > > even when they are in set_graph_notrace. > > I think it'd be better (or consistent, at least) not printing negative index > records rather than showing entry only. I thought about this too, but I'm more concerned about it not crashing the kernel than to show a proper trace. The fix will just make sure it doesn't crash. > > > > > Also add warnings if the depth is below zero before accessing the array. > > > > Note, the function graph logic will still prevent the return of these > > functions from being recorded, which means that they will be left hanging > > without a return. For example: > > > > # echo '*spin*' > set_graph_notrace > > # echo 1 > options/display-graph > > # echo wakeup > current_tracer > > # cat trace > > [...] > > _raw_spin_lock() { > > preempt_count_add() { > > do_raw_spin_lock() { > > update_rq_clock(); > > > > Where it should look like: > > > > _raw_spin_lock() { > > preempt_count_add(); > > do_raw_spin_lock(); > > } > > update_rq_clock(); > > If set_graph_notrace works correctly, it should be just: > > update_rq_clock(); Which is what it should look like after patch 8. But I didn't mark 8 as stable as that's more of a feature. As wakeup and irqsoff doesn't use notrace yet. Yeah, notrace may break it a bit, but since this is the first someone noticed it, I don't think it's used much. I wanted the simplest fix for stable. -- Steve