Commit 42548008 authored by Steven Rostedt's avatar Steven Rostedt

tracing: add handler to trace_stat

Currently, if a trace_stat user wants a handle to some private data,
the trace_stat infrastructure does not supply a way to do that.

This patch passes the trace_stat structure to the start function of
the trace_stat code.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
parent ee000b7f
...@@ -263,7 +263,7 @@ static int branch_stat_show(struct seq_file *m, void *v) ...@@ -263,7 +263,7 @@ static int branch_stat_show(struct seq_file *m, void *v)
return 0; return 0;
} }
static void *annotated_branch_stat_start(void) static void *annotated_branch_stat_start(struct tracer_stat *trace)
{ {
return __start_annotated_branch_profile; return __start_annotated_branch_profile;
} }
...@@ -338,7 +338,7 @@ static int all_branch_stat_headers(struct seq_file *m) ...@@ -338,7 +338,7 @@ static int all_branch_stat_headers(struct seq_file *m)
return 0; return 0;
} }
static void *all_branch_stat_start(void) static void *all_branch_stat_start(struct tracer_stat *trace)
{ {
return __start_branch_profile; return __start_branch_profile;
} }
......
...@@ -85,7 +85,7 @@ static int stat_seq_init(struct tracer_stat_session *session) ...@@ -85,7 +85,7 @@ static int stat_seq_init(struct tracer_stat_session *session)
if (!ts->stat_cmp) if (!ts->stat_cmp)
ts->stat_cmp = dummy_cmp; ts->stat_cmp = dummy_cmp;
stat = ts->stat_start(); stat = ts->stat_start(ts);
if (!stat) if (!stat)
goto exit; goto exit;
......
...@@ -12,7 +12,7 @@ struct tracer_stat { ...@@ -12,7 +12,7 @@ struct tracer_stat {
/* The name of your stat file */ /* The name of your stat file */
const char *name; const char *name;
/* Iteration over statistic entries */ /* Iteration over statistic entries */
void *(*stat_start)(void); void *(*stat_start)(struct tracer_stat *trace);
void *(*stat_next)(void *prev, int idx); void *(*stat_next)(void *prev, int idx);
/* Compare two entries for stats sorting */ /* Compare two entries for stats sorting */
int (*stat_cmp)(void *p1, void *p2); int (*stat_cmp)(void *p1, void *p2);
......
...@@ -152,7 +152,7 @@ static struct cpu_workqueue_stats *workqueue_stat_start_cpu(int cpu) ...@@ -152,7 +152,7 @@ static struct cpu_workqueue_stats *workqueue_stat_start_cpu(int cpu)
return ret; return ret;
} }
static void *workqueue_stat_start(void) static void *workqueue_stat_start(struct tracer_stat *trace)
{ {
int cpu; int cpu;
void *ret = NULL; void *ret = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment