mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
perf record: Explicity program a default counter
Up until now record has worked on the assumption that type=0, config=0 was a suitable configuration - which it is. Lets make this a little more explicit and more readable via the use of proper symbols. [ Impact: cleanup ] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
081fad8617
commit
bbd36e5e6a
1 changed files with 5 additions and 2 deletions
|
@ -568,8 +568,11 @@ int cmd_record(int argc, const char **argv, const char *prefix)
|
||||||
if (!argc && target_pid == -1 && !system_wide)
|
if (!argc && target_pid == -1 && !system_wide)
|
||||||
usage_with_options(record_usage, options);
|
usage_with_options(record_usage, options);
|
||||||
|
|
||||||
if (!nr_counters)
|
if (!nr_counters) {
|
||||||
nr_counters = 1;
|
nr_counters = 1;
|
||||||
|
attrs[0].type = PERF_TYPE_HARDWARE;
|
||||||
|
attrs[0].config = PERF_COUNT_HW_CPU_CYCLES;
|
||||||
|
}
|
||||||
|
|
||||||
for (counter = 0; counter < nr_counters; counter++) {
|
for (counter = 0; counter < nr_counters; counter++) {
|
||||||
if (attrs[counter].sample_period)
|
if (attrs[counter].sample_period)
|
||||||
|
|
Loading…
Reference in a new issue