From patchwork Fri Jan 20 15:37:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Leach X-Patchwork-Id: 13110108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4D06C27C7C for ; Fri, 20 Jan 2023 15:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TJLOyl6X+LtlJyGPSWCCp+jDb59U65dWgJilQfE7SPo=; b=ZHJP8tIQiP/zxT 6UBbsXxsdJHqI1K6gEfVTckVhiBZRBZNBEXRvhTRZeUf/az9yVnGuGobQmGPQfptyWrdJ5DMfZwfh 28Oq+HkVv99rcowkVNesdiMqjvRApHe72KFtv8g7uNNTkig5gFDfcGtj+QDqeWB/oOCp361sBps08 FgV2+3xSIyJ+Bc1CinTjGdKqi9dFijmr6th1jVkCt217oTD+PeLFCbsAi3iXF4qEn5G1vgCTyzmX1 DH5lEzPwpo1YzDou5Q4T7U+YP7Bq0XUf7eVwoMEpnru5TgJ2s5qSb0vmxcmpttsIANrjZqZzTFO48 aiQu/0zNKlwY2C7/Ni3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pItS9-00B1RU-47; Fri, 20 Jan 2023 15:37:17 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pItS5-00B1Pb-O8 for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 15:37:15 +0000 Received: by mail-wr1-x436.google.com with SMTP id h12so1196636wrv.10 for ; Fri, 20 Jan 2023 07:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cftWnAmLp1SAzK+LEC+VkfIJXP3yn4XV5OF+VxxmSEI=; b=kehQTJmy06GF73Jk4gupKe+iWEBSAOLIlh+im1CqYyRHgwYZcbshJUPBfo72NL2LAd SLtSL0YWsl7BzjCrReChO3QJdVuU+6VCQP2yXD+UC2XIgu4L2cfaSb00D4h26H7FjZ1R ShBO5E9s4ISWQZzZYOx93qA1eVZPYMQTfLrMk3WozQqhIO0ZwTZiBsKePs9hL6qWo5LD WsaOhLeRTc2YqX6diZLb59zkH3S+py+QjDuizqXsGKvCv9cFAQyf1l9tQMJmlHCtTzNu ienzRpqA5wUeZ/1B2roxwgRvvX8PZrY/fWWZ01bC4YdTC9stVMa7pZ+uZhVPAnc15d8j J95Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cftWnAmLp1SAzK+LEC+VkfIJXP3yn4XV5OF+VxxmSEI=; b=vmIwlBVlniCBTBObjBLvZ4oOKTcdEmJBZvFZxrxLqruQJZ8ZC8ZQ8hl/rKEB7ePy00 5YYFmQYp/ARjy/e5U5jQ0BP+Roaq+MKnex/kMwDcVjxdI50ZttWQAxnPxPPSEuYQeAF8 POWldhAjnOUx8ClknrYj8TFE/fl4Yr+t+RjEU3ttaiRtOYD6fHnvmUbPe7wlSthGDsI8 A0CefNBfKYTejoZYiHO7olL3Hbe0L7hNEEwFTlCN/f73dLvTAxyeJmEd9lWu9vr4HDjc t4jLPlkAQKW2JmW8kAbInIVGDOX9KbOXwvQszwb5pTyZqeuGhxXw2JgA8adCBjSScumh X2hQ== X-Gm-Message-State: AFqh2koV8X4Dju2bXdifP/+xkVsteagmonox4y/VwbQcIbe2LaHGcajE S4UScCdzcMydxD5nB60xkeSRjQ== X-Google-Smtp-Source: AMrXdXt5CVI6en+fALH4TA94NWNVBKOXDQkJFNKnLrn1CAOecTTxtMpPgS5gk3DiOQ5A4gVDQE6s4Q== X-Received: by 2002:adf:a485:0:b0:2bf:81eb:dc26 with SMTP id g5-20020adfa485000000b002bf81ebdc26mr1311316wrb.37.1674229029690; Fri, 20 Jan 2023 07:37:09 -0800 (PST) Received: from linaro.org ([2a00:23c5:6809:2201:a9b1:8068:4297:73be]) by smtp.gmail.com with ESMTPSA id b16-20020adff910000000b002bdf8dd6a8bsm14212460wrr.80.2023.01.20.07.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 07:37:08 -0800 (PST) From: Mike Leach To: linux-perf-users@vger.kernel.org Cc: acme@kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, leo.yan@linaro.org, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, 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, Mike Leach Subject: [PATCH] perf: cs-etm: Update decoder code for OpenCSD version 1.4 Date: Fri, 20 Jan 2023 15:37:06 +0000 Message-Id: <20230120153706.20388-1-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230120_073713_820895_25E835A2 X-CRM114-Status: GOOD ( 10.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: James Clark Acked-by: Ian Rogers --- 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; }