Commit d4d7d0b9 authored by Chris Wilson's avatar Chris Wilson Committed by Ingo Molnar

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: default avatarChris 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: default avatarIngo Molnar <mingo@elte.hu>
parent 9590b7ba
...@@ -962,7 +962,7 @@ config PERF_COUNTERS ...@@ -962,7 +962,7 @@ config PERF_COUNTERS
config EVENT_PROFILE config EVENT_PROFILE
bool "Tracepoint profile sources" bool "Tracepoint profile sources"
depends on PERF_COUNTERS && EVENT_TRACER depends on PERF_COUNTERS && EVENT_TRACING
default y default y
endmenu endmenu
......
...@@ -3671,7 +3671,7 @@ static const struct pmu perf_ops_task_clock = { ...@@ -3671,7 +3671,7 @@ static const struct pmu perf_ops_task_clock = {
void perf_tpcounter_event(int event_id) void perf_tpcounter_event(int event_id)
{ {
struct perf_sample_data data = { struct perf_sample_data data = {
.regs = get_irq_regs(); .regs = get_irq_regs(),
.addr = 0, .addr = 0,
}; };
...@@ -3687,16 +3687,12 @@ extern void ftrace_profile_disable(int); ...@@ -3687,16 +3687,12 @@ extern void ftrace_profile_disable(int);
static void tp_perf_counter_destroy(struct perf_counter *counter) static void tp_perf_counter_destroy(struct perf_counter *counter)
{ {
ftrace_profile_disable(perf_event_id(&counter->attr)); ftrace_profile_disable(counter->attr.config);
} }
static const struct pmu *tp_perf_counter_init(struct perf_counter *counter) static const struct pmu *tp_perf_counter_init(struct perf_counter *counter)
{ {
int event_id = perf_event_id(&counter->attr); if (ftrace_profile_enable(counter->attr.config))
int ret;
ret = ftrace_profile_enable(event_id);
if (ret)
return NULL; return NULL;
counter->destroy = tp_perf_counter_destroy; counter->destroy = tp_perf_counter_destroy;
......
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