From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [for-next][PATCH 01/13] ftrace: Have function graph tracer use global_ops for filtering
Date: Mon, 12 May 2014 11:11:31 -0400 [thread overview]
Message-ID: <20140512151202.702135478@goodmis.org> (raw)
In-Reply-To: 20140512151130.345864843@goodmis.org
[-- Attachment #1: 0001-ftrace-Have-function-graph-tracer-use-global_ops-for.patch --]
[-- Type: text/plain, Size: 2066 bytes --]
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Commit 4104d326b670 "ftrace: Remove global function list and call
function directly" cleaned up the global_ops filtering and made
the code simpler. But it left out function graph filtering which
also depended on that code. The function graph filtering still
needs to use global_ops as the filter otherwise it wont filter
at all.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 34b098bf..9eb1aa0 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5008,12 +5008,6 @@ ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state,
return NOTIFY_DONE;
}
-/* Just a place holder for function graph */
-static struct ftrace_ops fgraph_ops __read_mostly = {
- .func = ftrace_stub,
- .flags = FTRACE_OPS_FL_STUB | FTRACE_OPS_FL_RECURSION_SAFE,
-};
-
static int ftrace_graph_entry_test(struct ftrace_graph_ent *trace)
{
if (!ftrace_ops_test(&global_ops, trace->func, NULL))
@@ -5076,7 +5070,10 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc,
ftrace_graph_entry = ftrace_graph_entry_test;
update_function_graph_func();
- ret = ftrace_startup(&fgraph_ops, FTRACE_START_FUNC_RET);
+ /* Function graph doesn't use the .func field of global_ops */
+ global_ops.flags |= FTRACE_OPS_FL_STUB;
+
+ ret = ftrace_startup(&global_ops, FTRACE_START_FUNC_RET);
out:
mutex_unlock(&ftrace_lock);
@@ -5094,7 +5091,8 @@ void unregister_ftrace_graph(void)
ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
ftrace_graph_entry = ftrace_graph_entry_stub;
__ftrace_graph_entry = ftrace_graph_entry_stub;
- ftrace_shutdown(&fgraph_ops, FTRACE_STOP_FUNC_RET);
+ ftrace_shutdown(&global_ops, FTRACE_STOP_FUNC_RET);
+ global_ops.flags &= ~FTRACE_OPS_FL_STUB;
unregister_pm_notifier(&ftrace_suspend_notifier);
unregister_trace_sched_switch(ftrace_graph_probe_sched_switch, NULL);
--
1.8.5.3
next prev parent reply other threads:[~2014-05-12 15:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 15:11 [for-next][PATCH 00/13] tracing: More updates for 3.16 Steven Rostedt
2014-05-12 15:11 ` Steven Rostedt [this message]
2014-05-12 15:11 ` [for-next][PATCH 02/13] tracing: Remove myself as a tracing maintainer Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 03/13] tracing: Replace __get_cpu_var uses with this_cpu_ptr Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 04/13] tracing: Add trace_<tracepoint>_enabled() function Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 05/13] tracing: Add __bitmask() macro to trace events to cpumasks and other bitmasks Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 06/13] ftrace: Remove boolean of hash_enable and hash_disable Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 07/13] ftrace: Write in missing comment from a very old commit Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 08/13] ftrace: Always inline ftrace_hash_empty() helper function Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 09/13] ftrace/x86: Get the current mcount addr for add_breakpoint() Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 10/13] ftrace: Make get_ftrace_addr() and get_ftrace_addr_old() global Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 11/13] ftrace: Use the ftrace_addr helper functions to find the ftrace_addr Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 12/13] ftrace: Remove FTRACE_UPDATE_MODIFY_CALL_REGS flag Steven Rostedt
2014-05-12 15:11 ` [for-next][PATCH 13/13] ftrace/x86: Move the mcount/fentry code out of entry_64.S 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=20140512151202.702135478@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox