On Mon, Sep 02, 2024 at 01:05:10PM -0700, Namhyung Kim wrote: > Hello, > > I've realized that some control data (usually for filter actions) > should be defined as 'const volatile' so that it can passed to the BPF > core and to be optimized properly (like with dead code elimination). > > Convert the existing codes with the similar patterns. Thanks, tested all the features using BPF, applied to perf-tools-next, - Arnaldo > Thanks, > Namhyung > > > Namhyung Kim (5): > perf stat: Constify control data for BPF > perf ftrace latency: Constify control data for BPF > perf kwork: Constify control data for BPF > perf lock contention: Constify control data for BPF > perf record offcpu: Constify control data for BPF > > tools/perf/util/bpf_counter_cgroup.c | 6 +-- > tools/perf/util/bpf_ftrace.c | 8 ++-- > tools/perf/util/bpf_kwork.c | 9 ++-- > tools/perf/util/bpf_kwork_top.c | 7 +-- > tools/perf/util/bpf_lock_contention.c | 45 ++++++++++--------- > tools/perf/util/bpf_off_cpu.c | 16 +++---- > tools/perf/util/bpf_skel/bperf_cgroup.bpf.c | 2 +- > tools/perf/util/bpf_skel/func_latency.bpf.c | 7 +-- > tools/perf/util/bpf_skel/kwork_top.bpf.c | 2 +- > tools/perf/util/bpf_skel/kwork_trace.bpf.c | 5 ++- > .../perf/util/bpf_skel/lock_contention.bpf.c | 27 +++++------ > tools/perf/util/bpf_skel/off_cpu.bpf.c | 9 ++-- > 12 files changed, 76 insertions(+), 67 deletions(-) > > -- > 2.46.0.469.g59c65b2a67-goog