From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [for-next][PATCH 4/5] function_graph: Use a ftrace_graph_ret_stub() for return
Date: Thu, 25 Apr 2019 12:28:12 -0400 [thread overview]
Message-ID: <20190425162844.102484207@goodmis.org> (raw)
In-Reply-To: 20190425162808.056301033@goodmis.org
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
There's a unique ftrace_graph_entry_stub() for the entryfunc of a
fgraph_ops, but the ftrace_stub is used for the retfunc(). To be consistent
and also to use the same type of function as the type being called for
retfunc(), create and use ftrace_graph_ret_stub().
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/fgraph.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 8dfd5021b933..580ce7534a49 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -327,14 +327,17 @@ void ftrace_graph_sleep_time_control(bool enable)
fgraph_sleep_time = enable;
}
+static void ftrace_graph_ret_stub(struct ftrace_graph_ret *trace)
+{
+}
+
int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace)
{
return 0;
}
/* The callbacks that hook a function */
-trace_func_graph_ret_t ftrace_graph_return =
- (trace_func_graph_ret_t)ftrace_stub;
+trace_func_graph_ret_t ftrace_graph_return = ftrace_graph_ret_stub;
trace_func_graph_ent_t ftrace_graph_entry = ftrace_graph_entry_stub;
static trace_func_graph_ent_t __ftrace_graph_entry = ftrace_graph_entry_stub;
@@ -614,7 +617,7 @@ void unregister_ftrace_graph(struct fgraph_ops *gops)
goto out;
ftrace_graph_active--;
- ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
+ ftrace_graph_return = ftrace_graph_ret_stub;
ftrace_graph_entry = ftrace_graph_entry_stub;
__ftrace_graph_entry = ftrace_graph_entry_stub;
ftrace_shutdown(&graph_ops, FTRACE_STOP_FUNC_RET);
--
2.20.1
next prev parent reply other threads:[~2019-04-25 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 16:28 [for-next][PATCH 0/5] tracing: function graph cleanups for the next merge window Steven Rostedt
2019-04-25 16:28 ` [for-next][PATCH 1/5] ftrace: Remove ASSIGN_OPS_HASH() macro from ftrace.c Steven Rostedt
2019-04-25 16:28 ` [for-next][PATCH 2/5] ftrace: Do not process STUB functions in ftrace_ops_list_func() Steven Rostedt
2019-04-25 16:28 ` [for-next][PATCH 3/5] function_graph: Have selftest also emulate tr->reset() as it did with tr->init() Steven Rostedt
2019-04-25 16:28 ` Steven Rostedt [this message]
2019-04-25 16:28 ` [for-next][PATCH 5/5] function_graph: Place ftrace_graph_entry_stub() prototype in include/linux/ftrace.h Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190425162844.102484207@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.