Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp499621pxb; Fri, 8 Jan 2021 10:12:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXj9WwJ+ZUnPiwb6uqLoQgkPtiKwvvhtJOyVISivSKN/FDTU61/I3GIIFf2Ect5FU6JADP X-Received: by 2002:a17:906:b08f:: with SMTP id x15mr3551477ejy.36.1610129524215; Fri, 08 Jan 2021 10:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610129524; cv=none; d=google.com; s=arc-20160816; b=lFhSCiv815U+OqqxbBrERzG3Y2CFbWZg+kyEeA+hk1ezaFI5z1qhvd6OVoJXz/HrB5 /644Gd58fS4ucSVbvAiKeyGjjCYS5mgMO2UezwMPHQcVGu0LZYFCm7iaMaoiOnLmB3a3 ODLXOriOo3rBNCa0WmnfnlAgodYOnj6QKkX9Lx9unUBYjDeQ48P3LIxmmMwJW0xlITIr B4yyjMhBXgqIRsUXA8mc1up27GhgPLgfq3DxKQ8S5heb9DM/NLSAOwjAkp1q09OaQ39w 4WxjCZMflnUpbO9D9zftSzS+S4KDc0LmGwtZiTqOBvhMgAciinG05DLMldDr739sHykA T9fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2IbKiK/oN0P8hq8HD/CB7DWifHFW8YC+ivJjR0jmvkc=; b=aW2HqR9weFLD3kD+pgw76Sy3NSNKVoDK+7hT4Lpdog7mR/2MV5HWNJIXw2pRsLN7aJ /1VKuVHCaBNfWLfHbntRGqsVhregykIb6ZtNtU+rebQi/RXYolvmvnTdF7IRe1uO9B8V BigHPAksFLNzK4rDeFq3qEN+HzacSJaIJx9zzezfrysnSwanYl60IimO4QZQC0LtZPW0 j70Od2z+1IveMcokgwQVnMHY6CRTGD2fiiPSNfcyq5BeVJcpijFvtT5/uktteeh0CX4w HF4zgadSGr6hVgp8MAdxHiUuwNjEIFxj1TDg0cxGjyTaAgZYMY29lXhI1WYEzMcEKZa3 d/cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAoj70RM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si3826436edw.222.2021.01.08.10.11.30; Fri, 08 Jan 2021 10:12:04 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=VAoj70RM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728278AbhAHSKc (ORCPT + 99 others); Fri, 8 Jan 2021 13:10:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727910AbhAHSKb (ORCPT ); Fri, 8 Jan 2021 13:10:31 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD1BBC061380 for ; Fri, 8 Jan 2021 10:09:50 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id y17so9844112wrr.10 for ; Fri, 08 Jan 2021 10:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2IbKiK/oN0P8hq8HD/CB7DWifHFW8YC+ivJjR0jmvkc=; b=VAoj70RMoc94jq9LrcCZxLi50Lxghn26vl+q+0rOAk97j5kOpdskPxkV7YmBCZfW08 D/L3q0xOSeuUebbIoconytkgbYohn2Si43yUaqeoWx9VdC7hy7rK37RnIbv9iDfo7RKk XlK1QLxoQYzoUhmbjdfHPMiSMIBLwy96fqCG5M2evTPxcEp/OVLqFfjNMLa4quwGbQwV CPkA2sSyCVd4Tkarh2fBMIzi2GiUieQVirT2aX+SOGqeisZN0dxsvLRbTDtHVpoGKHw7 k1CKp1O8iBUoOrEQehTcMjrrTCZItE1j2DOMaUlbhih/9hijK2GLhoqLhUQoFQoIcvWF +e0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2IbKiK/oN0P8hq8HD/CB7DWifHFW8YC+ivJjR0jmvkc=; b=hgo5QsR8IEmNsY9WZEYB4McQrjIKqxKXc+XWiR+1cjTMhEoukenqwHOfFmxcm5a0cV /RWrk28Ke1alMHLHivA2c/NOWryn8+yC8ESGb1hKVdjVuoQT1AfNM1KhDZLDCyKEL9RT PIPxSMhKeXzoR310SgzDBATy6ZB6qF2Ufnpx3KRtLUKPmNxYmlWqw4P2v1B2glFNYjhc tMYf1ijKM6DWhME6cb9O+nK4nuq4u/ei4xXot6/IuZILgHUzcB5DBqK4llPDrGOfgs2M Xs3yaxu7L0OB1x1/dFnR1I3VXQYNOkAOMaMXyxCCpt3W5WC7nYG8Hk1f3CXHnC0sUyyB mk3A== X-Gm-Message-State: AOAM5312UV7rmKfMMv8d9H1XNpFO7JkhNOFJCt7QbNmqD+5uICxgYr6G J1e4QMvk1h4gp3QnNjGxHnGzzQwJ2UDPAThWZ8grBQ== X-Received: by 2002:a5d:4587:: with SMTP id p7mr4671668wrq.178.1610129389412; Fri, 08 Jan 2021 10:09:49 -0800 (PST) MIME-Version: 1.0 References: <20210108142752.27872-1-james.clark@arm.com> In-Reply-To: <20210108142752.27872-1-james.clark@arm.com> From: Mike Leach Date: Fri, 8 Jan 2021 18:09:38 +0000 Message-ID: Subject: Re: [PATCH] perf tools: Update OpenCSD to v1.0.0 To: James Clark Cc: linux-arm-kernel , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org, Coresight ML , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Suzuki K Poulose , Al Grant , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, I have tested this with OpenCSD v1.0.0 + Linux 5.11-rc2. Reviewed-by: Mike Leach Tested-by: Mike Leach On Fri, 8 Jan 2021 at 14:28, James Clark wrote: > > Replace the OCSD_INSTR switch statement with an if to > fix compilation error about unhandled values and avoid > this issue again in the future. > > Add new OCSD_GEN_TRC_ELEM_SYNC_MARKER and > OCSD_GEN_TRC_ELEM_MEMTRANS enum values to fix unhandled > value compilation error. Currently they are ignored. > > Increase the minimum version number to v1.0.0 now > that new enum values are used that are only present > in this version. > > Signed-off-by: James Clark > Cc: John Garry > Cc: Will Deacon > Cc: Mathieu Poirier > Cc: Leo Yan > Cc: Suzuki K Poulose > Cc: Mike Leach > Cc: Al Grant > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > --- > tools/build/feature/test-libopencsd.c | 4 ++-- > tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 15 ++++----------- > 2 files changed, 6 insertions(+), 13 deletions(-) > > diff --git a/tools/build/feature/test-libopencsd.c b/tools/build/feature/test-libopencsd.c > index 1547bc2c0950..52c790b0317b 100644 > --- a/tools/build/feature/test-libopencsd.c > +++ b/tools/build/feature/test-libopencsd.c > @@ -4,9 +4,9 @@ > /* > * Check OpenCSD library version is sufficient to provide required features > */ > -#define OCSD_MIN_VER ((0 << 16) | (14 << 8) | (0)) > +#define OCSD_MIN_VER ((1 << 16) | (0 << 8) | (0)) > #if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER) > -#error "OpenCSD >= 0.14.0 is required" > +#error "OpenCSD >= 1.0.0 is required" > #endif > > int main(void) > diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > index cd007cc9c283..3f4bc4050477 100644 > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > @@ -419,19 +419,10 @@ cs_etm_decoder__buffer_range(struct cs_etm_queue *etmq, > packet->last_instr_subtype = elem->last_i_subtype; > packet->last_instr_cond = elem->last_instr_cond; > > - switch (elem->last_i_type) { > - case OCSD_INSTR_BR: > - case OCSD_INSTR_BR_INDIRECT: > + if (elem->last_i_type == OCSD_INSTR_BR || elem->last_i_type == OCSD_INSTR_BR_INDIRECT) > packet->last_instr_taken_branch = elem->last_instr_exec; > - break; > - case OCSD_INSTR_ISB: > - case OCSD_INSTR_DSB_DMB: > - case OCSD_INSTR_WFI_WFE: > - case OCSD_INSTR_OTHER: > - default: > + else > packet->last_instr_taken_branch = false; > - break; > - } > > packet->last_instr_size = elem->last_instr_sz; > > @@ -572,6 +563,8 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( > case OCSD_GEN_TRC_ELEM_EVENT: > case OCSD_GEN_TRC_ELEM_SWTRACE: > case OCSD_GEN_TRC_ELEM_CUSTOM: > + case OCSD_GEN_TRC_ELEM_SYNC_MARKER: > + case OCSD_GEN_TRC_ELEM_MEMTRANS: > default: > break; > } > -- > 2.28.0 > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK