From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A18BAC43441 for ; Fri, 23 Nov 2018 14:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66FFF20820 for ; Fri, 23 Nov 2018 14:14:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66FFF20820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394948AbeKXA7M (ORCPT ); Fri, 23 Nov 2018 19:59:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:34482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388230AbeKXA7M (ORCPT ); Fri, 23 Nov 2018 19:59:12 -0500 Received: from vmware.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2897420664; Fri, 23 Nov 2018 14:14:49 +0000 (UTC) Date: Fri, 23 Nov 2018 09:14:47 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Thomas Gleixner , linux-arch@vger.kernel.org, Joel Fernandes , Masami Hiramatsu , Josh Poimboeuf , Andy Lutomirski , Frederic Weisbecker , stable@kernel.org Subject: Re: [for-next][PATCH 15/18] function_graph: Use new curr_ret_depth to manage depth instead of curr_ret_stack Message-ID: <20181123091447.0e2eed1b@vmware.local.home> In-Reply-To: <20181122100322.GN2131@hirez.programming.kicks-ass.net> References: <20181122002801.501220343@goodmis.org> <20181122003333.592319701@goodmis.org> <20181122100322.GN2131@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.32; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Nov 2018 11:03:22 +0100 Peter Zijlstra wrote: > On Wed, Nov 21, 2018 at 07:28:16PM -0500, Steven Rostedt wrote: > > @@ -188,14 +186,20 @@ int function_graph_enter(unsigned long ret, unsigned long func, > > struct ftrace_graph_ent trace; > > > > trace.func = func; > > - trace.depth = current->curr_ret_stack + 1; > > + trace.depth = ++current->curr_ret_depth; > > > > /* Only trace if the calling function expects to */ > > if (!ftrace_graph_entry(&trace)) > > - return -EBUSY; > > + goto out; > > > > - return ftrace_push_return_trace(ret, func, &trace.depth, > > - frame_pointer, retp); > > + if (ftrace_push_return_trace(ret, func, > > + frame_pointer, retp)) > > You can unwrap that line, by my counting that's at 69 chars, so unless > you're editing on a C64 it should fit your screen. Thanks I may add a clean up patch. I already ran this code under several hours of testing, and only plan on touching it if there's more than cosmetic issues. The reason that looks like that is because I just massaged the line it replaced, and didn't take into account that I could now make it into a single line. > > > + goto out; > > + > > + return 0; > > + out: > > + current->curr_ret_depth--; > > + return -EBUSY; > > } > > [diff "default"] > xfuncname = "^[[:alpha:]$_].*[^:]$" > > avoids the need for that ludicrous label indenting. I still prefer the 'space', and it fits with the rest of the file ;-) TomAYto / TomAHto > > Also, "error" might be a better label name. True. I'll add that on top too, but for the stable/rc release, that isn't needed. Thanks for taking a look at this code. -- Steve