Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
621a5a32 16ddcfbf

+1 -1
+1 -1
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
··· 366 366 if (len < offs) 367 367 return INTEL_PT_NEED_MORE_BYTES; 368 368 byte = buf[offs++]; 369 - payload |= (byte >> 1) << shift; 369 + payload |= ((uint64_t)byte >> 1) << shift; 370 370 } 371 371 372 372 packet->type = INTEL_PT_CYC;