Skip to content

Commit c3382e7

Browse files
ahunter6gregkh
authored andcommitted
perf intel-pt: Fix packet decoding of CYC packets
commit 621a5a3 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e7b363 commit c3382e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
366366
if (len < offs)
367367
return INTEL_PT_NEED_MORE_BYTES;
368368
byte = buf[offs++];
369-
payload |= (byte >> 1) << shift;
369+
payload |= ((uint64_t)byte >> 1) << shift;
370370
}
371371

372372
packet->type = INTEL_PT_CYC;

0 commit comments

Comments
 (0)