From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C87832D425 for ; Mon, 1 Dec 2025 16:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764607306; cv=none; b=sDP34Pby6swnaGU5vjvSEq3Qv5gfqhtzzinasqRcqwpP1FJ+XaPeSjVQR6JQNFOW5wr3C0x6A4VUZahbZKJ52J32lWrIBAxnrMLin8ZJZlVYagkgSnkqbqJ++1wQnXpKdXpmrR1NmXKVo1/WHUt/mB6nF0FM6MQh/hhxHsCmJXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764607306; c=relaxed/simple; bh=huoMrzKi9FJ3Vo39sk52zs8CDdRM/kZ4vA9UXght7ko=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=tx8yX095OPRX6PsS/QaXJQt15ixsrrFQXwpRv5vHBxc8VjaZOUFzZwWd1qLJ4KNfIrXoZfJWEptrj3c6qJCU0LNReg3uOXgacxbebJ7PInPntnGzEme2kMkNS4m+c/Cj3sefP4fyX++3tLu9peUJe9JV561PKF5NbMxYGtFMDmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=R39c6Vhb; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="R39c6Vhb" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-477a219dbcaso39875025e9.3 for ; Mon, 01 Dec 2025 08:41:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764607303; x=1765212103; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=X8CXO9OJfojSeFF+UUsnSSZI1P/+BX3oz+61rBzG6wc=; b=R39c6VhbzyOQ4ePC+qgsvlfxYugKIQe17NbcvtXk+1WpPWGm5yeEooORzb0DjjdB4J 1yhLFdeyOOVXgqPWrv1O9ZnvxWi/6zEdlwt0ZjjNJ+3+rZx3JbnDu1hY2o7VaRJ7mDHg +FitHFTB9kMOf4Z9/WeGj1sTofigRh5H8pKzdMJRPIVwDfZ2MwKA/9mgG2r6O9eIDoMg rUbHb5Mzuc5bPu88zIhyjP4BGjM3MMmT8HYldpKwfbyzLOXwM2r8p94p38/0G7X1rVr4 Y7Z7oZRMFnPW18foNqvqXT99OZVerzd0aza0z9nJnF+6bw//Q2Lx+F0cT65lREJuxmwL IU3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764607303; x=1765212103; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X8CXO9OJfojSeFF+UUsnSSZI1P/+BX3oz+61rBzG6wc=; b=gU3UL43EL3ue065zkF0w1BBX0ATj1y9jv8WmLBqp/Fq+p3P4deTC9GR0yeWrGoirF0 zqVRaw92Xil0vpIqItrkqGc4/QnGl7oioCqIMdHqAgYCFv/pvrYUct/2LHVloKJQQB0s zFE+NLn91B4glgK1ra1Kk65ytzTbG3XX4qIMepJdX1ss4hF13wJKOGp9JXXnkXDU4On8 T5Kdr3BFSLiVC0CT37+cmUGUNB7ZFvBC+zTnq1tyVM4E9C/55aon7eEALDuZPd0BDHCq glCLkwEVzDYW9axmkDxGREDUVh4NalefJE47DXQeQHzejA4wCP8MsEfesO9Q602y/laJ xEPA== X-Forwarded-Encrypted: i=1; AJvYcCUlSbNB5d8uqdMcYkh/qR39Lw4fB2KxHhbpofblhbXAMRO8znbUEKcWKF2cZ9TdovZ4zZu9HIcRUqvDm3U=@vger.kernel.org X-Gm-Message-State: AOJu0YwoqtRghAC6SNcLN5KfIuZwOngNtfOxlfzPFcCGaYIr4f9mU/bN RLOA6pdlKkk9osRBz1FuxVghs15cU8Ghof1YVyo1FC1MnL7DtEcajdBZ+tbk6TRUmzI= X-Gm-Gg: ASbGncsfu4oeZcYqeDG9SKyGs786qqzrCXXNC3tnPajRj21+UrL06sFoBLfTIRze4Xb TaC0LVO1zyYbpCCt07+DpQlWQSb392MXbyenOtNQrbAJuNkklRHMJm+Y0zRSx+tRl1zf0BtLCby DkdBt67YBel6YYp7l+/yDfgN+d/COaJUd8JhT0Tn+r/rmmybHXYTB5eAknz22NXQXWDeziElJSG 3Rc4+4Wf6s1vIKO7FV+sX2BeeMb+uGTHjBHulMduY3FzJ/09RULWGANpd2p6G2IS8ixEbmpvngi OcnEa309Th0A74zfGXoUqJGKGRWr/5vmYv1RB65XdU6xMDnAuYeAJ/o1EqhhcyrT8N+f/gG1gEq 5RW+3sbGlazEv8xe5X5pZ/Yo9uo5esflj+g42VaGra23GudKDw5P+LMDhB9IA7Y7XAeJRz4eMBP kpmSSsNrgGznZ8VBPsIkuN X-Google-Smtp-Source: AGHT+IFpklz6cl1AMJUqVSGcZRb3Pn6NfQxw4c1mN9dYuQ9p6NjC0krJoPGjNKaFKqqo6n/s5CfyHA== X-Received: by 2002:a05:600c:3595:b0:477:755b:5587 with SMTP id 5b1f17b1804b1-477c0184b34mr418552785e9.8.1764607302915; Mon, 01 Dec 2025 08:41:42 -0800 (PST) Received: from ho-tower-lan.lan ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4791164d4f3sm255901275e9.13.2025.12.01.08.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 08:41:42 -0800 (PST) From: James Clark Subject: [PATCH 0/7] perf cs-etm/arm-spe: Remove hard coded config fields Date: Mon, 01 Dec 2025 16:41:03 +0000 Message-Id: <20251201-james-perf-config-bits-v1-0-22ecbbf8007c@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAB/FLWkC/x3MQQqDQAxG4atI1gaSgVrwKqULtX80BUeZFCmId +/Q5bd476RAcQT1zUkFh4dvuULbhqZlyDPYX9WUJN1UNfF7WBG8oxhPWzafefRP8AjcVToTE6E a7wXm3//48byuH8jI9ZRoAAAA To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Suzuki K Poulose , Mike Leach , John Garry , Will Deacon , Leo Yan Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, James Clark X-Mailer: b4 0.14.0 The specific config field that an event format attribute is in is consistently hard coded, even though the API is supposed to be that the driver publishes the config field name. To stop this pattern from being copy pasted and causing problems in the future, replace them all with calls to a new helper that returns the value that a user set. The existing evsel__set_config_if_unset() also has a similar problem that it hard codes attr.config, so fix that too. There are no functional changes here because all the fields touched are in attr.config and not config1 or config2 etc. Although this may not be the case for new fields. Signed-off-by: James Clark --- James Clark (7): perf tools: Track all user changed config bits perf tools: apply evsel__set_config_if_unset() to all config fields perf cs-etm: Make a helper to find the Coresight evsel perf cs-etm: Don't use hard coded config bits when setting up ETMCR perf cs-etm: Don't use hard coded config bits when setting up TRCCONFIGR perf cs-etm: Don't hard code config attribute when configuring the event perf arm-spe: Don't hard code config attribute tools/perf/arch/arm/util/cs-etm.c | 202 ++++++++++++++++++++--------------- tools/perf/arch/arm64/util/arm-spe.c | 15 +-- tools/perf/util/evsel.c | 6 +- tools/perf/util/evsel.h | 2 + tools/perf/util/evsel_config.h | 6 +- tools/perf/util/parse-events.c | 89 +++++++-------- tools/perf/util/pmu.c | 93 +++++++++++++--- 7 files changed, 251 insertions(+), 162 deletions(-) --- base-commit: 834ebb5678d75d844f5d4f44ede78724d8c96630 change-id: 20251112-james-perf-config-bits-bee7106f0f00 Best regards, -- James Clark