>From adaa5acdec45e65819343b4362efd50fe0442cfa Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Mao Han Date: Fri, 8 Mar 2019 13:30:59 +0800 Subject: [PATCH 2/3] perf: use hweight64 instead of hweight_long On C-SKY platform, there are 38 registers inside pt_regs. The same layout is directly used by perf to keep uniformity. The mask is 64 bits, but hweight_long can only handle 32 bits, which will casue perf.data analysis mismatch on C-SKY. Signed-off-by: Mao Han --- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index dbc0466..89b87a0 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2305,7 +2305,7 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, if (data->user_regs.abi) { u64 mask = evsel->attr.sample_regs_user; - sz = hweight_long(mask) * sizeof(u64); + sz = hweight64(mask) * sizeof(u64); OVERFLOW_CHECK(array, sz, max_size); data->user_regs.mask = mask; data->user_regs.regs = (u64 *)array; -- 2.7.4