From: Suzuki K. Poulose Date: Fri, 13 Feb 2015 18:40:58 +0000 (+0000) Subject: perf stat: Report unsupported events properly X-Git-Tag: omap-for-v4.2/o2_dc~146^2~62^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b4331d9a4f2d99603c38bfcac79943b7c6c5439;p=pandora-kernel.git perf stat: Report unsupported events properly Commit 1971f59 (perf stat: Use read_counter in read_counter_aggr ) broke the perf stat output for unsupported counters. $ perf stat -v -a -C 0 -e CCI_400/config=24/ sleep 1 Warning: CCI_400/config=24/ event is not supported by the kernel. Performance counter stats for 'system wide': 0 CCI_400/config=24/ 1.080265400 seconds time elapsed Where it used to be : $ perf stat -v -a -C 0 -e CCI_400/config=24/ sleep 1 Warning: CCI_400/config=24/ event is not supported by the kernel. Performance counter stats for 'system wide': CCI_400/config=24/ 1.083840675 seconds time elapsed This patch fixes the issues by checking if the counter is supported, before reading and logging the counter value. Signed-off-by: Suzuki K. Poulose Acked-by: David Ahern Tested-by: David Ahern Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1423852858-8455-1-git-send-email-suzuki.poulose@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed