diff options
-rw-r--r-- | tools/perf/util/header.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index fff3b2a455ae..918fd8ae2d80 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -2504,8 +2504,11 @@ int perf_session__read_header(struct perf_session *session) | |||
2504 | if (read_attr(fd, header, &f_attr) < 0) | 2504 | if (read_attr(fd, header, &f_attr) < 0) |
2505 | goto out_errno; | 2505 | goto out_errno; |
2506 | 2506 | ||
2507 | if (header->needs_swap) | 2507 | if (header->needs_swap) { |
2508 | f_attr.ids.size = bswap_64(f_attr.ids.size); | ||
2509 | f_attr.ids.offset = bswap_64(f_attr.ids.offset); | ||
2508 | perf_event__attr_swap(&f_attr.attr); | 2510 | perf_event__attr_swap(&f_attr.attr); |
2511 | } | ||
2509 | 2512 | ||
2510 | tmp = lseek(fd, 0, SEEK_CUR); | 2513 | tmp = lseek(fd, 0, SEEK_CUR); |
2511 | evsel = perf_evsel__new(&f_attr.attr); | 2514 | evsel = perf_evsel__new(&f_attr.attr); |