aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorKan Liang <kan.liang@intel.com>2015-06-11 02:32:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-11 11:07:40 -0300
commitcb5ef60067c11cc8887122f6f168c21941c5d624 (patch)
treec8311bef9631cabc6d9cd621b8248b8fca9a679d /tools/perf/builtin-report.c
parent7310aed77ef2928bcfb8ee5ad71e2b091166b85e (diff)
perf stat: Error out unsupported group leader immediately
perf stat ignores the unsupported event and continue to count supported event. But if the unsupported event is group leader, perf tool will crash. After applying this patch, the unsupported group leader will error out immediately. Without this patch: $ perf stat -x, -e '{node-prefetch-refs,cycles}' -- sleep 1 perf: util/evsel.c:1009: get_group_fd: Assertion `!(fd == -1)' failed. Aborted (core dumped) With this patch: $ perf stat -x, -e '{node-prefetch-refs,cycles}' -- sleep 1 Error: The node-prefetch-refs event is not supported. Commiter note: Here I got a different output, but no core dump: [acme@zoo linux]$ perf stat -x, -e '{node-prefetch-refs,cycles}' -- sleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (node-prefetch-refs). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? Signed-off-by: Kan Liang <kan.liang@intel.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Link: http://lkml.kernel.org/r/1434004360-8570-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
0 files changed, 0 insertions, 0 deletions