diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-09-06 15:40:12 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-09-09 15:13:11 -0400 |
commit | e71aa28312b208a14cd87fa61e941ac8c85072f4 (patch) | |
tree | a69462a42f8b6510707d8ac7dd08647089fbf65f /tools | |
parent | 733cd2fe197a0c696c54916f7395451c0da9b867 (diff) |
perf kvm: Fix sample_type manipulation
Manipulating the sample_type of an evsel requires the use of:
perf_evsel__set_sample_bit()
and perf_evsel__reset_sample_bit()
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: David Ahern <dsahern@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1378496412-2424-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-kvm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 47b35407c2f2..935d52216c89 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1165,16 +1165,16 @@ static int kvm_live_open_events(struct perf_kvm_stat *kvm) | |||
1165 | struct perf_event_attr *attr = &pos->attr; | 1165 | struct perf_event_attr *attr = &pos->attr; |
1166 | 1166 | ||
1167 | /* make sure these *are* set */ | 1167 | /* make sure these *are* set */ |
1168 | attr->sample_type |= PERF_SAMPLE_TID; | 1168 | perf_evsel__set_sample_bit(pos, TID); |
1169 | attr->sample_type |= PERF_SAMPLE_TIME; | 1169 | perf_evsel__set_sample_bit(pos, TIME); |
1170 | attr->sample_type |= PERF_SAMPLE_CPU; | 1170 | perf_evsel__set_sample_bit(pos, CPU); |
1171 | attr->sample_type |= PERF_SAMPLE_RAW; | 1171 | perf_evsel__set_sample_bit(pos, RAW); |
1172 | /* make sure these are *not*; want as small a sample as possible */ | 1172 | /* make sure these are *not*; want as small a sample as possible */ |
1173 | attr->sample_type &= ~PERF_SAMPLE_PERIOD; | 1173 | perf_evsel__reset_sample_bit(pos, PERIOD); |
1174 | attr->sample_type &= ~PERF_SAMPLE_IP; | 1174 | perf_evsel__reset_sample_bit(pos, IP); |
1175 | attr->sample_type &= ~PERF_SAMPLE_CALLCHAIN; | 1175 | perf_evsel__reset_sample_bit(pos, CALLCHAIN); |
1176 | attr->sample_type &= ~PERF_SAMPLE_ADDR; | 1176 | perf_evsel__reset_sample_bit(pos, ADDR); |
1177 | attr->sample_type &= ~PERF_SAMPLE_READ; | 1177 | perf_evsel__reset_sample_bit(pos, READ); |
1178 | attr->mmap = 0; | 1178 | attr->mmap = 0; |
1179 | attr->comm = 0; | 1179 | attr->comm = 0; |
1180 | attr->task = 0; | 1180 | attr->task = 0; |