struct reader {
int fd;
+ u64 data_size;
};
static int __perf_session__process_events(struct perf_session *session)
{
struct reader rd = {
.fd = perf_data__fd(session->data),
+ .data_size = session->header.data_size,
};
struct ordered_events *oe = &session->ordered_events;
struct perf_tool *tool = session->tool;
u64 data_offset = session->header.data_offset;
- u64 data_size = session->header.data_size;
+ u64 data_size = rd.data_size;
u64 head, page_offset, file_offset, file_pos, size;
int err, mmap_prot, mmap_flags, map_idx = 0;
size_t mmap_size;