[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181226135132.29330-4-jolsa@kernel.org>
Date: Wed, 26 Dec 2018 14:51:30 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: [PATCH 3/5] perf session: Add data_size to reader object
Adding data_size to reader object. Keeping the data_size
variable instead of replacing it with rd.data_size as it
will be used in following patch.
Link: http://lkml.kernel.org/n/tip-5xcux9957yqsljh1cm5ngyqy@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
tools/perf/util/session.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index f5eecae982ba..40692875f196 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1815,17 +1815,19 @@ fetch_mmaped_event(struct perf_session *session,
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;
--
2.17.2
Powered by blists - more mailing lists