Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2802888pxa; Mon, 17 Aug 2020 20:48:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziHAvMysmctzWbWkZFicIzcgCynD+Hva/61K2198/GBPKV8agq6aTOYCjTfpa0wZ7SZhix X-Received: by 2002:a17:906:2f07:: with SMTP id v7mr18973359eji.313.1597722525531; Mon, 17 Aug 2020 20:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597722525; cv=none; d=google.com; s=arc-20160816; b=Ngo+SZoMGqC+CpizfBbER71P2xt+f/5aJIkEQxnIQyJBWoiI+e0tozjRW06HdBdPoO 1Dgos3maaSJvDfMGwStB0EFglf9cTH/x9F/7UsKC+eAfU5KxiztNOxHgsUL+VCwApIzI EtGhu8kdSfVE2kyiDHnlh/lJFAO7cs37bz/09beTit48475Hm45RdvBzsNgsRN8OWELk 2PkK0ct659p/502TwhD4Nxe/nwh0q0B86zq8u0ZHwrMs1bdBxYGwhBTgkssRltC6dU+G 72vmoco1989VwtbIM1RyDNeJxi2+rbikgvOVvnqH0UxLqeh56lZk3x28aUjMJCtEKqix ljBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=bzzahHZA9etmE5YABgDT2Z7ATyl98V9VXS8xl9XhV/o=; b=RYUNnNLDDHVaN+DWHfcAiMfeHyyvaOxLbYHDuCSwvRShfk4McoXJTaiMcQcCMCy8ka HReVYEkxuyRMF4gNv2vFh/tmMgtuCk3tZ78OV1PTK+Ejth/TFpdeYp8O/thPPyfjMwAK ZxaOPQNpsWk0kdStk2YQx8GDmviEWtQIXDjjc5zhQvz3hsctuciXLupvufm8AiJdww/W tZ8sqSx0bQzKWP5OQ2N+3C4DSKeHGmO8snzFq2HABWnCXbiOs/BcOQKfGo/jTk9fHRNq PbHX7GAbDPurXqLNvzK7D2sFpIVHYdl0KlNMSBNUmCAevP/NbJ1W2XRCE5qkYID+lNx2 1czg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj19si12171034ejb.291.2020.08.17.20.48.20; Mon, 17 Aug 2020 20:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbgHRDp3 (ORCPT + 99 others); Mon, 17 Aug 2020 23:45:29 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:44332 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726302AbgHRDp2 (ORCPT ); Mon, 17 Aug 2020 23:45:28 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 39F24E96411B170DCDAF; Tue, 18 Aug 2020 11:45:16 +0800 (CST) Received: from [10.174.178.63] (10.174.178.63) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Tue, 18 Aug 2020 11:45:07 +0800 Subject: Re: [PATCH] perf: arm-spe: Fix check error when synthesizing events To: Leo Yan CC: Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , James Clark , Mathieu Poirier , , Peter Zijlstra , Ingo Molnar , References: <20200724072628.35904-1-liwei391@huawei.com> <20200724083218.GA5185@leoy-ThinkPad-X240s> From: "liwei (GF)" Message-ID: <5e77ab6d-eccf-d7fa-bafa-d2077c949dc4@huawei.com> Date: Tue, 18 Aug 2020 11:45:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0 MIME-Version: 1.0 In-Reply-To: <20200724083218.GA5185@leoy-ThinkPad-X240s> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.63] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping... On 2020/7/24 16:32, Leo Yan wrote: > Hi Wei, > > On Fri, Jul 24, 2020 at 03:26:28PM +0800, Wei Li wrote: >> In arm_spe_read_record(), when we are processing an events packet, >> 'decoder->packet.index' is the length of payload, which has been >> transformed in payloadlen(). So correct the check of 'idx'. >> >> Signed-off-by: Wei Li > > Good catch. I checked the ARMv8 ARM and the function payloadlen(), > can confirm the fixing is correct. > > Reviewed-by: Leo Yan > >> --- >> tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c >> index 302a14d0aca9..93e063f22be5 100644 >> --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c >> +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c >> @@ -182,15 +182,15 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder) >> if (payload & BIT(EV_TLB_ACCESS)) >> decoder->record.type |= ARM_SPE_TLB_ACCESS; >> >> - if ((idx == 1 || idx == 2 || idx == 3) && >> + if ((idx == 2 || idx == 4 || idx == 8) && >> (payload & BIT(EV_LLC_MISS))) >> decoder->record.type |= ARM_SPE_LLC_MISS; >> >> - if ((idx == 1 || idx == 2 || idx == 3) && >> + if ((idx == 2 || idx == 4 || idx == 8) && >> (payload & BIT(EV_LLC_ACCESS))) >> decoder->record.type |= ARM_SPE_LLC_ACCESS; >> >> - if ((idx == 1 || idx == 2 || idx == 3) && >> + if ((idx == 2 || idx == 4 || idx == 8) && >> (payload & BIT(EV_REMOTE_ACCESS))) >> decoder->record.type |= ARM_SPE_REMOTE_ACCESS; >> >> -- >> 2.17.1 >>