aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-03-05 16:10:19 -0500
committerIngo Molnar <mingo@kernel.org>2015-03-23 05:58:04 -0400
commit50f16a8bf9d7a92c437ed1867d0f7e1dc6a9aca9 (patch)
treeb3794dc4959e7dedbdddfb1e428c4fe67126e45b /kernel/trace
parent4e16ed99416ef569a89782a7234f95007919fadd (diff)
perf: Remove type specific target pointers
The only reason CQM had to use a hard-coded pmu type was so it could use cqm_target in hw_perf_event. Do away with the {tp,bp,cqm}_target pointers and provide a non type specific one. This allows us to do away with that silly pmu type as well. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Vince Weaver <vince@deater.net> Cc: acme@kernel.org Cc: acme@redhat.com Cc: hpa@zytor.com Cc: jolsa@redhat.com Cc: kanaka.d.juvva@intel.com Cc: matt.fleming@intel.com Cc: tglx@linutronix.de Cc: torvalds@linux-foundation.org Cc: vikas.shivappa@linux.intel.com Link: http://lkml.kernel.org/r/20150305211019.GU21418@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_uprobe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
index b11441321e7a..93fdc7791eaa 100644
--- a/kernel/trace/trace_uprobe.c
+++ b/kernel/trace/trace_uprobe.c
@@ -1005,7 +1005,7 @@ __uprobe_perf_filter(struct trace_uprobe_filter *filter, struct mm_struct *mm)
1005 return true; 1005 return true;
1006 1006
1007 list_for_each_entry(event, &filter->perf_events, hw.tp_list) { 1007 list_for_each_entry(event, &filter->perf_events, hw.tp_list) {
1008 if (event->hw.tp_target->mm == mm) 1008 if (event->hw.target->mm == mm)
1009 return true; 1009 return true;
1010 } 1010 }
1011 1011
@@ -1015,7 +1015,7 @@ __uprobe_perf_filter(struct trace_uprobe_filter *filter, struct mm_struct *mm)
1015static inline bool 1015static inline bool
1016uprobe_filter_event(struct trace_uprobe *tu, struct perf_event *event) 1016uprobe_filter_event(struct trace_uprobe *tu, struct perf_event *event)
1017{ 1017{
1018 return __uprobe_perf_filter(&tu->filter, event->hw.tp_target->mm); 1018 return __uprobe_perf_filter(&tu->filter, event->hw.target->mm);
1019} 1019}
1020 1020
1021static int uprobe_perf_close(struct trace_uprobe *tu, struct perf_event *event) 1021static int uprobe_perf_close(struct trace_uprobe *tu, struct perf_event *event)
@@ -1023,10 +1023,10 @@ static int uprobe_perf_close(struct trace_uprobe *tu, struct perf_event *event)
1023 bool done; 1023 bool done;
1024 1024
1025 write_lock(&tu->filter.rwlock); 1025 write_lock(&tu->filter.rwlock);
1026 if (event->hw.tp_target) { 1026 if (event->hw.target) {
1027 list_del(&event->hw.tp_list); 1027 list_del(&event->hw.tp_list);
1028 done = tu->filter.nr_systemwide || 1028 done = tu->filter.nr_systemwide ||
1029 (event->hw.tp_target->flags & PF_EXITING) || 1029 (event->hw.target->flags & PF_EXITING) ||
1030 uprobe_filter_event(tu, event); 1030 uprobe_filter_event(tu, event);
1031 } else { 1031 } else {
1032 tu->filter.nr_systemwide--; 1032 tu->filter.nr_systemwide--;
@@ -1046,7 +1046,7 @@ static int uprobe_perf_open(struct trace_uprobe *tu, struct perf_event *event)
1046 int err; 1046 int err;
1047 1047
1048 write_lock(&tu->filter.rwlock); 1048 write_lock(&tu->filter.rwlock);
1049 if (event->hw.tp_target) { 1049 if (event->hw.target) {
1050 /* 1050 /*
1051 * event->parent != NULL means copy_process(), we can avoid 1051 * event->parent != NULL means copy_process(), we can avoid
1052 * uprobe_apply(). current->mm must be probed and we can rely 1052 * uprobe_apply(). current->mm must be probed and we can rely