aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-04-10 22:30:05 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-04-20 22:06:45 -0400
commitb5f081b563a6cdcb85a543df8c851951a8978275 (patch)
treeb9ab66a67e30d9f63fef8cb33da1d0e8893b1b15 /kernel/trace/trace.c
parent04ec7bb642b77374b53731b795b5654b5aff1c00 (diff)
tracing: Pass the trace_array into ftrace_probe_ops functions
Pass the trace_array associated to a ftrace_probe_ops into the probe_ops func(), init() and free() functions. The trace_array is the descriptor that describes a tracing instance. This will help create the infrastructure that will allow having function probes unique to tracing instances. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 86598293787a..368310e78d45 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6736,14 +6736,16 @@ static const struct file_operations tracing_dyn_info_fops = {
6736#if defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE) 6736#if defined(CONFIG_TRACER_SNAPSHOT) && defined(CONFIG_DYNAMIC_FTRACE)
6737static void 6737static void
6738ftrace_snapshot(unsigned long ip, unsigned long parent_ip, 6738ftrace_snapshot(unsigned long ip, unsigned long parent_ip,
6739 struct ftrace_probe_ops *ops, void **data) 6739 struct trace_array *tr, struct ftrace_probe_ops *ops,
6740 void **data)
6740{ 6741{
6741 tracing_snapshot(); 6742 tracing_snapshot();
6742} 6743}
6743 6744
6744static void 6745static void
6745ftrace_count_snapshot(unsigned long ip, unsigned long parent_ip, 6746ftrace_count_snapshot(unsigned long ip, unsigned long parent_ip,
6746 struct ftrace_probe_ops *ops, void **data) 6747 struct trace_array *tr, struct ftrace_probe_ops *ops,
6748 void **data)
6747{ 6749{
6748 struct ftrace_func_mapper *mapper = ops->private_data; 6750 struct ftrace_func_mapper *mapper = ops->private_data;
6749 long *count = NULL; 6751 long *count = NULL;
@@ -6785,8 +6787,8 @@ ftrace_snapshot_print(struct seq_file *m, unsigned long ip,
6785} 6787}
6786 6788
6787static int 6789static int
6788ftrace_snapshot_init(struct ftrace_probe_ops *ops, unsigned long ip, 6790ftrace_snapshot_init(struct ftrace_probe_ops *ops, struct trace_array *tr,
6789 void *data) 6791 unsigned long ip, void *data)
6790{ 6792{
6791 struct ftrace_func_mapper *mapper = ops->private_data; 6793 struct ftrace_func_mapper *mapper = ops->private_data;
6792 6794
@@ -6794,8 +6796,8 @@ ftrace_snapshot_init(struct ftrace_probe_ops *ops, unsigned long ip,
6794} 6796}
6795 6797
6796static void 6798static void
6797ftrace_snapshot_free(struct ftrace_probe_ops *ops, unsigned long ip, 6799ftrace_snapshot_free(struct ftrace_probe_ops *ops, struct trace_array *tr,
6798 void **_data) 6800 unsigned long ip, void **data)
6799{ 6801{
6800 struct ftrace_func_mapper *mapper = ops->private_data; 6802 struct ftrace_func_mapper *mapper = ops->private_data;
6801 6803