linux/tools/perf
Namhyung Kim f52679b788 perf tools: Support reading PERF_FORMAT_LOST
The recent kernel added lost count can be read from either read(2) or
ring buffer data with PERF_SAMPLE_READ.  As it's a variable length data
we need to access it according to the format info.

But for perf tools use cases, PERF_FORMAT_ID is always set.  So we can
only check PERF_FORMAT_LOST bit to determine the data format.

Add sample_read_value_size() and next_sample_read_value() helpers to
make it a bit easier to access.  Use them in all places where it reads
the struct sample_read_value.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220819003644.508916-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-08-19 15:56:56 -03:00
..
arch perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
bench Merge remote-tracking branch 'torvalds/master' into perf/core 2022-05-23 09:32:49 -03:00
dlfilters perf dlfilter: Drop unused variable 2021-12-16 12:18:11 -03:00
Documentation perf c2c: Update documentation for new display option 'peer' 2022-08-11 19:12:32 -03:00
examples/bpf perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
include perf dlfilter: Add machine_pid and vcpu 2022-07-20 11:08:13 -03:00
jvmti perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
pmu-events perf vendor events: Update events for snowridgex 2022-08-13 15:08:31 -03:00
python perf python: Convert tracepoint.py example to python3 2022-04-01 16:19:35 -03:00
scripts Merge remote-tracking branch 'torvalds/master' into perf/core 2022-08-01 08:59:31 -03:00
tests perf tools: Support reading PERF_FORMAT_LOST 2022-08-19 15:56:56 -03:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2022-08-19 15:30:33 -03:00
ui perf annotate: Avoid TUI crash when navigating in the annotation of recursive functions 2022-01-10 15:47:30 -03:00
util perf tools: Support reading PERF_FORMAT_LOST 2022-08-19 15:56:56 -03:00
.gitignore perf tools: Delete perf-with-kcore.sh script 2022-04-27 20:11:26 -03:00
Build perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
builtin-annotate.c perf gtk: Only support --gtk if compiled in 2022-07-20 11:09:11 -03:00
builtin-bench.c perf bench: Add breakpoint benchmarks 2022-05-13 11:00:38 -03:00
builtin-buildid-cache.c perf record: Disable debuginfod by default 2022-01-15 17:41:25 -03:00
builtin-buildid-list.c perf buildid-list: Add a "-m" option to show kernel and modules build-ids 2022-07-18 16:35:34 -03:00
builtin-c2c.c perf c2c: Use 'peer' as default display for Arm64 2022-08-11 19:12:31 -03:00
builtin-config.c
builtin-daemon.c perf daemon: Remove duplicate sys/file.h include 2021-10-08 15:14:50 -03:00
builtin-data.c perf data: Don't mention --to-ctf if it's not supported 2022-02-22 21:23:08 -03:00
builtin-diff.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-evlist.c perf tools: Remove repipe argument from perf_session__new() 2021-08-02 10:06:51 -03:00
builtin-ftrace.c perf evlist: Rename cpus to user_requested_cpus 2022-04-01 16:19:35 -03:00
builtin-help.c
builtin-inject.c perf inject: Fix spelling mistake "theads" -> "threads" 2022-07-26 16:31:54 -03:00
builtin-kallsyms.c
builtin-kmem.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-kvm.c perf kvm: Fix subcommand matching error 2022-08-10 10:44:02 -03:00
builtin-kwork.c perf kwork: Implement BPF trace 2022-07-26 16:31:54 -03:00
builtin-list.c perf parse-events: Break out tracepoint and printing 2022-08-02 16:32:26 -03:00
builtin-lock.c perf lock: Print the number of lost entries for BPF 2022-08-02 18:03:31 -03:00
builtin-mem.c perf tools: Enhance the matching of sub-commands abbreviations 2022-03-26 10:55:57 -03:00
builtin-probe.c perf namespaces: Add functions to access nsinfo 2022-02-11 14:31:22 -03:00
builtin-record.c perf record: Improve error message of -p not_existing_pid 2022-08-12 10:27:21 -03:00
builtin-report.c perf gtk: Only support --gtk if compiled in 2022-07-20 11:09:11 -03:00
builtin-sched.c perf sched latency: Fix subcommand matching error 2022-08-10 10:44:02 -03:00
builtin-script.c perf script: Delete repeated word "from" 2022-08-12 16:44:30 -03:00
builtin-stat.c perf stat: Remove duplicated include in builtin-stat.c 2022-08-12 16:51:31 -03:00
builtin-timechart.c perf parse-events: Break out tracepoint and printing 2022-08-02 16:32:26 -03:00
builtin-top.c perf evlist: Rename cpus to user_requested_cpus 2022-04-01 16:19:35 -03:00
builtin-trace.c perf trace: Fix double word in comments 2022-08-12 16:44:56 -03:00
builtin-version.c perf version: Add HAVE_DEBUGINFOD_SUPPORT to built-in features 2022-04-20 13:32:09 -03:00
builtin.h perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
check-headers.sh tools arm64: Import cputype.h 2022-03-26 10:53:45 -03:00
command-list.txt perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
CREDITS
design.txt perf design.txt: Synchronize the definition of enum perf_hw_id with code 2021-11-13 18:11:50 -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: Remove FEATURE_CHECK_LDFLAGS-disassembler-{four-args,init-styled} setting 2022-08-10 10:44:01 -03:00
Makefile.perf perf test: JSON format checking 2022-08-10 10:44:01 -03:00
MANIFEST perf MANIFEST: Add bpftool files to allow building with BUILD_BPF_SKEL=1 2021-11-07 15:39:28 -03:00
perf-archive.sh
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.c perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
perf.h