diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-07-06 04:31:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-13 03:23:10 -0400 |
commit | d4d7d0b9545721d3cabb19d15163bbc66b797707 (patch) | |
tree | b924437019f05bdf1d5504062822711e2869ca1a | |
parent | 9590b7ba3fefdfe0c7741f5e2f61faf2ffcea19c (diff) |
perf_counter: Fix the tracepoint channel to perfcounters
Fix a missed rename in EVENT_PROFILE support so that it gets
built and allows tracepoint tracing from the 'perf' tool.
Fix a typo in the (never before built & enabled) portion in
perf_counter.c as well, and update that code to the
attr.config changes as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Gamari <bgamari.foss@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1246869094-21237-1-git-send-email-chris@chris-wilson.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | init/Kconfig | 2 | ||||
-rw-r--r-- | kernel/perf_counter.c | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/init/Kconfig b/init/Kconfig index 1ce05a4cb5f6..cb2c09270226 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -962,7 +962,7 @@ config PERF_COUNTERS | |||
962 | 962 | ||
963 | config EVENT_PROFILE | 963 | config EVENT_PROFILE |
964 | bool "Tracepoint profile sources" | 964 | bool "Tracepoint profile sources" |
965 | depends on PERF_COUNTERS && EVENT_TRACER | 965 | depends on PERF_COUNTERS && EVENT_TRACING |
966 | default y | 966 | default y |
967 | 967 | ||
968 | endmenu | 968 | endmenu |
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index d55a50da2347..c6c38fb7766a 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -3671,7 +3671,7 @@ static const struct pmu perf_ops_task_clock = { | |||
3671 | void perf_tpcounter_event(int event_id) | 3671 | void perf_tpcounter_event(int event_id) |
3672 | { | 3672 | { |
3673 | struct perf_sample_data data = { | 3673 | struct perf_sample_data data = { |
3674 | .regs = get_irq_regs(); | 3674 | .regs = get_irq_regs(), |
3675 | .addr = 0, | 3675 | .addr = 0, |
3676 | }; | 3676 | }; |
3677 | 3677 | ||
@@ -3687,16 +3687,12 @@ extern void ftrace_profile_disable(int); | |||
3687 | 3687 | ||
3688 | static void tp_perf_counter_destroy(struct perf_counter *counter) | 3688 | static void tp_perf_counter_destroy(struct perf_counter *counter) |
3689 | { | 3689 | { |
3690 | ftrace_profile_disable(perf_event_id(&counter->attr)); | 3690 | ftrace_profile_disable(counter->attr.config); |
3691 | } | 3691 | } |
3692 | 3692 | ||
3693 | static const struct pmu *tp_perf_counter_init(struct perf_counter *counter) | 3693 | static const struct pmu *tp_perf_counter_init(struct perf_counter *counter) |
3694 | { | 3694 | { |
3695 | int event_id = perf_event_id(&counter->attr); | 3695 | if (ftrace_profile_enable(counter->attr.config)) |
3696 | int ret; | ||
3697 | |||
3698 | ret = ftrace_profile_enable(event_id); | ||
3699 | if (ret) | ||
3700 | return NULL; | 3696 | return NULL; |
3701 | 3697 | ||
3702 | counter->destroy = tp_perf_counter_destroy; | 3698 | counter->destroy = tp_perf_counter_destroy; |