We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5501e92 commit 648b054Copy full SHA for 648b054
tools/perf/util/header.c
@@ -3323,6 +3323,14 @@ int perf_session__write_header(struct perf_session *session,
3323
attr_offset = lseek(ff.fd, 0, SEEK_CUR);
3324
3325
evlist__for_each_entry(evlist, evsel) {
3326
+ if (evsel->core.attr.size < sizeof(evsel->core.attr)) {
3327
+ /*
3328
+ * We are likely in "perf inject" and have read
3329
+ * from an older file. Update attr size so that
3330
+ * reader gets the right offset to the ids.
3331
+ */
3332
+ evsel->core.attr.size = sizeof(evsel->core.attr);
3333
+ }
3334
f_attr = (struct perf_file_attr){
3335
.attr = evsel->core.attr,
3336
.ids = {
0 commit comments