diff options
author | Lin Ming <ming.m.lin@intel.com> | 2011-01-06 22:11:09 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-06 22:44:36 -0500 |
commit | 23a2f3ab46596d9fd0b0e592d2101bea90970594 (patch) | |
tree | 6b3d9e3755a3e71bb0e6b47e62b269e50b6cf37d /tools/perf/util/evsel.c | |
parent | 6b01f2c4f6188da50d8fe094e369a9c0390424ab (diff) |
perf tools: Pass whole attr to event selectors
Since commit 69aad6f1(perf tools: Introduce event selectors), only
perf_event_attr::type and ::config are passed to event selector, which
makes perf tool not work correctly.
For example, PEBS does not work because perf_event_attr::precise_ip is
not passed to the syscall.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1294369869.20563.19.camel@minggr.sh.intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index c95267e63c5b..1a5591d7a245 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -6,14 +6,13 @@ | |||
6 | 6 | ||
7 | #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) | 7 | #define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) |
8 | 8 | ||
9 | struct perf_evsel *perf_evsel__new(u32 type, u64 config, int idx) | 9 | struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx) |
10 | { | 10 | { |
11 | struct perf_evsel *evsel = zalloc(sizeof(*evsel)); | 11 | struct perf_evsel *evsel = zalloc(sizeof(*evsel)); |
12 | 12 | ||
13 | if (evsel != NULL) { | 13 | if (evsel != NULL) { |
14 | evsel->idx = idx; | 14 | evsel->idx = idx; |
15 | evsel->attr.type = type; | 15 | evsel->attr = *attr; |
16 | evsel->attr.config = config; | ||
17 | INIT_LIST_HEAD(&evsel->node); | 16 | INIT_LIST_HEAD(&evsel->node); |
18 | } | 17 | } |
19 | 18 | ||