evsel.c (ba78c1c5461c2fc2f57b777e971b3a9ec0df5666) evsel.c (8fb4b67939e169fca68174e9ac7be79fe9a04498)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
4 *
5 * Parts came from builtin-{top,stat,record}.c, see those files for further
6 * copyright notes.
7 */
8

--- 1090 unchanged lines hidden (view full) ---

1099 attr->mmap2 = track && !perf_missing_features.mmap2;
1100 attr->comm = track;
1101 attr->ksymbol = track && !perf_missing_features.ksymbol;
1102 attr->bpf_event = track && !opts->no_bpf_event && !perf_missing_features.bpf;
1103
1104 if (opts->record_namespaces)
1105 attr->namespaces = track;
1106
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
4 *
5 * Parts came from builtin-{top,stat,record}.c, see those files for further
6 * copyright notes.
7 */
8

--- 1090 unchanged lines hidden (view full) ---

1099 attr->mmap2 = track && !perf_missing_features.mmap2;
1100 attr->comm = track;
1101 attr->ksymbol = track && !perf_missing_features.ksymbol;
1102 attr->bpf_event = track && !opts->no_bpf_event && !perf_missing_features.bpf;
1103
1104 if (opts->record_namespaces)
1105 attr->namespaces = track;
1106
1107 if (opts->record_cgroup) {
1108 attr->cgroup = track && !perf_missing_features.cgroup;
1109 perf_evsel__set_sample_bit(evsel, CGROUP);
1110 }
1111
1107 if (opts->record_switch_events)
1108 attr->context_switch = track;
1109
1110 if (opts->sample_transaction)
1111 perf_evsel__set_sample_bit(evsel, TRANSACTION);
1112
1113 if (opts->running_time) {
1114 evsel->core.attr.read_format |=

--- 669 unchanged lines hidden (view full) ---

1784
1785 if (err != -EINVAL || cpu > 0 || thread > 0)
1786 goto out_close;
1787
1788 /*
1789 * Must probe features in the order they were added to the
1790 * perf_event_attr interface.
1791 */
1112 if (opts->record_switch_events)
1113 attr->context_switch = track;
1114
1115 if (opts->sample_transaction)
1116 perf_evsel__set_sample_bit(evsel, TRANSACTION);
1117
1118 if (opts->running_time) {
1119 evsel->core.attr.read_format |=

--- 669 unchanged lines hidden (view full) ---

1789
1790 if (err != -EINVAL || cpu > 0 || thread > 0)
1791 goto out_close;
1792
1793 /*
1794 * Must probe features in the order they were added to the
1795 * perf_event_attr interface.
1796 */
1792 if (!perf_missing_features.branch_hw_idx &&
1797 if (!perf_missing_features.cgroup && evsel->core.attr.cgroup) {
1798 perf_missing_features.cgroup = true;
1799 pr_debug2_peo("Kernel has no cgroup sampling support, bailing out\n");
1800 goto out_close;
1801 } else if (!perf_missing_features.branch_hw_idx &&
1793 (evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX)) {
1794 perf_missing_features.branch_hw_idx = true;
1795 pr_debug2("switching off branch HW index support\n");
1796 goto fallback_missing_features;
1797 } else if (!perf_missing_features.aux_output && evsel->core.attr.aux_output) {
1798 perf_missing_features.aux_output = true;
1799 pr_debug2_peo("Kernel has no attr.aux_output support, bailing out\n");
1800 goto out_close;

--- 826 unchanged lines hidden ---
1802 (evsel->core.attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX)) {
1803 perf_missing_features.branch_hw_idx = true;
1804 pr_debug2("switching off branch HW index support\n");
1805 goto fallback_missing_features;
1806 } else if (!perf_missing_features.aux_output && evsel->core.attr.aux_output) {
1807 perf_missing_features.aux_output = true;
1808 pr_debug2_peo("Kernel has no attr.aux_output support, bailing out\n");
1809 goto out_close;

--- 826 unchanged lines hidden ---