-
- Downloads
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>
Showing
- tools/perf/tests/sample-parsing.c 10 additions, 4 deletionstools/perf/tests/sample-parsing.c
- tools/perf/util/event.h 20 additions, 1 deletiontools/perf/util/event.h
- tools/perf/util/evsel.c 18 additions, 11 deletionstools/perf/util/evsel.c
- tools/perf/util/scripting-engines/trace-event-python.c 14 additions, 5 deletionstools/perf/util/scripting-engines/trace-event-python.c
- tools/perf/util/session.c 21 additions, 14 deletionstools/perf/util/session.c
- tools/perf/util/synthetic-events.c 25 additions, 7 deletionstools/perf/util/synthetic-events.c
Loading
Please register or sign in to comment