From patchwork Thu Sep 5 10:50:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13792150 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 2DAE3CD5BA6 for ; Thu, 5 Sep 2024 10:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=yrDjMdMGpsV+SMiDpPkaWCXT3mQwpYh4u8w/BLX87is=; b=2V/oLsJ8f+u8n8YkzD1J/aKrfP JZe7DHicu4m8mEpEjABx3ZpMma/jesFl5AEE/BfViinxhKSxhjvVNIZwWoU/qD19RGRvaUv6gzp97 jf0uoDh0xKef0lIXFgTAFhBLjTS3PjAIkGhH0lqLWHLwuSbah33z7BHXwg/08fPqBctO7KeqLORUA CjMWtkgkJa0eR+k0YkIBcX1hbm5nYO4f0WQYpR/Yx06nXrAgIxqy+7myQeWa/e6I3quZJ9cgA16ZC cg6AhEojvYT6ZN9beXwmRJx5zHriqUyIzhQW41hgsBMMdYiBtqUHkYRytp7sLYs/0/O4386D06ed1 ptjElAsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smA5z-000000081ds-0HNK; Thu, 05 Sep 2024 10:52:11 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smA4q-000000081JF-3FQo for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 10:51:09 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4280ca0791bso4704465e9.1 for ; Thu, 05 Sep 2024 03:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725533459; x=1726138259; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yrDjMdMGpsV+SMiDpPkaWCXT3mQwpYh4u8w/BLX87is=; b=Mzint+IZ8vJT5NfVR8fwHbnEeyS+CVwarYf7oTCNL0x+78Effb3ORMvFy5Sonw76yB EaKa8RJdsfddlVSQbSKSTw8jkYcVss5PBS7f+onKO1D1QhwFq6FVYNCQhB+dTZQmL34C H2F9jSG8fDqt1cZUHbfEEld9YNjblDiljay2vfgp05IJdv3kxYakelTeLl6OrvXgQOP0 Vln2aLeSx3OpcBVH4z1L5crt0isuqWhW9/Hq6fky5jWtlMz6Vy/dXgeq68mLqDZ3+Y1C /rumuDfJOCCGVm1Tw+gTEsygK4hNYnAAqod14YQMJnKlcoVb4PxXwH+VwlmG4pNv4eK8 UIiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725533459; x=1726138259; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yrDjMdMGpsV+SMiDpPkaWCXT3mQwpYh4u8w/BLX87is=; b=RiJuQzoi3fSj3kCJitTi8YxFnk6ZfWL1c9IlP11jK7wZs3zhLfDG/TJ/CnaiOWpofc 4nGMK6w7AK9EGb0lqOVMypr3cMX0Qi71XOD742lMPScqRyxhP20cY35Hl0EC//iEookA G9yfkibs4ZmSaM68iYfsJ53sdfsc+yx4EC28WAQat4WT96CUe01kAG4E0+UqFabcQorp mCLJdl5QAhTeBuiUJM3rtU3bAa2V41hhD0qa3GnWyTANLHGFM+cr8HDuvyX4kYEmGoi+ yeiwfXbVP81/r5A7N1NqXlJlAtf2NdrLYrwN+Inu8yur/3P9RtA/bXvSJ4EUu+mn6ejL ThjQ== X-Forwarded-Encrypted: i=1; AJvYcCVT8U/X9L31QXUYKgsHH4dJQVGDk+FOpbxto/7fvlz4u/rsbbFSTzre34LfqvN08Ac0kGrox4hkw4WjqFc1MysI@lists.infradead.org X-Gm-Message-State: AOJu0YxHBF9tdiV2TFfZwUojc/fvgw+oEdUz1y/Nsm87AH9rRMJm3hqm vwzBEjFv6hb/jsHPjzUUUxTebhgCuNtCPP4swvTbWw0s4wtMDYipOTWKbrtqL88= X-Google-Smtp-Source: AGHT+IE3NCEI/gXttimfIrTl8DkzUXfi3ncD+kozCZR22fME7/IdooTQv6dLJudGLUQpNATZJI5Jvw== X-Received: by 2002:a05:600c:19d2:b0:427:fa39:b0db with SMTP id 5b1f17b1804b1-42c8de9ddb6mr51601575e9.27.1725533458315; Thu, 05 Sep 2024 03:50:58 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6df0dbcsm231089965e9.17.2024.09.05.03.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 03:50:57 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, gankulkarni@os.amperecomputing.com, coresight@lists.linaro.org, leo.yan@arm.com, scclevenger@os.amperecomputing.com Cc: James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , "Liang, Kan" , Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Leo Yan , Ben Gainey , Ruidong Tian , Benjamin Gray , Mathieu Poirier , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/8] perf: cs-etm: Coresight decode and disassembly improvements Date: Thu, 5 Sep 2024 11:50:31 +0100 Message-Id: <20240905105043.160225-1-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_035100_824315_345E7A54 X-CRM114-Status: GOOD ( 12.11 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A set of changes that came out of the issues reported here [1]. * First 3 patches fix a decode bug in Perf and add support for new consistency checks in OpenCSD * The remaining ones make the disassembly script easier to test and use. This also involves adding a new Python binding to Perf to get a config value (perf_config_get()) [1]: https://lore.kernel.org/linux-arm-kernel/20240719092619.274730-1-gankulkarni@os.amperecomputing.com/ James Clark (8): perf cs-etm: Don't flush when packet_queue fills up perf cs-etm: Use new OpenCSD consistency checks perf cs-etm: Remove cs_etm__flush() perf scripting python: Add function to get a config value perf scripts python cs-etm: Update to use argparse perf scripts python cs-etm: Improve arguments perf scripts python cs-etm: Add start and stop arguments perf test: cs-etm: Test Coresight disassembly script .../perf/Documentation/perf-script-python.txt | 2 +- .../scripts/python/Perf-Trace-Util/Context.c | 11 ++ .../scripts/python/arm-cs-trace-disasm.py | 109 +++++++++++++----- .../tests/shell/test_arm_coresight_disasm.sh | 63 ++++++++++ tools/perf/util/config.c | 22 ++++ tools/perf/util/config.h | 1 + .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 7 +- tools/perf/util/cs-etm.c | 68 +---------- 8 files changed, 192 insertions(+), 91 deletions(-) create mode 100755 tools/perf/tests/shell/test_arm_coresight_disasm.sh