diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-03-28 12:56:32 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-03-28 12:58:28 +0300 |
commit | cfa637cb20e96fe8cf44b867a7d7c34649cbf8eb (patch) | |
tree | 52591d7b53600d5d39369525a356ccb81e22fcd9 /tools/perf/util/evsel.c | |
parent | db779ef67ffeadbb44e9e818eb64dbe528e2f48f (diff) | |
parent | 8c2ffd9174779014c3fe1f96d9dc3641d9175f00 (diff) | |
download | linux-cfa637cb20e96fe8cf44b867a7d7c34649cbf8eb.tar.xz |
Merge tag 'v5.1-rc2' into core/urgent, to resolve a conflict
Conflicts:
include/linux/kcore.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 3bbf73e979c0..7835e05f0c0a 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1036,7 +1036,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts, attr->mmap2 = track && !perf_missing_features.mmap2; attr->comm = track; attr->ksymbol = track && !perf_missing_features.ksymbol; - attr->bpf_event = track && opts->bpf_event && + attr->bpf_event = track && !opts->no_bpf_event && !perf_missing_features.bpf_event; if (opts->record_namespaces) @@ -1292,6 +1292,7 @@ void perf_evsel__exit(struct perf_evsel *evsel) { assert(list_empty(&evsel->node)); assert(evsel->evlist == NULL); + perf_evsel__free_counts(evsel); perf_evsel__free_fd(evsel); perf_evsel__free_id(evsel); perf_evsel__free_config_terms(evsel); @@ -1342,10 +1343,9 @@ void perf_counts_values__scale(struct perf_counts_values *count, count->val = 0; } else if (count->run < count->ena) { scaled = 1; - count->val = (u64)((double) count->val * count->ena / count->run + 0.5); + count->val = (u64)((double) count->val * count->ena / count->run); } - } else - count->ena = count->run = 0; + } if (pscaled) *pscaled = scaled; |