aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/perf/include/perf/evsel.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2022-08-18 17:36:42 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-08-19 15:56:27 -0300
commit89e3106fa25fb1b626a7123dba870159d453e785 (patch)
tree479a3e263e2c45941b75278480fa07d0c51e2938 /tools/lib/perf/include/perf/evsel.h
parenttools headers UAPI: Sync linux/perf_event.h with the kernel sources (diff)
downloadlinux-dev-89e3106fa25fb1b626a7123dba870159d453e785.tar.xz
linux-dev-89e3106fa25fb1b626a7123dba870159d453e785.zip
libperf: Handle read format in perf_evsel__read()
The perf_counts_values should be increased to read the new lost data. Also adjust values after read according the read format. This supports PERF_FORMAT_GROUP which has a different data format but it's only available for leader events. Currently it doesn't have an API to read sibling (member) events in the group. But users may read the sibling event directly. Also reading from mmap would be disabled when the read format has ID or LOST bit as it's not exposed via mmap. 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-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r--tools/lib/perf/include/perf/evsel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lib/perf/include/perf/evsel.h b/tools/lib/perf/include/perf/evsel.h
index 699c0ed97d34..6f92204075c2 100644
--- a/tools/lib/perf/include/perf/evsel.h
+++ b/tools/lib/perf/include/perf/evsel.h
@@ -18,8 +18,10 @@ struct perf_counts_values {
uint64_t val;
uint64_t ena;
uint64_t run;
+ uint64_t id;
+ uint64_t lost;
};
- uint64_t values[3];
+ uint64_t values[5];
};
};