linux/tools/perf
Namhyung Kim 944138f048 perf stat: Enable BPF counter with --for-each-cgroup
Recently bperf was added to use BPF to count perf events for various
purposes.  This is an extension for the approach and targetting to
cgroup usages.

Unlike the other bperf, it doesn't share the events with other
processes but it'd reduce unnecessary events (and the overhead of
multiplexing) for each monitored cgroup within the perf session.

When --for-each-cgroup is used with --bpf-counters, it will open
cgroup-switches event per cpu internally and attach the new BPF
program to read given perf_events and to aggregate the results for
cgroups.  It's only called when task is switched to a task in a
different cgroup.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20210701211227.1403788-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-07-05 14:16:57 -03:00
..
arch perf cs-etm: Remove callback cs_etm_find_snapshot() 2021-07-01 16:14:36 -03:00
bench perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
Documentation perf dlfilter: Add object_code() to perf_dlfilter_fns 2021-07-01 16:14:38 -03:00
examples/bpf perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
include/bpf
jvmti perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
pmu-events Revert "perf vendor events intel: Add metrics for Icelake Server" 2021-06-02 08:27:00 -03:00
python tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
scripts perf scripting python: intel-pt-events.py: Add --insn-trace and --src-trace 2021-06-01 10:05:20 -03:00
tests perf test: Pass the verbose option to shell tests 2021-06-22 14:52:09 -03:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2021-06-19 10:09:08 -03:00
ui perf annotate: Allow 's' on source code lines 2021-07-01 16:14:38 -03:00
util perf stat: Enable BPF counter with --for-each-cgroup 2021-07-05 14:16:57 -03:00
.gitignore perf: Update .gitignore file 2021-04-20 08:40:20 -03:00
Build perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
builtin-annotate.c perf annotate: Add itrace options support 2021-06-16 15:07:42 -03:00
builtin-bench.c perf bench: Add build-id injection benchmark 2020-10-13 10:59:42 -03:00
builtin-buildid-cache.c perf buildid-cache: Add --debuginfod option to specify a server to fetch debug files 2020-12-28 12:20:39 -03:00
builtin-buildid-list.c perf buildid-list: Initialize zstd_data 2021-05-17 20:39:17 -03:00
builtin-c2c.c perf c2c: Support record for hybrid platform 2021-06-01 11:06:35 -03:00
builtin-config.c
builtin-daemon.c Merge remote-tracking branch 'torvalds/master' into perf/core 2021-03-29 10:39:10 -03:00
builtin-data.c perf data: Add JSON export 2021-04-29 10:30:58 -03:00
builtin-diff.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-evlist.c perf evlist: Support pipe mode display 2020-12-17 14:36:17 -03:00
builtin-ftrace.c perf ftrace: Fix access to pid in array when setting a pid filter 2021-04-23 15:58:10 -03:00
builtin-help.c
builtin-inject.c perf inject: Do not inject BUILD_ID record if MMAP2 has it 2021-05-26 09:38:53 -03:00
builtin-kallsyms.c
builtin-kmem.c perf evlist: Use the right prefix for 'struct evlist' 'find' methods 2020-11-30 09:48:07 -03:00
builtin-kvm.c perf evlist: Use the right prefix for 'struct evlist' mmap pages parsing method 2020-11-30 15:15:30 -03:00
builtin-list.c perf list: Remove dead code in argument check 2020-09-09 11:12:10 -03:00
builtin-lock.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-mem.c perf mem: Fix wrong verbose output for recording events 2021-06-01 11:05:30 -03:00
builtin-probe.c perf probe: Add --bootconfig to output definition in bootconfig format 2021-06-18 13:50:05 -03:00
builtin-record.c Merge remote-tracking branch 'torvalds/master' into perf/core 2021-06-22 13:56:50 -03:00
builtin-report.c perf report: Fix --task and --stat with pipe input 2021-07-05 14:16:57 -03:00
builtin-sched.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-script.c perf script: Add option to pass arguments to dlfilters 2021-07-01 16:14:37 -03:00
builtin-stat.c perf stat: Skip evlist__[enable|disable] when all events uses BPF 2021-05-21 16:50:17 -03:00
builtin-timechart.c perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
builtin-top.c perf top: Add cgroup support for perf top (-G) 2021-06-24 15:33:35 -03:00
builtin-trace.c perf trace: Fix race in signal handling 2021-03-06 16:54:32 -03:00
builtin-version.c perf version: Add a feature for libpfm4 2020-11-04 09:42:40 -03:00
builtin.h perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
check-headers.sh perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS 2021-06-01 10:07:46 -03:00
command-list.txt perf stat: Enable iostat mode for x86 platforms 2021-04-20 08:40:20 -03:00
CREDITS
design.txt perf tools: Support CAP_PERFMON capability 2020-04-16 12:19:08 -03:00
Makefile perf tools: Add a build-test variant to use in builds from a tarball 2021-04-20 08:43:58 -03:00
Makefile.config perf build: Install perf_dlfilter.h 2021-07-01 16:14:38 -03:00
Makefile.perf perf stat: Enable BPF counter with --for-each-cgroup 2021-07-05 14:16:57 -03:00
MANIFEST scripts/bpf: Abstract eBPF API target parameter 2021-03-04 18:39:45 -08:00
perf-archive.sh perf archive: Fix filtering of empty build-ids 2021-03-06 16:54:31 -03:00
perf-completion.sh
perf-iostat.sh perf stat: Enable iostat mode for x86 platforms 2021-04-20 08:40:20 -03:00
perf-read-vdso.c
perf-sys.h perf tests: Call test_attr__open() directly 2020-09-10 11:55:37 -03:00
perf-with-kcore.sh
perf.c perf debug: Move debug initialization earlier 2021-05-27 13:24:22 -03:00
perf.h