Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148654
b: refs/heads/master
c: bbd36e5
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 12, 2009
1 parent 1309343 commit 15cd113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 081fad86178ec0f64f32f1bd04cf4aad22714fb9
refs/heads/master: bbd36e5e6aa6f1757c84cdb406b6eb81686d14af
7 changes: 5 additions & 2 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,11 @@ int cmd_record(int argc, const char **argv, const char *prefix)
if (!argc && target_pid == -1 && !system_wide)
usage_with_options(record_usage, options);

if (!nr_counters)
nr_counters = 1;
if (!nr_counters) {
nr_counters = 1;
attrs[0].type = PERF_TYPE_HARDWARE;
attrs[0].config = PERF_COUNT_HW_CPU_CYCLES;
}

for (counter = 0; counter < nr_counters; counter++) {
if (attrs[counter].sample_period)
Expand Down

0 comments on commit 15cd113

Please sign in to comment.