diff options
author | 2022-07-18 10:36:11 -0300 | |
---|---|---|
committer | 2022-07-18 10:36:11 -0300 | |
commit | 0698461ad2984892a47582a58eb235488d3aac7f (patch) | |
tree | 107cfefee20b50f79cde3ed847f075bdbf50fad0 /tools/perf/util/header.c | |
parent | perf lock: Look up callchain for the contended locks (diff) | |
parent | Linux 5.19-rc7 (diff) | |
download | linux-0698461ad2984892a47582a58eb235488d3aac7f.tar.gz linux-0698461ad2984892a47582a58eb235488d3aac7f.tar.bz2 linux-0698461ad2984892a47582a58eb235488d3aac7f.zip |
Merge remote-tracking branch 'torvalds/master' into perf/core
To update the perf/core codebase.
Fix conflict by moving arch__post_evsel_config(evsel, attr) to the end
of evsel__config(), after what was added in:
49c692b7dfc9b6c0 ("perf offcpu: Accept allowed sample types only")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r-- | tools/perf/util/header.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 511478429463..c30c29c51410 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -3703,6 +3703,20 @@ int perf_session__write_header(struct perf_session *session, return perf_session__do_write_header(session, evlist, fd, at_exit, NULL); } +size_t perf_session__data_offset(const struct evlist *evlist) +{ + struct evsel *evsel; + size_t data_offset; + + data_offset = sizeof(struct perf_file_header); + evlist__for_each_entry(evlist, evsel) { + data_offset += evsel->core.ids * sizeof(u64); + } + data_offset += evlist->core.nr_entries * sizeof(struct perf_file_attr); + + return data_offset; +} + int perf_session__inject_header(struct perf_session *session, struct evlist *evlist, int fd, |