diff options
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index e983e721beca..fa676355559e 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "thread_map.h" | 34 | #include "thread_map.h" |
35 | #include "target.h" | 35 | #include "target.h" |
36 | #include "perf_regs.h" | 36 | #include "perf_regs.h" |
37 | #include "record.h" | ||
37 | #include "debug.h" | 38 | #include "debug.h" |
38 | #include "trace-event.h" | 39 | #include "trace-event.h" |
39 | #include "stat.h" | 40 | #include "stat.h" |
@@ -116,7 +117,7 @@ int __perf_evsel__sample_size(u64 sample_type) | |||
116 | * | 117 | * |
117 | * This function returns the position of the event id (PERF_SAMPLE_ID or | 118 | * This function returns the position of the event id (PERF_SAMPLE_ID or |
118 | * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct | 119 | * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct |
119 | * sample_event. | 120 | * perf_record_sample. |
120 | */ | 121 | */ |
121 | static int __perf_evsel__calc_id_pos(u64 sample_type) | 122 | static int __perf_evsel__calc_id_pos(u64 sample_type) |
122 | { | 123 | { |
@@ -1071,8 +1072,7 @@ void perf_evsel__config(struct evsel *evsel, struct record_opts *opts, | |||
1071 | attr->mmap2 = track && !perf_missing_features.mmap2; | 1072 | attr->mmap2 = track && !perf_missing_features.mmap2; |
1072 | attr->comm = track; | 1073 | attr->comm = track; |
1073 | attr->ksymbol = track && !perf_missing_features.ksymbol; | 1074 | attr->ksymbol = track && !perf_missing_features.ksymbol; |
1074 | attr->bpf_event = track && !opts->no_bpf_event && | 1075 | attr->bpf_event = track && !opts->no_bpf_event && !perf_missing_features.bpf; |
1075 | !perf_missing_features.bpf_event; | ||
1076 | 1076 | ||
1077 | if (opts->record_namespaces) | 1077 | if (opts->record_namespaces) |
1078 | attr->namespaces = track; | 1078 | attr->namespaces = track; |
@@ -1802,7 +1802,7 @@ fallback_missing_features: | |||
1802 | evsel->core.attr.read_format &= ~(PERF_FORMAT_GROUP|PERF_FORMAT_ID); | 1802 | evsel->core.attr.read_format &= ~(PERF_FORMAT_GROUP|PERF_FORMAT_ID); |
1803 | if (perf_missing_features.ksymbol) | 1803 | if (perf_missing_features.ksymbol) |
1804 | evsel->core.attr.ksymbol = 0; | 1804 | evsel->core.attr.ksymbol = 0; |
1805 | if (perf_missing_features.bpf_event) | 1805 | if (perf_missing_features.bpf) |
1806 | evsel->core.attr.bpf_event = 0; | 1806 | evsel->core.attr.bpf_event = 0; |
1807 | retry_sample_id: | 1807 | retry_sample_id: |
1808 | if (perf_missing_features.sample_id_all) | 1808 | if (perf_missing_features.sample_id_all) |
@@ -1919,8 +1919,8 @@ try_fallback: | |||
1919 | perf_missing_features.aux_output = true; | 1919 | perf_missing_features.aux_output = true; |
1920 | pr_debug2("Kernel has no attr.aux_output support, bailing out\n"); | 1920 | pr_debug2("Kernel has no attr.aux_output support, bailing out\n"); |
1921 | goto out_close; | 1921 | goto out_close; |
1922 | } else if (!perf_missing_features.bpf_event && evsel->core.attr.bpf_event) { | 1922 | } else if (!perf_missing_features.bpf && evsel->core.attr.bpf_event) { |
1923 | perf_missing_features.bpf_event = true; | 1923 | perf_missing_features.bpf = true; |
1924 | pr_debug2("switching off bpf_event\n"); | 1924 | pr_debug2("switching off bpf_event\n"); |
1925 | goto fallback_missing_features; | 1925 | goto fallback_missing_features; |
1926 | } else if (!perf_missing_features.ksymbol && evsel->core.attr.ksymbol) { | 1926 | } else if (!perf_missing_features.ksymbol && evsel->core.attr.ksymbol) { |
@@ -2008,7 +2008,7 @@ static int perf_evsel__parse_id_sample(const struct evsel *evsel, | |||
2008 | struct perf_sample *sample) | 2008 | struct perf_sample *sample) |
2009 | { | 2009 | { |
2010 | u64 type = evsel->core.attr.sample_type; | 2010 | u64 type = evsel->core.attr.sample_type; |
2011 | const u64 *array = event->sample.array; | 2011 | const __u64 *array = event->sample.array; |
2012 | bool swapped = evsel->needs_swap; | 2012 | bool swapped = evsel->needs_swap; |
2013 | union u64_swap u; | 2013 | union u64_swap u; |
2014 | 2014 | ||
@@ -2098,7 +2098,7 @@ int perf_evsel__parse_sample(struct evsel *evsel, union perf_event *event, | |||
2098 | { | 2098 | { |
2099 | u64 type = evsel->core.attr.sample_type; | 2099 | u64 type = evsel->core.attr.sample_type; |
2100 | bool swapped = evsel->needs_swap; | 2100 | bool swapped = evsel->needs_swap; |
2101 | const u64 *array; | 2101 | const __u64 *array; |
2102 | u16 max_size = event->header.size; | 2102 | u16 max_size = event->header.size; |
2103 | const void *endp = (void *)event + max_size; | 2103 | const void *endp = (void *)event + max_size; |
2104 | u64 sz; | 2104 | u64 sz; |
@@ -2377,7 +2377,7 @@ int perf_evsel__parse_sample_timestamp(struct evsel *evsel, | |||
2377 | u64 *timestamp) | 2377 | u64 *timestamp) |
2378 | { | 2378 | { |
2379 | u64 type = evsel->core.attr.sample_type; | 2379 | u64 type = evsel->core.attr.sample_type; |
2380 | const u64 *array; | 2380 | const __u64 *array; |
2381 | 2381 | ||
2382 | if (!(type & PERF_SAMPLE_TIME)) | 2382 | if (!(type & PERF_SAMPLE_TIME)) |
2383 | return -1; | 2383 | return -1; |
@@ -2419,7 +2419,7 @@ int perf_evsel__parse_sample_timestamp(struct evsel *evsel, | |||
2419 | size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, | 2419 | size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, |
2420 | u64 read_format) | 2420 | u64 read_format) |
2421 | { | 2421 | { |
2422 | size_t sz, result = sizeof(struct sample_event); | 2422 | size_t sz, result = sizeof(struct perf_record_sample); |
2423 | 2423 | ||
2424 | if (type & PERF_SAMPLE_IDENTIFIER) | 2424 | if (type & PERF_SAMPLE_IDENTIFIER) |
2425 | result += sizeof(u64); | 2425 | result += sizeof(u64); |
@@ -2528,7 +2528,7 @@ int perf_event__synthesize_sample(union perf_event *event, u64 type, | |||
2528 | u64 read_format, | 2528 | u64 read_format, |
2529 | const struct perf_sample *sample) | 2529 | const struct perf_sample *sample) |
2530 | { | 2530 | { |
2531 | u64 *array; | 2531 | __u64 *array; |
2532 | size_t sz; | 2532 | size_t sz; |
2533 | /* | 2533 | /* |
2534 | * used for cross-endian analysis. See git commit 65014ab3 | 2534 | * used for cross-endian analysis. See git commit 65014ab3 |