From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 1/8] tracing: Add ftrace events for graph tracer
Date: Tue, 27 Apr 2010 21:27:24 -0400 [thread overview]
Message-ID: <20100428013805.549286587@goodmis.org> (raw)
In-Reply-To: 20100428012723.119106602@goodmis.org
[-- Attachment #1: 0001-tracing-Add-ftrace-events-for-graph-tracer.patch --]
[-- Type: text/plain, Size: 2261 bytes --]
From: Jiri Olsa <jolsa@redhat.com>
Add ftrace events for graph tracer, so the graph output could be shared
with other tracers.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
LKML-Reference: <1270227683-14631-2-git-send-email-jolsa@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_functions_graph.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 669b9c3..db9e06b 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -40,7 +40,7 @@ struct fgraph_data {
#define TRACE_GRAPH_PRINT_OVERHEAD 0x4
#define TRACE_GRAPH_PRINT_PROC 0x8
#define TRACE_GRAPH_PRINT_DURATION 0x10
-#define TRACE_GRAPH_PRINT_ABS_TIME 0X20
+#define TRACE_GRAPH_PRINT_ABS_TIME 0x20
static struct tracer_opt trace_opts[] = {
/* Display overruns? (for self-debug purpose) */
@@ -1096,6 +1096,12 @@ print_graph_function(struct trace_iterator *iter)
return TRACE_TYPE_HANDLED;
}
+static enum print_line_t
+print_graph_function_event(struct trace_iterator *iter, int flags)
+{
+ return print_graph_function(iter);
+}
+
static void print_lat_header(struct seq_file *s)
{
static const char spaces[] = " " /* 16 spaces */
@@ -1199,6 +1205,16 @@ static void graph_trace_close(struct trace_iterator *iter)
}
}
+static struct trace_event graph_trace_entry_event = {
+ .type = TRACE_GRAPH_ENT,
+ .trace = print_graph_function_event,
+};
+
+static struct trace_event graph_trace_ret_event = {
+ .type = TRACE_GRAPH_RET,
+ .trace = print_graph_function_event,
+};
+
static struct tracer graph_trace __read_mostly = {
.name = "function_graph",
.open = graph_trace_open,
@@ -1220,6 +1236,16 @@ static __init int init_graph_trace(void)
{
max_bytes_for_cpu = snprintf(NULL, 0, "%d", nr_cpu_ids - 1);
+ if (!register_ftrace_event(&graph_trace_entry_event)) {
+ pr_warning("Warning: could not register graph trace events\n");
+ return 1;
+ }
+
+ if (!register_ftrace_event(&graph_trace_ret_event)) {
+ pr_warning("Warning: could not register graph trace events\n");
+ return 1;
+ }
+
return register_tracer(&graph_trace);
}
--
1.7.0
next prev parent reply other threads:[~2010-04-28 1:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 1:27 [PATCH 0/8] [GIT PULL] tracing: various updates Steven Rostedt
2010-04-28 1:27 ` Steven Rostedt [this message]
2010-04-28 1:27 ` [PATCH 2/8] tracing: Have graph flags passed in to ouput functions Steven Rostedt
2010-04-28 1:27 ` [PATCH 3/8] tracing: Add graph output support for irqsoff tracer Steven Rostedt
2010-04-28 1:27 ` [PATCH 4/8] ring-buffer: Make non-consuming read less expensive with lots of cpus Steven Rostedt
2010-04-28 1:27 ` [PATCH 5/8] ring-buffer: Make benchmark handle missed events Steven Rostedt
2010-04-28 1:27 ` [PATCH 6/8] tracing: Add documentation for trace commands mod, traceon/traceoff Steven Rostedt
2010-04-28 1:27 ` [PATCH 7/8] tracing: Show sample std dev in function profiling Steven Rostedt
2010-04-28 1:27 ` [PATCH 8/8] tracing: Fix sleep time " Steven Rostedt
2010-04-30 8:00 ` [PATCH 0/8] [GIT PULL] tracing: various updates Ingo Molnar
2010-04-30 9:47 ` Ingo Molnar
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=20100428013805.549286587@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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