]> git.baikalelectronics.ru Git - kernel.git/commit
perf record: Use sw counter only if hw pmu is not detected
authorRobert Richter <robert.richter@amd.com>
Thu, 5 Apr 2012 16:26:28 +0000 (18:26 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 11 Apr 2012 20:39:19 +0000 (17:39 -0300)
commit0e10921f3bc20058c0e3c21c8533f39ddb2d589a
treeece2e7d0e2c19ea5a3d0ec172ad0b81a8a19021d
parenta58a059e9f76f95cd9dfd1e233a3e732c5788aaa
perf record: Use sw counter only if hw pmu is not detected

Use cpu-clock-tick sw counter for cpu-cycles only if there is no hw
pmu available. This is the case if the syscall reports ENOENT. In
other cases (e.g. invalid attributes) we don't want the sw counter to
be used.

Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1333643188-26895-5-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c