All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 4/6] perf session: Add data_size to reader object
Date: Thu, 10 Jan 2019 11:12:59 +0100	[thread overview]
Message-ID: <20190110101301.6196-5-jolsa@kernel.org> (raw)
In-Reply-To: <20190110101301.6196-1-jolsa@kernel.org>

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@kernel.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 06379cc87f59..9f29ed743425 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1822,17 +1822,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


  parent reply	other threads:[~2019-01-10 10:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 10:12 [PATCHv2 0/6] perf session: Add reader object Jiri Olsa
2019-01-10 10:12 ` [PATCH 1/6] perf session: Rearrange perf_session__process_events function Jiri Olsa
2019-01-22 10:10   ` [tip:perf/core] " tip-bot for Jiri Olsa
2019-01-10 10:12 ` [PATCH 2/6] perf session: Get rid of file_size variable Jiri Olsa
2019-01-22 10:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2019-01-10 10:12 ` [PATCH 3/6] perf session: Add reader object Jiri Olsa
2019-01-22 10:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2019-01-10 10:12 ` Jiri Olsa [this message]
2019-01-22 10:12   ` [tip:perf/core] perf session: Add 'data_size' member to " tip-bot for Jiri Olsa
2019-01-10 10:13 ` [PATCH 5/6] perf session: Add data_offset " Jiri Olsa
2019-01-22 10:13   ` [tip:perf/core] perf session: Add 'data_offset' member " tip-bot for Jiri Olsa
2019-01-10 10:13 ` [PATCH 6/6] perf session: Add reader__process_events function Jiri Olsa
2019-01-22 10:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2019-01-11  1:31 ` [PATCHv2 0/6] perf session: Add reader object Namhyung Kim
2019-01-11 13:53   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110101301.6196-5-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.