Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp342051pxb; Fri, 8 Jan 2021 06:30:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyy7oQIrNxAd7BQ+aPNQ0UdhmT+7fURixak6t38W07u9iuWmdNfDGxKwtzsHnXEdWNJqAeF X-Received: by 2002:a05:6402:46:: with SMTP id f6mr5428214edu.163.1610116205445; Fri, 08 Jan 2021 06:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610116205; cv=none; d=google.com; s=arc-20160816; b=zwQAD5eDgQ8jzQ20YWLroriLlHDsVR7Mv/xw4WLKbPDzMEnhSmTVLHDTHgliXLXOMa iyfl1dcwAnc0VTmZyLBXw+QKT5q1PDx6t/aXxgDS31nSEDK0iX0/JshCCnjsP6PZGbHc DNdNNSCfiaRdEXpk2O1Rmpb/Zk7JJ9oSRNgu4YQxtZMm5srm3cJPnFawXhJEmYlDNIDd vfgo7rR6e+nx1TPiiz+A2Mh1rp82Y33yEmHX7PMyz7oQN9FbJW3wkso4OE5bijQ+7tF+ 7OFJg8eujcuCIkhOPHbUBHQuTlrKMDlYmL83Gl7C8bIgDhm0ifL86MU918HrMQlBFPs9 s8rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=KEJ+TR6eWgEdHc2jHKxvfJqxpwtbzHDCvjYImJjc0JU=; b=t4wsu1YZ2krijYgUwyTzUl8DybFd+taLoCBss1vOyEkTSKUut2ozjVEAmJM/bpr8HH kMBOSuPjlhteYUw1ZjASNHy6mtivSuhrJQ77pQyiRpRr/NZR9v1vDCny1NOdxHc467qt c0sUzicWPgZW2xOLZyklVdmLOdpcRLgMRwpycek5UIqIjaejFXXvknYQ389Z11T0GvhO mwIlSJ5qvpHfPlkW3DKLCzuqfWirxQgp5lge2n5ZDFIov6G/XWtdEhMYcQdIxDs04RX1 GyQslLxlwtKMKulL03D2LLGOevIhIJ02f9K8ci3AC+yZJEPYv+exK7qUzwdG9bkOkJ6J L1YQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si3570179ejt.709.2021.01.08.06.29.40; Fri, 08 Jan 2021 06:30:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbhAHO2y (ORCPT + 99 others); Fri, 8 Jan 2021 09:28:54 -0500 Received: from foss.arm.com ([217.140.110.172]:52022 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbhAHO2x (ORCPT ); Fri, 8 Jan 2021 09:28:53 -0500 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 844F4ED1; Fri, 8 Jan 2021 06:28:07 -0800 (PST) Received: from e121896.arm.com (unknown [10.57.1.36]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 996B73F70D; Fri, 8 Jan 2021 06:28:03 -0800 (PST) From: James Clark To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, coresight@lists.linaro.org Cc: James Clark , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Suzuki K Poulose , Mike Leach , Al Grant , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: [PATCH] perf tools: Update OpenCSD to v1.0.0 Date: Fri, 8 Jan 2021 16:27:52 +0200 Message-Id: <20210108142752.27872-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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