aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-record.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-05 12:37:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-05 12:37:22 -0400
commit1dba15e74aba5a90c1f2557f37e5d09f8a2df643 (patch)
tree36d62e0a130842116c142cb848171b03e4845151 /Documentation/perf_counter/builtin-record.c
parentb2fef0762fdb65cf8702eea93f4e58abeb0ecefc (diff)
perf record: Set frequency correctly
Cc: 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>
Diffstat (limited to 'Documentation/perf_counter/builtin-record.c')
-rw-r--r--Documentation/perf_counter/builtin-record.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c
index 43ddab31ac3..c22ea0c7472 100644
--- a/Documentation/perf_counter/builtin-record.c
+++ b/Documentation/perf_counter/builtin-record.c
@@ -348,7 +348,10 @@ static void create_counter(int counter, int cpu, pid_t pid)
348 attr.config = event_id[counter]; 348 attr.config = event_id[counter];
349 attr.sample_period = event_count[counter]; 349 attr.sample_period = event_count[counter];
350 attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD; 350 attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD;
351 attr.freq = freq; 351 if (freq) {
352 attr.freq = 1;
353 attr.sample_freq = freq;
354 }
352 attr.mmap = track; 355 attr.mmap = track;
353 attr.comm = track; 356 attr.comm = track;
354 attr.inherit = (cpu < 0) && inherit; 357 attr.inherit = (cpu < 0) && inherit;
@@ -544,10 +547,6 @@ int cmd_record(int argc, const char **argv, const char *prefix)
544 event_id[0] = 0; 547 event_id[0] = 0;
545 } 548 }
546 549
547 if (freq) {
548 default_interval = freq;
549 freq = 1;
550 }
551 for (counter = 0; counter < nr_counters; counter++) { 550 for (counter = 0; counter < nr_counters; counter++) {
552 if (event_count[counter]) 551 if (event_count[counter])
553 continue; 552 continue;