diff --git a/pmu/perf_counter.cpp b/pmu/perf_counter.cpp index fda8d082039ab74842d6ab679f5fc8cac15ee4ba..b5784937dd23779c38264ba5a5a34c559130f5dc 100644 --- a/pmu/perf_counter.cpp +++ b/pmu/perf_counter.cpp @@ -115,7 +115,7 @@ static int PerfMmapReadSelf(const std::shared_ptr &countMmap, struct R cnt = ReadOnce(&pc->offset); if (pc->cap_user_rdpmc && idx) { // read the reg mapped by the countMmap->base->idx - uint64_t eventCount = ReadPerfCounter(idx - 1); + int64_t eventCount = ReadPerfCounter(idx - 1); uint16_t width = ReadOnce(&pc->pmc_width); eventCount <<= 64 - width; eventCount >>= 64 - width;