Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp446867rwl; Wed, 29 Mar 2023 04:20:44 -0700 (PDT) X-Google-Smtp-Source: AKy350YX24kp00eYPFHj4vyI4OIVh5JCwj5YSDxYJ0bx42JZ2X3Xt0aL3Vvvkbua4bmUdKNTAogU X-Received: by 2002:a17:90b:4f48:b0:23a:87d1:9586 with SMTP id pj8-20020a17090b4f4800b0023a87d19586mr19861406pjb.23.1680088843681; Wed, 29 Mar 2023 04:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680088843; cv=none; d=google.com; s=arc-20160816; b=nYYX1fTajc9MWS+2gLsz4trISrdwJB+DF+1SDC4X8VNFa1fLL/gzzQm9KPQ+WEnWAi Df/atRzvcHaXpt7jtgNoU+adbl2d9NRtCSm15lySn1MlWo1WkSsLMBJbmNnJ4tWcCVUX g11Oki+rXOitHwei83wK5YMYxWUAkVpo4I5K49qCrDoGwg8CNL2aLjS1ngkvbsc45iFw qJ+JyrliQ6IGC8ernNP1jsio0wMKtsgXOt8+Q39Wca12o+5YGr6ZyF+IUZAi8rlPl70M FWf0aVBRTI3IvOdJTM5TUn6HZnOCbdWNkR+OtG/iE980PBWiHZfsRMXKvMgwz5l/AM4S V+fQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go14-20020a17090b03ce00b0023e4bc7272dsi1243185pjb.171.2023.03.29.04.20.32; Wed, 29 Mar 2023 04:20:43 -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 S229543AbjC2LOa (ORCPT + 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 ); 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 ; Wed, 29 Mar 2023 04:14:27 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id r11so15230652wrr.12 for ; 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 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.32.0