diff options
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index c10553c3460f..919f23ca4199 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -350,8 +350,9 @@ static void create_counter(int counter, int cpu, pid_t pid) | |||
350 | struct perf_counter_attr *attr = attrs + counter; | 350 | struct perf_counter_attr *attr = attrs + counter; |
351 | int track = 1; | 351 | int track = 1; |
352 | 352 | ||
353 | attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_PERIOD; | 353 | attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; |
354 | if (freq) { | 354 | if (freq) { |
355 | attr->sample_type |= PERF_SAMPLE_PERIOD; | ||
355 | attr->freq = 1; | 356 | attr->freq = 1; |
356 | attr->sample_freq = freq; | 357 | attr->sample_freq = freq; |
357 | } | 358 | } |