linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf intel-pt: Fix packet decoding of CYC packets
@ 2018-06-07 11:30 Adrian Hunter
  2018-06-13 20:02 ` Arnaldo Carvalho de Melo
  2018-06-26  6:54 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
  0 siblings, 2 replies; 3+ messages in thread
From: Adrian Hunter @ 2018-06-07 11:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, linux-kernel

Use a 64-bit type so that the cycle count is not limited to 32-bits.

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

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
index ba4c9dd18643..d426761a549d 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
@@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
 		if (len < offs)
 			return INTEL_PT_NEED_MORE_BYTES;
 		byte = buf[offs++];
-		payload |= (byte >> 1) << shift;
+		payload |= ((uint64_t)byte >> 1) << shift;
 	}
 
 	packet->type = INTEL_PT_CYC;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf intel-pt: Fix packet decoding of CYC packets
  2018-06-07 11:30 [PATCH] perf intel-pt: Fix packet decoding of CYC packets Adrian Hunter
@ 2018-06-13 20:02 ` Arnaldo Carvalho de Melo
  2018-06-26  6:54 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-06-13 20:02 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Jiri Olsa, linux-kernel

Em Thu, Jun 07, 2018 at 02:30:02PM +0300, Adrian Hunter escreveu:
> Use a 64-bit type so that the cycle count is not limited to 32-bits.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> Cc: stable@vger.kernel.org

Thanks, applied.

- Arnaldo

> ---
>  tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
> index ba4c9dd18643..d426761a549d 100644
> --- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
> +++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
> @@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
>  		if (len < offs)
>  			return INTEL_PT_NEED_MORE_BYTES;
>  		byte = buf[offs++];
> -		payload |= (byte >> 1) << shift;
> +		payload |= ((uint64_t)byte >> 1) << shift;
>  	}
>  
>  	packet->type = INTEL_PT_CYC;
> -- 
> 1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/urgent] perf intel-pt: Fix packet decoding of CYC packets
  2018-06-07 11:30 [PATCH] perf intel-pt: Fix packet decoding of CYC packets Adrian Hunter
  2018-06-13 20:02 ` Arnaldo Carvalho de Melo
@ 2018-06-26  6:54 ` tip-bot for Adrian Hunter
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Adrian Hunter @ 2018-06-26  6:54 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, acme, adrian.hunter, mingo, linux-kernel, jolsa, hpa

Commit-ID:  621a5a327c1e36ffd7bb567f44a559f64f76358f
Gitweb:     https://git.kernel.org/tip/621a5a327c1e36ffd7bb567f44a559f64f76358f
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Thu, 7 Jun 2018 14:30:02 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 25 Jun 2018 11:59:36 -0300

perf intel-pt: Fix packet decoding of CYC packets

Use a 64-bit type so that the cycle count is not limited to 32-bits.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1528371002-8862-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
index ba4c9dd18643..d426761a549d 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
@@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
 		if (len < offs)
 			return INTEL_PT_NEED_MORE_BYTES;
 		byte = buf[offs++];
-		payload |= (byte >> 1) << shift;
+		payload |= ((uint64_t)byte >> 1) << shift;
 	}
 
 	packet->type = INTEL_PT_CYC;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-26  6:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 11:30 [PATCH] perf intel-pt: Fix packet decoding of CYC packets Adrian Hunter
2018-06-13 20:02 ` Arnaldo Carvalho de Melo
2018-06-26  6:54 ` [tip:perf/urgent] " tip-bot for Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).