Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191441
b: refs/heads/master
c: 9106b69
h: refs/heads/master
i:
  191439: 286ecc0
v: v3
  • Loading branch information
Jiri Olsa authored and Steven Rostedt committed Apr 26, 2010
1 parent f724120 commit 6c8c9fc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77a7f2e94e6998e307917fe63fa4b6d5162d44e9
refs/heads/master: 9106b69382912ddc403a307b69bf894a6f3004e4
28 changes: 27 additions & 1 deletion trunk/kernel/trace/trace_functions_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}

Expand Down

0 comments on commit 6c8c9fc

Please sign in to comment.