mirror of
https://github.com/torvalds/linux.git
synced 2025-11-08 12:40:51 +02:00
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> |
||
|---|---|---|
| .. | ||
| attr | ||
| shell | ||
| .gitignore | ||
| api-io.c | ||
| attr.c | ||
| attr.py | ||
| backward-ring-buffer.c | ||
| bitmap.c | ||
| bp_account.c | ||
| bp_signal.c | ||
| bp_signal_overflow.c | ||
| bpf-script-example.c | ||
| bpf-script-test-kbuild.c | ||
| bpf-script-test-prologue.c | ||
| bpf-script-test-relocation.c | ||
| bpf.c | ||
| Build | ||
| builtin-test-list.c | ||
| builtin-test-list.h | ||
| builtin-test.c | ||
| clang.c | ||
| code-reading.c | ||
| cpumap.c | ||
| demangle-java-test.c | ||
| demangle-ocaml-test.c | ||
| dlfilter-test.c | ||
| dso-data.c | ||
| dwarf-unwind.c | ||
| event-times.c | ||
| event_update.c | ||
| evsel-roundtrip-name.c | ||
| evsel-tp-sched.c | ||
| expand-cgroup.c | ||
| expr.c | ||
| fdarray.c | ||
| genelf.c | ||
| hists_common.c | ||
| hists_common.h | ||
| hists_cumulate.c | ||
| hists_filter.c | ||
| hists_link.c | ||
| hists_output.c | ||
| is_printable_array.c | ||
| keep-tracking.c | ||
| kmod-path.c | ||
| llvm.c | ||
| llvm.h | ||
| make | ||
| maps.c | ||
| mem.c | ||
| mem2node.c | ||
| mmap-basic.c | ||
| mmap-thread-lookup.c | ||
| openat-syscall-all-cpus.c | ||
| openat-syscall-tp-fields.c | ||
| openat-syscall.c | ||
| parse-events.c | ||
| parse-metric.c | ||
| parse-no-sample-id-all.c | ||
| pe-file-parsing.c | ||
| pe-file.c | ||
| pe-file.exe | ||
| pe-file.exe.debug | ||
| perf-hooks.c | ||
| perf-record.c | ||
| perf-targz-src-pkg | ||
| perf-time-to-tsc.c | ||
| pfm.c | ||
| pmu-events.c | ||
| pmu.c | ||
| python-use.c | ||
| sample-parsing.c | ||
| sdt.c | ||
| sigtrap.c | ||
| stat.c | ||
| sw-clock.c | ||
| switch-tracking.c | ||
| task-exit.c | ||
| tests.h | ||
| thread-map.c | ||
| thread-maps-share.c | ||
| time-utils-test.c | ||
| topology.c | ||
| unit_number__scnprintf.c | ||
| vmlinux-kallsyms.c | ||
| wp.c | ||