mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
daf07d2207
'perf record' generates perf.data, which generates extra interrupts for hard disk, amount of data to be collected increases with time. Using eBPF trace can process the data in kernel, which solves the preceding two problems. Add -b/--use-bpf option for latency and report to support tracing kwork events using eBPF: 1. Create bpf prog and attach to tracepoints, 2. Start tracing after command is entered, 3. After user hit "ctrl+c", stop tracing and report, 4. Support CPU and name filtering. This commit implements the framework code and does not add specific event support. Test cases: # perf kwork rep -h Usage: perf kwork report [<options>] -b, --use-bpf Use BPF to measure kwork runtime -C, --cpu <cpu> list of cpus to profile -i, --input <file> input file name -n, --name <name> event name to profile -s, --sort <key[,key2...]> sort by key(s): runtime, max, count -S, --with-summary Show summary with statistics --time <str> Time span for analysis (start,stop) # perf kwork lat -h Usage: perf kwork latency [<options>] -b, --use-bpf Use BPF to measure kwork latency -C, --cpu <cpu> list of cpus to profile -i, --input <file> input file name -n, --name <name> event name to profile -s, --sort <key[,key2...]> sort by key(s): avg, max, count --time <str> Time span for analysis (start,stop) # perf kwork lat -b Unsupported bpf trace class irq # perf kwork rep -b Unsupported bpf trace class irq Signed-off-by: Yang Jihong <yangjihong1@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20220709015033.38326-15-yangjihong1@huawei.com [ Simplify work_findnew() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
||
---|---|---|
.. | ||
arch | ||
bench | ||
dlfilters | ||
Documentation | ||
examples/bpf | ||
include | ||
jvmti | ||
pmu-events | ||
python | ||
scripts | ||
tests | ||
trace | ||
ui | ||
util | ||
.gitignore | ||
Build | ||
builtin-annotate.c | ||
builtin-bench.c | ||
builtin-buildid-cache.c | ||
builtin-buildid-list.c | ||
builtin-c2c.c | ||
builtin-config.c | ||
builtin-daemon.c | ||
builtin-data.c | ||
builtin-diff.c | ||
builtin-evlist.c | ||
builtin-ftrace.c | ||
builtin-help.c | ||
builtin-inject.c | ||
builtin-kallsyms.c | ||
builtin-kmem.c | ||
builtin-kvm.c | ||
builtin-kwork.c | ||
builtin-list.c | ||
builtin-lock.c | ||
builtin-mem.c | ||
builtin-probe.c | ||
builtin-record.c | ||
builtin-report.c | ||
builtin-sched.c | ||
builtin-script.c | ||
builtin-stat.c | ||
builtin-timechart.c | ||
builtin-top.c | ||
builtin-trace.c | ||
builtin-version.c | ||
builtin.h | ||
check-headers.sh | ||
command-list.txt | ||
CREDITS | ||
design.txt | ||
Makefile | ||
Makefile.config | ||
Makefile.perf | ||
MANIFEST | ||
perf-archive.sh | ||
perf-completion.sh | ||
perf-iostat.sh | ||
perf-read-vdso.c | ||
perf-sys.h | ||
perf.c | ||
perf.h |