Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp222264pxb; Fri, 15 Jan 2021 11:16:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiVRkKytJJnrCGSx28Y/APFKRImjP4fulykFRNc3u/NmSejD+QLYcaUjlQU6rw1F9OjoK0 X-Received: by 2002:a17:906:14ce:: with SMTP id y14mr621836ejc.366.1610738186257; Fri, 15 Jan 2021 11:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610738186; cv=none; d=google.com; s=arc-20160816; b=K+66JTh9HwT39kp+wICDMw83J3bRYG2wv5RP4iupFZJrMYmyvgkToKDX2KFGMBsfmQ Yr8/S2kk3T5GciUABlD8of2KvpE7jVdkrVdgQ6m6MpPQAcG4Nfs3Ae/shKm8/6IklAnb eoXfPER7AWst223p1iG/c2uVkMqZ8RBSJjRMrCeAZwmMH1WGso9vhukFHXeZffcaUCSS MVi7z0IfgHUXPfsW4lUH03LFTOXaTE0biSXhuM0tkq99gszKb3odQvGBfg3n9DETg7WL BZU7NgGMjhuA4EffbX5Hd16E31rUVRfMGELOcA/upDA3Q0GV0oRZswM+skVP0FQtkjzD l1HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IVedqcv3WoVPYMDZbzhBkpMqbWr911GgiHAcmYH11LA=; b=oRBJbexBeHNaexVr3noSULxkdS+a7Ejp2Elf+xoYVZs0vVr1vrP8wDWY2bTVA72nmK fHtcwuHRYVSnVlVhuHd0lSBOrue9qsGTLy2uIYxqYGKf3LEXXo9VSiPlRvC86AfW0wcr Qgwl8SIF7tAa+1Rpa3c1Bh00L8MK05/RNoYFpcKFBxLM69bSzPuOwaj3eHyZrqVwK8ZD X5Nu7GAQGFUujkMKJ7sMMRRNdjjVJm5FaahQgkxowVM8R/EyAbaLYadoBM5kByOySIbf lQ6B9sT4s0HWJfhgGZ719RZt51N0TJQteHmSQuILBBgHwa4g3MuCCJz11uYDPLZSglqe oCVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ddu+24lB; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o25si2940082ejg.728.2021.01.15.11.16.00; Fri, 15 Jan 2021 11:16:26 -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=@kernel.org header.s=k20201202 header.b=ddu+24lB; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387715AbhAOTOA (ORCPT + 99 others); Fri, 15 Jan 2021 14:14:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:58164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbhAOTN7 (ORCPT ); Fri, 15 Jan 2021 14:13:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B25E221E2; Fri, 15 Jan 2021 19:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610737998; bh=A2eqb8T20Y6jSWc/cz8kQLpsS8QVL+nK+0r2QTHPUGU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ddu+24lBaZf5eCsNh6XtFqizn/1kvji6j71ds8PvDtktFtDMXc+AqBe0KRJkOG+3Q PwZcBW3zTYotoCfh54kSWEeZwfHlTLfdW3f8qNASMVuDgl0RvJ1o6wceIJHIipnGuk 5xh6jXrqEX3MIkyqedVdRY39J3VpW1C7jDoYoTCG31+zyGcGQacmUKR89ZPLM9JJHE 9+tkHlnDM94kWJ/108Uipt8+JSmVP7MNbHKBpp22vkIblPmhsRl+ZJdRNqQVyMS+Tt GB3guPsWPNjqJteDQ+nyoBNqm34XpOY7Vl3O820inMv7TE+nLyAcJDOnskNxkFYJ3V lNyYcaKF6A81g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 3A54B40522; Fri, 15 Jan 2021 16:13:51 -0300 (-03) Date: Fri, 15 Jan 2021 16:13:51 -0300 From: Arnaldo Carvalho de Melo To: Mathieu Poirier Cc: James Clark , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, coresight@lists.linaro.org, John Garry , Will Deacon , Leo Yan , Suzuki K Poulose , Mike Leach , Al Grant , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: Re: [PATCH] perf tools: Update OpenCSD to v1.0.0 Message-ID: <20210115191351.GF457607@kernel.org> References: <20210108142752.27872-1-james.clark@arm.com> <20210111165604.GA144935@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210111165604.GA144935@xps15> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jan 11, 2021 at 09:56:04AM -0700, Mathieu Poirier escreveu: > On Fri, Jan 08, 2021 at 04:27:52PM +0200, 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; > > Reviewed-by: Mathieu Poirier > > Arnaldo please consider. Thanks, applied. - Arnaldo