summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-06-07 14:30:02 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-06-25 11:59:36 -0300
commit621a5a327c1e36ffd7bb567f44a559f64f76358f (patch)
tree87f9171f351ab824abaaa9baef709b617c2363d0 /tools/perf
parent16ddcfbf7f3d07aa781e26b39f2c28636a4ed2fd (diff)
downloadop-kernel-dev-621a5a327c1e36ffd7bb567f44a559f64f76358f.zip
op-kernel-dev-621a5a327c1e36ffd7bb567f44a559f64f76358f.tar.gz
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>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c2
1 files changed, 1 insertions, 1 deletions
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 ba4c9dd..d426761 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;
OpenPOWER on IntegriCloud