From e3c478041eee5300ab75ae7a358a4e34609ca4a5 Mon Sep 17 00:00:00 2001 From: doublefree Date: Wed, 6 Aug 2025 10:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmu/perf_counter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmu/perf_counter.cpp b/pmu/perf_counter.cpp index fda8d08..b578493 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; -- Gitee