[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181122100322.GN2131@hirez.programming.kicks-ass.net>
Date: Thu, 22 Nov 2018 11:03:22 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-arch@...r.kernel.org,
Joel Fernandes <joel@...lfernandes.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>, stable@...nel.org
Subject: Re: [for-next][PATCH 15/18] function_graph: Use new curr_ret_depth
to manage depth instead of curr_ret_stack
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.
> + goto out;
> +
> + return 0;
> + out:
> + current->curr_ret_depth--;
> + return -EBUSY;
> }
[diff "default"]
xfuncname = "^[[:alpha:]$_].*[^:]$"
avoids the need for that ludicrous label indenting.
Also, "error" might be a better label name.
Powered by blists - more mailing lists