linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 0/5] perf tools: Constify BPF control data properly (v1)
@ 2024-09-02 20:05 Namhyung Kim
  2024-09-02 20:05 ` [PATCH 1/5] perf stat: Constify control data for BPF Namhyung Kim
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Namhyung Kim @ 2024-09-02 20:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, Song Liu, bpf

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,
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-03 15:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02 20:05 [PATCHSET 0/5] perf tools: Constify BPF control data properly (v1) Namhyung Kim
2024-09-02 20:05 ` [PATCH 1/5] perf stat: Constify control data for BPF Namhyung Kim
2024-09-02 20:05 ` [PATCH 2/5] perf ftrace latency: " Namhyung Kim
2024-09-02 20:05 ` [PATCH 3/5] perf kwork: " Namhyung Kim
2024-09-02 20:05 ` [PATCH 4/5] perf lock contention: " Namhyung Kim
2024-09-02 20:05 ` [PATCH 5/5] perf record offcpu: " Namhyung Kim
2024-09-03 15:18 ` [PATCHSET 0/5] perf tools: Constify BPF control data properly (v1) Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).