summaryrefslogtreecommitdiff
path: root/tools/virtio
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2012-04-27 14:45:38 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-01 14:20:00 -0300
commit5622c07b4741e0afd7607bce6e850b76eeb23210 (patch)
treebbd2aa4459baf10ef88aef17fc5b55abaf451ce0 /tools/virtio
parentafda0f94483f46a4caddb529b8f95e0aaf015de6 (diff)
perf stat: Fix case where guest/host monitoring is not supported by kernel
By default, perf stat sets exclude_guest = 1. But when you run perf on a kernel which does not support host/guest filtering, then you get an error saying the event in unsupported. This comes from the fact that when the perf_event_attr struct passed by the user is larger than the one known to the kernel there is safety check which ensures that all unknown bits are zero. But here, exclude_guest is 1 (part of the unknown bits) and thus the perf_event_open() syscall return EINVAL. To my surprise, running perf record on the same kernel did not exhibit the problem. The reason is that perf record handles the problem by catching the error and retrying with guest/host excludes set to zero. For some reason, this was not done with perf stat. This patch fixes this problem. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Joerg Roedel <joro@8bytes.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Richter <robert.richter@amd.com> Link: http://lkml.kernel.org/r/20120427124538.GA7230@quad Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/virtio')
0 files changed, 0 insertions, 0 deletions