diff options
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 4a8c8b02e9cc..667f3b78bb2c 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -108,6 +108,9 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts) | |||
108 | if (opts->system_wide) | 108 | if (opts->system_wide) |
109 | attr->sample_type |= PERF_SAMPLE_CPU; | 109 | attr->sample_type |= PERF_SAMPLE_CPU; |
110 | 110 | ||
111 | if (opts->period) | ||
112 | attr->sample_type |= PERF_SAMPLE_PERIOD; | ||
113 | |||
111 | if (opts->sample_id_all_avail && | 114 | if (opts->sample_id_all_avail && |
112 | (opts->sample_time || opts->system_wide || | 115 | (opts->sample_time || opts->system_wide || |
113 | !opts->no_inherit || opts->cpu_list)) | 116 | !opts->no_inherit || opts->cpu_list)) |
@@ -457,7 +460,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type, | |||
457 | u32 val32[2]; | 460 | u32 val32[2]; |
458 | } u; | 461 | } u; |
459 | 462 | ||
460 | 463 | memset(data, 0, sizeof(*data)); | |
461 | data->cpu = data->pid = data->tid = -1; | 464 | data->cpu = data->pid = data->tid = -1; |
462 | data->stream_id = data->id = data->time = -1ULL; | 465 | data->stream_id = data->id = data->time = -1ULL; |
463 | 466 | ||