From: Ingo Molnar Date: Fri, 5 Jun 2009 16:37:22 +0000 (+0200) Subject: perf record: Set frequency correctly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1dba15e74aba5a90c1f2557f37e5d09f8a2df643;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf record: Set frequency correctly Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c index 43ddab31ac39..c22ea0c7472a 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) attr.config = event_id[counter]; attr.sample_period = event_count[counter]; attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD; - attr.freq = freq; + if (freq) { + attr.freq = 1; + attr.sample_freq = freq; + } attr.mmap = track; attr.comm = track; attr.inherit = (cpu < 0) && inherit; @@ -544,10 +547,6 @@ int cmd_record(int argc, const char **argv, const char *prefix) event_id[0] = 0; } - if (freq) { - default_interval = freq; - freq = 1; - } for (counter = 0; counter < nr_counters; counter++) { if (event_count[counter]) continue;