Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2860380rwb; Fri, 20 Jan 2023 08:12:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXs7Nd320D1TTGkFuK5SsbMDFch0mfiFRYPyXZOD9hQq9k62C0iMo/nEovqJ4SVNHCyUQakQ X-Received: by 2002:a05:6402:3227:b0:499:b415:bb27 with SMTP id g39-20020a056402322700b00499b415bb27mr17277691eda.4.1674231167350; Fri, 20 Jan 2023 08:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674231167; cv=none; d=google.com; s=arc-20160816; b=JsE1A9RB0VzrmnO3u509wTrIGnPtAaUqL4x4YcujgnVOiTbGQPnR8A5m8L6EXxxuGX 0CCbZ6ZLRhy+BvcONidWL05EoubJ20iXdXotI6G4v4VnGD6/TES5W3EDZ6XypwIaMUIs tO6Zdy6N3pDm935VcXgII3cWJaLgNiLT7IEzrwkxjHBzx+JPQ2IM9rlmnISOli1D+Tao RwzD4dytbtA6Ai0qQtvFiUzVh7kWnr8YvxswFSTqddWsB9x/my3MdE1V+VPuxN44WhQY n74cSUr1W5nnrBfSJpkPBNcztxPht4ruIqNtONY4uYQAkZqDjvPuQT6P2CiU06/AQGz0 uTLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=PZwTJmW4NPmpP0QzDpCXPPH0RhObP5iIDTqJfpqsNXs=; b=OiCWqACd9uuSjBRY3CGZZJGWgsxKSEzJvub4xcKpjXnTfSbnrhz25vDNfcZPqtgNRU TkBGa9c5dspT6jkARfjtRpUZPHuJdmnfZATLLUr5WxTsFax83HaSpUT3b9u7WpclA7pm uFHeKi7xEAxilkfk/OixobV8r9kHkoLnX6UpuJHfBBvaWaHKGlOkESxGnQs/SBwSkJLQ I7vZyIDtnDUyrtpsKfxgvHZb+xew0clMKEMDmTxpBsmTMAfPrMuk/mD9Ym7uJxfqUykT EzCu5NIcihyGJ6E+KtiKtPJUKsstbdYSAuGeofvpuFNXfDezyXBet+M915rr/dsmX/Ct kUrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q33-20020a05640224a100b0049d10e17d69si10474350eda.429.2023.01.20.08.12.34; Fri, 20 Jan 2023 08:12:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbjATPrJ (ORCPT + 50 others); Fri, 20 Jan 2023 10:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbjATPrI (ORCPT ); Fri, 20 Jan 2023 10:47:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 878A89749; Fri, 20 Jan 2023 07:47:07 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ABCF814BF; Fri, 20 Jan 2023 07:47:48 -0800 (PST) Received: from [10.57.47.220] (unknown [10.57.47.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A4C23F67D; Fri, 20 Jan 2023 07:47:05 -0800 (PST) Message-ID: <77f9eab5-4fb2-cf96-9628-2a816d519d61@arm.com> Date: Fri, 20 Jan 2023 15:47:03 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] perf: cs-etm: Update decoder code for OpenCSD version 1.4 Content-Language: en-US To: Mike Leach , linux-perf-users@vger.kernel.org Cc: acme@kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org References: <20230120153706.20388-1-mike.leach@linaro.org> From: James Clark In-Reply-To: <20230120153706.20388-1-mike.leach@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/01/2023 15:37, Mike Leach wrote: > OpenCSD version 1.4 is released with support for FEAT_ITE. > This adds a new packet type, with associated output element ID in > the packet type enum - OCSD_GEN_TRC_ELEM_INSTRUMENTATION. > > As we just ignore this packet in perf, add to the switch statement > to avoid the "enum not handled in switch error", but conditionally > so as not to break the perf build for older OpenCSD installations. > > Signed-off-by: Mike Leach > --- > tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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 fa3aa9c0fb2e..48e7121880a9 100644 > --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c > @@ -604,6 +604,9 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( > case OCSD_GEN_TRC_ELEM_CUSTOM: > case OCSD_GEN_TRC_ELEM_SYNC_MARKER: > case OCSD_GEN_TRC_ELEM_MEMTRANS: > +#if (OCSD_VER_NUM >= 0x010400) > + case OCSD_GEN_TRC_ELEM_INSTRUMENTATION: > +#endif > default: > break; > } Checked the build with both old and new versions of OpenCSD and it's ok: Reviewed-by: James Clark