public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] perf intel-pt: Packet splitting can happen only on 32-bit
Date: Wed,  6 Feb 2019 12:39:46 +0200	[thread overview]
Message-ID: <20190206103947.15750-5-adrian.hunter@intel.com> (raw)
In-Reply-To: <20190206103947.15750-1-adrian.hunter@intel.com>

Data is copied when the trace is stopped, so packets are never split
between buffers except when processing if the buffer cannot fit in the
address space which can only happen on 32-bit systems. Change the logic to
reflect that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index a54d6c9a4601..6e03db142091 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -868,7 +868,7 @@ static int intel_pt_get_next_packet(struct intel_pt_decoder *decoder)
 
 		ret = intel_pt_get_packet(decoder->buf, decoder->len,
 					  &decoder->packet);
-		if (ret == INTEL_PT_NEED_MORE_BYTES &&
+		if (ret == INTEL_PT_NEED_MORE_BYTES && BITS_PER_LONG == 32 &&
 		    decoder->len < INTEL_PT_PKT_MAX_SZ && !decoder->next_buf) {
 			ret = intel_pt_get_split_packet(decoder);
 			if (ret < 0)
-- 
2.17.1


  parent reply	other threads:[~2019-02-06 10:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 10:39 [PATCH 0/5] perf intel-pt: A few fixes Adrian Hunter
2019-02-06 10:39 ` [PATCH 1/5] perf auxtrace: Define auxtrace record alignment Adrian Hunter
2019-02-09 13:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 2/5] perf intel-pt: Fix overlap calculation for padding Adrian Hunter
2019-02-09 13:00   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 3/5] perf intel-pt: Fix CYC timestamp calculation after OVF Adrian Hunter
2019-02-09 13:01   ` [tip:perf/core] " tip-bot for Adrian Hunter
2019-02-06 10:39 ` Adrian Hunter [this message]
2019-02-09 13:02   ` [tip:perf/core] perf intel-pt: Packet splitting can happen only on 32-bit tip-bot for Adrian Hunter
2019-02-06 10:39 ` [PATCH 5/5] perf auxtrace: Add timestamp to auxtrace errors Adrian Hunter
2019-02-09 13:02   ` [tip:perf/core] " tip-bot for Adrian Hunter

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=20190206103947.15750-5-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox