Message ID | 20230329111422.3693-1-mike.leach@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344438vqo; Wed, 29 Mar 2023 04:39:06 -0700 (PDT) X-Google-Smtp-Source: AKy350YZv99YCutFDaBgJsIavSXOw8CZaEmeqKP5Qk7WKz4Wfj92EHdBvj7TQlopdw6BAY9Oaq3q X-Received: by 2002:a17:907:d68f:b0:8c3:3439:24d9 with SMTP id wf15-20020a170907d68f00b008c3343924d9mr20489835ejc.24.1680089946141; Wed, 29 Mar 2023 04:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680089946; cv=none; d=google.com; s=arc-20160816; b=UXZdOMiFsO0cmQfUAYnJyddZs4Byq2IarUz1xDhTIT0aFws5fMmV2C+/wG/ujbj05I TMHbXqlQS4GCX2WDwhw1ebtSiuW6QbS3pYkhFiPNpvP6pBv4vfAXs0nC9Y659rw+E2EC X+xR+KPWQa1g5TZy5LbOGVCLiZl1suQz05iUE24LDHv//ot0ndcILv50E54phcyabj51 3UXlR/3iTzOzLiu9sgbQpKFDEboI0z3VWxG9mTBPLY6Fs8WLeiXGMt/iM6h1MM1geXup NPctig9dYceOAkkKtkOxHk0naUXzoIWw02Tu1uysph5iCIuOgKGywRVA5/XTLU6H7ShT jFAw== 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:dkim-signature; bh=kcF0vX8j8gqWH3Qe03F1mOXxKH3Dih4Bs0j11Tzpjbo=; b=oIWL0XzIyZjaRYENf3FJ1SJpcon+OX5eJCyHn5Et+QzWnXDiWVHw9GMbLbeLGFbPd6 xwkN9ApziJNCfAkwRhdxIOQBky/Y+n4yEK6bA4xKkaH+DnZTenPKRnlKadtlflKJeRdf ynox75Z/qJlS37vXW8IqIL3zRlZiOB1bypyV/QI4vyl6Qux6qKsvApQxlhz/3mB0KDSU fYDMfeibpMrBb7Jwq3SQMadt2xLUUMmL/ZJzxOd6jcHgYdlaCbZImUrZP/TeQ3Mr8KRM +4XsEWOBLq78/DLU4AIXQ0fGAobYlsmlmm1MbmBUrq7x7Nexv/4wihmhGbFV6drju1K9 SiXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CqtWfSA0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj8-20020a170906d78800b008b17853ac3dsi30520621ejb.801.2023.03.29.04.38.42; Wed, 29 Mar 2023 04:39:06 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=CqtWfSA0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbjC2LOa (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Wed, 29 Mar 2023 07:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjC2LO2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Mar 2023 07:14:28 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A9E53C3A for <linux-kernel@vger.kernel.org>; Wed, 29 Mar 2023 04:14:27 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id r11so15230652wrr.12 for <linux-kernel@vger.kernel.org>; Wed, 29 Mar 2023 04:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680088466; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kcF0vX8j8gqWH3Qe03F1mOXxKH3Dih4Bs0j11Tzpjbo=; b=CqtWfSA0HALwgFr3US5SPtV4WTVD8MrH6cLx8wHXzh3tnzeet1qd2KiWvrHn8n+GKb JeQiOhybZTrUMrETQIqsTgV6BXwYXaHKXuD6AjLcFnOlcpWau3a38xNF5aCj0d+Dgqal 787y/V5xfOmzgxeU9Nzwg0fP5pskAakWQFy2Qb+mVET7X5aX3RhaZS0iF2OeQIoZv/BP RixWO032QlUy7U6Mn9m5Ixm7jI+DggEFAtq/n5qucER7y9nsiaq7mm0nDf0twJrPry1W UOfKThT8RaimVyatAY882OCvpRQs6PKPcS1PD11H7Yc70EpdpLaYigt0aUEj9+zVB8Ft Y4tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680088466; 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=kcF0vX8j8gqWH3Qe03F1mOXxKH3Dih4Bs0j11Tzpjbo=; b=MoZLgDpbwXvFQfpiMD05fFuu+hZLthyzlddd8duQy08oxb9+oYSmpTwwhfAVUtCOXt aIHCGxSyAXDN5Fcxfx23CN2LYC7FyMy8cYupcgCAs/HyN1qsy0LT6wP7y2+GiVkuNh1O mDINv6lpVwAortFEirfmFMYCrLqClxmN1JgwKJ0LsdpysGSc4Cq59W4pKCOmac+qV6Bh +5rmV05u1qloccarwbNmS/OgnAnfrtcY5szS+PHs7enDCpq6crn0lqrdBlTgQ/H5KDrG e28goJOXHqWheRkx2bh1vfMbJ4UDL56gVoDKv3VaPoHqmm0tXLRikjMWHFUDrBxYGox4 rSqA== X-Gm-Message-State: AAQBX9dcpsNluZX4VVwVngh5gkxF5jCm0lkL+M3X511L59GxqsZHUQKl HzdG3lxk1geuv+eZV87KmNG5aw== X-Received: by 2002:adf:e242:0:b0:2cf:e15b:c1c5 with SMTP id bl2-20020adfe242000000b002cfe15bc1c5mr14341071wrb.22.1680088465952; Wed, 29 Mar 2023 04:14:25 -0700 (PDT) Received: from linaro.org (host86-131-79-192.range86-131.btcentralplus.com. [86.131.79.192]) by smtp.gmail.com with ESMTPSA id m6-20020a056000008600b002cde25fba30sm30067163wrx.1.2023.03.29.04.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 04:14:25 -0700 (PDT) From: Mike Leach <mike.leach@linaro.org> To: linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, acme@kernel.org, suzuki.poulose@arm.com Cc: leo.yan@linaro.org, peterz@infradead.org, mingo@redhat.com, will@kernel.org, john.garry@huawei.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, gankulkarni@os.amperecomputing.com, darren@os.amperecomputing.com, Mike Leach <mike.leach@linaro.org> Subject: [PATCH v8 0/3] perf: cs-etm: Update perf to handle new Coresight Trace ID Date: Wed, 29 Mar 2023 12:14:19 +0100 Message-Id: <20230329111422.3693-1-mike.leach@linaro.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761701857927366309?= X-GMAIL-MSGID: =?utf-8?q?1761701995433210942?= |
Series |
perf: cs-etm: Update perf to handle new Coresight Trace ID
|
|
Message
Mike Leach
March 29, 2023, 11:14 a.m. UTC
The original method for allocating trace source ID values to sources was to use a fixed algorithm for CPU based sources of (cpu_num * 2 + 0x10). The STM was allocated ID 0x1. This mechanism is broken for systems with more than 47 cores. The kernel related patches the provide a fixed Trace ID allocation mechanism are now upstreamed. This patchset updates the perf code to handle the changes to the trace ID notification mechanism that now uses the PERF_RECORD_AUX_OUTPUT_HW_ID packet to set Trace ID in the perf ETM decoders. Applies to perf/core Changes since v7: Split from original patchset [1] to be sent separately as kernel related patches are now upstream. [1] https://lore.kernel.org/linux-arm-kernel/20230116124928.5440-1-mike.leach@linaro.org/ Mike Leach (3): perf: cs-etm: Move mapping of Trace ID and cpu into helper function perf: cs-etm: Update record event to use new Trace ID protocol perf: cs-etm: Handle PERF_RECORD_AUX_OUTPUT_HW_ID packet tools/include/linux/coresight-pmu.h | 47 ++- tools/perf/arch/arm/util/cs-etm.c | 21 +- .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 7 + tools/perf/util/cs-etm.c | 326 +++++++++++++++--- tools/perf/util/cs-etm.h | 14 +- 5 files changed, 350 insertions(+), 65 deletions(-)