From nobody Sun Feb 8 04:15:12 2026 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 D7258171C9 for ; Mon, 10 Nov 2025 01:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738376; cv=none; b=Wp/U1yR1xmwvBL+6o85Xg+eIpfrcgtPbcv36Yt3GOVcxBHnSB002qjPUvwM9eSlLct5MODHdplpnV0RAfc+JSIHwoKrpa5gpdATKe9O4FKP/jsoS33hYmjf+SGhNZFekwsbw2r7pJtphTVVSJ86wqEi389+XSTNoMNqsSTNU8Bw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738376; c=relaxed/simple; bh=DRtl76zg9aNmLA1hizzZeGzHlOhcwzKDdt7h4eomINQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=cQ/xIk6fhcpVcDC5hJYVjeMMmzKEJ7KW2WGAAcmRyzp4BKVa8NC2MxUvdeNi1tVLwwV9QBOFDSdGNrklvCidqgd1VDbYDqoFRdoUV9p6k8DXYJL6biupf8cUAQNF7UXwGGJzgOU7LBxNVU9h2V0fnJFxQ3LyGTeW6m6mOSRzkUg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=s/49uz+4; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="s/49uz+4" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-297df52c960so44835435ad.1 for ; Sun, 09 Nov 2025 17:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762738374; x=1763343174; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=SQaN0dmrxTGK2FKPY285ZdcIP3sq0JzMu0hYDJFJ/ek=; b=s/49uz+40QwnSowJrvVqiHTHT02X3HrtZJEcdpujI2nKjbYrNbE4vJz++lUkYVoAfx MztXgp6sNSj4BtJ92VkQc87nKEoWYgNWtlPnV0MkeYX2dq3wguDAdA3NCTcE53Gx4e8W R9mCVOn9vGYPSBxjNFKf6i1Fxkq0Ww8WrNPro99Dttr7tB5CKxMpexIQRu6D7wpPrdTS 3R5p7wEUB4CxUsn0SjGg9+0gpoe2kYRY5OLEpleTVLsRNSfOex2z/0ELbaxOhNeW0Exu cLIoi++2egVBPkEF4Zk6qkGwKtEdSukWSXq/KDBJSVSSIul2MSawsm3BE74AkienbDO5 oxRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762738374; x=1763343174; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SQaN0dmrxTGK2FKPY285ZdcIP3sq0JzMu0hYDJFJ/ek=; b=MyHEKIuRaA+/9dbmdEwoDfYsl3oJdfnpNTbNU7qkAlnQHJCXTiOdv/lSWfMEGSdCS6 hoHo6nZ0QBCJMs+xXTBGlsRsrg1CjyHstygq0iSzjwbFoQwWVpAW+hJvu96HRhaUCGac xKQKxTG80coMtyTV5g0zrGhRcm5HCif3N78wd0K7qZdhpg8kxYbz8mqs++KhuERMYAe7 P7NKDWqZNQuVgKuRs0G0TqiDuU8Hsp0twty30lFSidsVuOCiHjNqHs425QnzAhf1lbsC 3iI1X3jY9BbMyyHnyqL/lTdLdVMjOwR1NtFbzdVmj+qDvTJPUAXuE0rlFFM+eqlJP9rr /hQQ== X-Forwarded-Encrypted: i=1; AJvYcCXwMAjt+rmkQu+WSEJaaO4u9fW3OFreTkr1kZ/RnIjuxP44ab5GK8MAvGyqm5Adz9LKDChh/U6WtjEZP2Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzZtjSfBrY/Plt+z20eECQr5/n7UOpShZOgRZ+uFotGYVh6au/+ B+xpeC66fPZ9ER9PXEDnMxivO75rP6YpXxkXJSgt2+IzeTH3QBBmOU9Q8VmDmbMO+0a/ZUW4L7m cJSoHSTaKhw== X-Google-Smtp-Source: AGHT+IGB3B4t2ALjQw6hoZpIdk2YjM1WUkFpTHWdqU5SZUNgW/4Q3DrkcHG6mPsW6oI2SQpuz61ju+MhomgQ X-Received: from pldr4.prod.google.com ([2002:a17:903:4104:b0:297:dd14:906c]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f908:b0:295:70b1:edc8 with SMTP id d9443c01a7336-297e53e7d36mr66908965ad.2.1762738374149; Sun, 09 Nov 2025 17:32:54 -0800 (PST) Date: Sun, 9 Nov 2025 17:31:48 -0800 In-Reply-To: <20251110013152.3099080-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110013152.3099080-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251110013152.3099080-2-irogers@google.com> Subject: [PATCH v1 1/5] perf intel-pt: Use the perf provided "cpuid.h" From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , Tomas Glozar , Quentin Monnet , Yuzhuo Jing , Blake Jones , Charlie Jenkins , Yeoreum Yun , Athira Rajeev , Ravi Bangoria , Collin Funk , Dapeng Mi , Thomas Richter , Dmitry Vyukov , Andi Kleen , Howard Chu , Zecheng Li , tanze , Gabriele Monaco , GuoHan Zhao , Markus Elfring , Colin Ian King , Kan Liang , "Dr. David Alan Gilbert" , Jean-Philippe Romain , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rather than having a feature test and include of for the __get_cpuid function, use the cpuid function provided by tools/perf/arch/x86/util/cpuid.h. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/arch/x86/tests/intel-pt-test.c | 6 +++--- tools/perf/arch/x86/util/intel-pt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/arch/x86/tests/intel-pt-test.c b/tools/perf/arch/x8= 6/tests/intel-pt-test.c index b217ed67cd4e..970997759ec2 100644 --- a/tools/perf/arch/x86/tests/intel-pt-test.c +++ b/tools/perf/arch/x86/tests/intel-pt-test.c @@ -3,7 +3,6 @@ #include #include #include -#include #include =20 #include "intel-pt-decoder/intel-pt-pkt-decoder.h" @@ -11,6 +10,7 @@ #include "debug.h" #include "tests/tests.h" #include "arch-tests.h" +#include "../util/cpuid.h" #include "cpumap.h" =20 /** @@ -363,7 +363,7 @@ static int get_pt_caps(int cpu, struct pt_caps *caps) memset(caps, 0, sizeof(*caps)); =20 for (i =3D 0; i < INTEL_PT_SUBLEAF_CNT; i++) { - __get_cpuid_count(20, i, &r.eax, &r.ebx, &r.ecx, &r.edx); + cpuid(20, i, &r.eax, &r.ebx, &r.ecx, &r.edx); pr_debug("CPU %d CPUID leaf 20 subleaf %d\n", cpu, i); pr_debug("eax =3D 0x%08x\n", r.eax); pr_debug("ebx =3D 0x%08x\n", r.ebx); @@ -380,7 +380,7 @@ static bool is_hybrid(void) unsigned int eax, ebx, ecx, edx =3D 0; bool result; =20 - __get_cpuid_count(7, 0, &eax, &ebx, &ecx, &edx); + cpuid(7, 0, &eax, &ebx, &ecx, &edx); result =3D edx & BIT(15); pr_debug("Is %shybrid : CPUID leaf 7 subleaf 0 edx %#x (bit-15 indicates = hybrid)\n", result ? "" : "not ", edx); diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util= /intel-pt.c index 2d7c0dec86b0..b394ad9cc635 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -12,7 +12,6 @@ #include #include #include -#include =20 #include "../../../util/session.h" #include "../../../util/event.h" @@ -34,6 +33,7 @@ #include // page_size #include "../../../util/intel-pt.h" #include +#include "cpuid.h" =20 #define KiB(x) ((x) * 1024) #define MiB(x) ((x) * 1024 * 1024) @@ -311,7 +311,7 @@ static void intel_pt_tsc_ctc_ratio(u32 *n, u32 *d) { unsigned int eax =3D 0, ebx =3D 0, ecx =3D 0, edx =3D 0; =20 - __get_cpuid(0x15, &eax, &ebx, &ecx, &edx); + cpuid(0x15, 0, &eax, &ebx, &ecx, &edx); *n =3D ebx; *d =3D eax; } --=20 2.51.2.1041.gc1ab5b90ca-goog From nobody Sun Feb 8 04:15:12 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 3E2D11F30AD for ; Mon, 10 Nov 2025 01:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738382; cv=none; b=Dmz6fZo0uJTszRk4s8jHuVuOL0iGIX+Dff9cTbMlgv3pM8qZNxukOs+jQUBDVVF6O09uknIKlU1nS+2ju/7oo7mQ+ZWyJL2pAO7REFcGaSrRi/JkWQ4/G6iuiXhSWRBSFGve5ZhOMZZLGUjAq07poDAGhOaAzEuD9SVid3/z9pc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738382; c=relaxed/simple; bh=9LV96d37xehqpithsFIs6MVs8BcbI2EjyS0bItBYfSw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=AyERdfs/FptBONzTPUJ26UEWg6pwldF33Gytjee6nSq/+37rAu1rtNkRqHku3lOF/lioHpYXQAmdhUcPQnhLUA2HIYCR8kN2dcn8G7H6vk0G3I36o8kPqwc+eRgBQrKxhOC5bM9IY3bNW60kv5A8YjlWy44Onl+FRLpYJf2sl50= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=F5Cieisf; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="F5Cieisf" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-297d50cd8c4so49766635ad.0 for ; Sun, 09 Nov 2025 17:33:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762738381; x=1763343181; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=PQ4U7M3pwjQ17FcfKzTEAaFDLeG/gMTrXfhERhFZ2tw=; b=F5CieisfI/ebIWggeIeZ1erS4g/ZePtiuLu5Vtj/de3wTYcNFeEMqUhucao3nGx5P5 BAGO8mvs7rU4+pwgEgffuxK6wjsizipW6yBh2+p4XNk5gKAy6ex04H5udRFj2r3diw0i qiaq98TXUK3va6cV20V8KNQxEf7RsZ923FOvQRwAsIWuYpFQcrCQ/m/85dDilmyuvqFV e5XWOCuXWFHAeU36KuZRMPex0ujn9Q8aT/+GCZoO5gpw9jno23fYL4wPK+MxD1mXlAqi 0KO6+5eiMIG6zdmWiwHeYPCsDwubT+TPSP5LtMQiWpH4U0hGLtHhLcUgZ8Z4/ZFjT3gf gyJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762738381; x=1763343181; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PQ4U7M3pwjQ17FcfKzTEAaFDLeG/gMTrXfhERhFZ2tw=; b=ULnqChWrRLg4FiXmwhtq8eHqxBBJfbEpFqAaYeLjHQg/Ezz6r80Ge5761rsRSkOxvo 1yRSuQj955KGd3rBqKZQTwdrcIVlkUVqFTVxh6rIGRZCdk3OL+PPNcqRZwt0VFExSUD5 223cVpWYYQUW15xq6HS8csxOw8gU1oCVbLdfRCuaBZSkG1R1ivZ6bvwZQMGit9wlEEJx ydnexvpNDkhd6xcJ9EliMPVQeyjC6LRnfntXKoTRUbP9Str+PP7KnQW+jgtnhTsmWeWo AHRE93zDwAFBkHIjfm6IlJas7QjIwyItO9JcAsr8FbqhPK3MJHqtsKGrrGWR4e3RzOjb jbPQ== X-Forwarded-Encrypted: i=1; AJvYcCXrnIUHBoE9E4ZiTFqKQDwrxKfJo8/cxLBHlzN84M7EwNUjp+4mcKE8UvGdihOc3DRm1USi4i02pmeYRGk=@vger.kernel.org X-Gm-Message-State: AOJu0YxdcIihuCIEFLNpHS2EKpTwsawaLUCJwivEUY2IoDuY0Tpt8ARM VLtoFioDm3fdSg6Zh5tfmPWLD4F97vf4TaGD+6wbOUrv32KD5I0PS53zV9HAeG1tnQH2sZOH7eP e1Oy8BoAxtQ== X-Google-Smtp-Source: AGHT+IGU/Cy8lULW9NbbWjCc8Ka2MNexQ9YPtC1zURZj2oeBjlfwc8cIuYF/gU8+FCBvxVfINfO1iEo9k4XI X-Received: from pjzj4.prod.google.com ([2002:a17:90a:eb04:b0:334:1843:ee45]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:94e:b0:264:70da:7a3b with SMTP id d9443c01a7336-297e570dd4bmr82665285ad.49.1762738380513; Sun, 09 Nov 2025 17:33:00 -0800 (PST) Date: Sun, 9 Nov 2025 17:31:49 -0800 In-Reply-To: <20251110013152.3099080-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110013152.3099080-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251110013152.3099080-3-irogers@google.com> Subject: [PATCH v1 2/5] perf build: Don't add NO_AUXTRACE if missing feature-get_cpuid From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , Tomas Glozar , Quentin Monnet , Yuzhuo Jing , Blake Jones , Charlie Jenkins , Yeoreum Yun , Athira Rajeev , Ravi Bangoria , Collin Funk , Dapeng Mi , Thomas Richter , Dmitry Vyukov , Andi Kleen , Howard Chu , Zecheng Li , tanze , Gabriele Monaco , GuoHan Zhao , Markus Elfring , Colin Ian King , Kan Liang , "Dr. David Alan Gilbert" , Jean-Philippe Romain , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The intel-pt code dependent on __get_cpuid is no longer present so remove the feature test in the Makefile.config. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/Makefile.config | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 5700516aa84a..5decc3d5fef8 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1114,16 +1114,8 @@ ifndef NO_CAPSTONE endif =20 ifndef NO_AUXTRACE - ifeq ($(SRCARCH),x86) - ifeq ($(feature-get_cpuid), 0) - $(warning Your gcc lacks the __get_cpuid() builtin, disables support= for auxtrace/Intel PT, please install a newer gcc) - NO_AUXTRACE :=3D 1 - endif - endif - ifndef NO_AUXTRACE - $(call detected,CONFIG_AUXTRACE) - CFLAGS +=3D -DHAVE_AUXTRACE_SUPPORT - endif + $(call detected,CONFIG_AUXTRACE) + CFLAGS +=3D -DHAVE_AUXTRACE_SUPPORT endif =20 ifdef EXTRA_TESTS --=20 2.51.2.1041.gc1ab5b90ca-goog From nobody Sun Feb 8 04:15:12 2026 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 D3F43224B0E for ; Mon, 10 Nov 2025 01:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738390; cv=none; b=p8GR1G1c4XIFu6345FxLcgYzLz7ufaLJD/omsKt2dvVpqAIGLcFysKdt3obaX+uyauIhHs8ScJitdOcassvdATGhzdmTEjNhJc+UmWDdfgQlOYrlI5G0MRxr+/UrGiWSC2Riznq462vPv6fwoboyeDOFAqHPgxKFls7v9VEH0cQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738390; c=relaxed/simple; bh=AX4zMck4hJ8CekkhoIGM9prEjuQFEeMORcOKF9pOIrA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=lgoo7m9YISNKjOaJ4bEYEZ8C348bE5JQNGAWijPy877MggsRSKPcL2ZLOspPo3qA8it2vN5GX28WtJBF52jjapgJD9tdRqMXBqX5tCaLjRWdohkzV8r2mhik3KxuoejNvM9hL/AtyHnQhEx56Ur1wUhwN/A09X/nF4u6UsI14oU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=i51VBkJf; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="i51VBkJf" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2956a694b47so32794625ad.1 for ; Sun, 09 Nov 2025 17:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762738388; x=1763343188; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=pSEYPQKRqvkubRMw5YfRHz+OHOI6nD8jZSkaptJ6Ozg=; b=i51VBkJfJYICAwgJDqyBpWrTHTgYpB5LKFrq8AKkxz8HVdkP3vhVz9yt2i2oJNJNXa bckjpTWIPW0z8sMbQD7TzYnrXoE+HJct39njQTBXpr8h3A76XUvfUoCQt7JTMiR/cRt2 LOCwkjgW5mqzCWnRura6vRQMD7FhbN4IyRC+07U0ifTgQrEkSowH181fi3fjgBE3lVLq REyXfEydu4ZKx3N/6p8KDEVevXXM+DMCz8J75NElrUwiPNy5dGelVZ1MpFHXGM8EHWrq TPGZKLAlXvyML4k6+NWrBMt/kKtDBZ+/0p1GDZcc/cJttutaR1DD100k+ERIMgEzk3um 81YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762738388; x=1763343188; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pSEYPQKRqvkubRMw5YfRHz+OHOI6nD8jZSkaptJ6Ozg=; b=i+KEck8FaSEX5K41WxnFe7uynxIusNCDFxzGln3zXIiGzIlP04A9kHVyVaeyuF0hIR Gwp4EZgqC81n4Z1Z3SItcubVvbZ1O7I8b0hM70kpPjI3L/X4mR5ThL+N7y0tKQW8GVZ2 dPMz47B/au54pyYoFrJ/ClMfIxmLlXus9DjbuaFanT0OsZWRKA6YLn81/91RAooZXpoN kGhgAcpJw4JiJkvvuxKezB7PkYbWa6r3eD9OpFLRLkz/yodscmXsxbmC1fHHTsuHVon5 9U2iI3nC1d8BnE7KPpVjAeCgopJ742JayfH1eJxyNOc1Z7gwEATrXxtnXpgj3TfQ6aGp /t/Q== X-Forwarded-Encrypted: i=1; AJvYcCUcfnDSIPnQL/fMJsbmB9XnaFjMuNSMRL8egV/YzzRCy//rXGMin6CdrfTagGhC5jmPSE4bycGLWB8v2K4=@vger.kernel.org X-Gm-Message-State: AOJu0YxU5ZIICT7gATXyJvsJqwrtv+x3DEvfmOG/kxnbdxRjVGaiN5od 551oAwDwV1yn6pw4nritX1SzUOmXNR/cTp7+qr21rSR81fs2JFjfO8p985WdmArmA0T+OM1J9l6 jThZpH0PqDQ== X-Google-Smtp-Source: AGHT+IEsioVmpfAvAsJ243BW96Rxy80dTUlatEny8pA+pQJ/dH5U12GBogPLq/rlz9xJNcJ4bBYqrILf/NB/ X-Received: from plii20.prod.google.com ([2002:a17:902:eb54:b0:269:770b:9520]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:f601:b0:295:3584:1bbd with SMTP id d9443c01a7336-297e56ca193mr86932355ad.41.1762738388100; Sun, 09 Nov 2025 17:33:08 -0800 (PST) Date: Sun, 9 Nov 2025 17:31:50 -0800 In-Reply-To: <20251110013152.3099080-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110013152.3099080-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251110013152.3099080-4-irogers@google.com> Subject: [PATCH v1 3/5] tool build: Remove __get_cpuid feature test From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , Tomas Glozar , Quentin Monnet , Yuzhuo Jing , Blake Jones , Charlie Jenkins , Yeoreum Yun , Athira Rajeev , Ravi Bangoria , Collin Funk , Dapeng Mi , Thomas Richter , Dmitry Vyukov , Andi Kleen , Howard Chu , Zecheng Li , tanze , Gabriele Monaco , GuoHan Zhao , Markus Elfring , Colin Ian King , Kan Liang , "Dr. David Alan Gilbert" , Jean-Philippe Romain , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This feature test is no longer used so remove. The function tested by the feature test is used in: tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c however, the Makefile just assumes the presence of the function and doesn't perform a build feature test for it. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/build/Makefile.feature | 2 -- tools/build/feature/Makefile | 4 ---- tools/build/feature/test-all.c | 5 ----- tools/build/feature/test-get_cpuid.c | 8 -------- 4 files changed, 19 deletions(-) delete mode 100644 tools/build/feature/test-get_cpuid.c diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 32bbe29fe5f6..fc6abe369f73 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -90,7 +90,6 @@ FEATURE_TESTS_BASIC :=3D \ timerfd \ zlib \ lzma \ - get_cpuid \ bpf \ scandirat \ sched_getcpu \ @@ -146,7 +145,6 @@ FEATURE_DISPLAY ?=3D \ llvm-perf \ zlib \ lzma \ - get_cpuid \ bpf \ libaio \ libzstd diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 49b0add392b1..7c90e0d0157a 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -56,7 +56,6 @@ FILES=3D \ test-lzma.bin \ test-bpf.bin \ test-libbpf.bin \ - test-get_cpuid.bin \ test-sdt.bin \ test-cxx.bin \ test-gettid.bin \ @@ -318,9 +317,6 @@ $(OUTPUT)test-zlib.bin: $(OUTPUT)test-lzma.bin: $(BUILD) -llzma =20 -$(OUTPUT)test-get_cpuid.bin: - $(BUILD) - $(OUTPUT)test-bpf.bin: $(BUILD) =20 diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 8a354b81417c..eb346160d0ba 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -114,10 +114,6 @@ # include "test-lzma.c" #undef main =20 -#define main main_test_get_cpuid -# include "test-get_cpuid.c" -#undef main - #define main main_test_bpf # include "test-bpf.c" #undef main @@ -168,7 +164,6 @@ int main(int argc, char *argv[]) main_test_pthread_attr_setaffinity_np(); main_test_pthread_barrier(); main_test_lzma(); - main_test_get_cpuid(); main_test_bpf(); main_test_scandirat(); main_test_sched_getcpu(); diff --git a/tools/build/feature/test-get_cpuid.c b/tools/build/feature/tes= t-get_cpuid.c deleted file mode 100644 index bb4f065f28a6..000000000000 --- a/tools/build/feature/test-get_cpuid.c +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include - -int main(void) -{ - unsigned int eax =3D 0, ebx =3D 0, ecx =3D 0, edx =3D 0; - return __get_cpuid(0x15, &eax, &ebx, &ecx, &edx); -} --=20 2.51.2.1041.gc1ab5b90ca-goog From nobody Sun Feb 8 04:15:12 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 65EE2224B0E for ; Mon, 10 Nov 2025 01:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738398; cv=none; b=PqQalVdZdBh/a62YckyuZuCZAjEJ/7BprxpyEQYHxNHtMu0aZYlivnt+JRsHfC/tM8eNIgiFRfTSrK1VsiUthKIp5NeDAnMb+obbiXfYQ2jw9MYvhDNMNjFQI0zRasZsArGa7cIq2+9/jxnnVqqkn4O8Cw4yNGgRQUu5S4eguc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738398; c=relaxed/simple; bh=9KbAM0GEDbeVDRR2MPU+M9shRhBY3XqeHfQfM17ikf8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=fYx00NXl7KgR4YNZbqZ28EIqriWsLSQqsqRUzDsJe1vmgJkWL+ljya5c8eH9zIOR//CQd2ntCwp/bcZOoef03F8NW7aIkFEprN8PQ2yPnGc5GeL5mC46RPDNDohJaY4lgKtAFLZuEI2LG+eGOPf57s0oZDtI2eP+3sV3JDY5pzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=p6vu6Wjc; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="p6vu6Wjc" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-294df925293so30360025ad.2 for ; Sun, 09 Nov 2025 17:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762738396; x=1763343196; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=+B0K3ky72wEvP4ZZ6N4wTTYfbWGhIpqa4xNLWDZQi/Y=; b=p6vu6Wjc+T8IMVLqXiP08/Xyy7oHe9/v9u7WdV6TnXqEzftWGaMIS6jJIjTyp3MCfo zOQ+xVUholMj2ppNyq058OxhiIizyMgYP2/Olf6bpC+ThKYTfFOerji6ylSZ7+HsluJa ufM4BvUhh6NQKfGk5E/CHjppTj2yTbOLn60CM77/wkvdGPfEpMmpjGj9gu6pHryO2VyN DlRtKBR1jV60tuv4dl6wIvdrTcs1XqSMr/uVXSLWkHzOuczP9nIcWNWa9KMC1eg/VKRA tisZRWEbQi1uGJd91wfbmC67B3xU3Y7MJ0VNYgjldG55cGn/YMdUb/mlheVfoO0Bdpze JAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762738396; x=1763343196; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+B0K3ky72wEvP4ZZ6N4wTTYfbWGhIpqa4xNLWDZQi/Y=; b=IM+5GU8DBMbApJy5e67WwSWyk0LxvD70uAF4MK6n8FSZ9GpHju/ejRN1M25rXN+9ic gWoW3Quz9FBsDmoG0lt7iO1373iJZx7dc3xm3GAL9mNSF4pYOUesIJojqkEW0deqIoNS Wj6eQPmYjY7tbzr8Z5IVDnP/Ev4bQIYakIdG/VQUm5KXDXDstTFpAq3BfqwUmtiVorIJ kKWe8M5psYUhCz2IBpMjd3go5lzglI7DMTGTo6hF8bleXULYNa8M5rLxUHUyiizslAsi TR2wvs1Swxr1bQD2YTJBnYis6lNUEoA5Sch7q/Mu1Wnk3zW1aDTfBF/d/DbLjZs5PF3G fJBg== X-Forwarded-Encrypted: i=1; AJvYcCXgWoXbcpnUA9pPPChZZcotZ1N5pCcHmO00+2QievtFdOKC0eolJdtGcSuQ0unMmT6eP47vZPbk89s5tic=@vger.kernel.org X-Gm-Message-State: AOJu0Yxp8iwydqcEe+hl8LhPZYGke1FY/jB5e7+EdF13oECEEZVro604 WzneOP3iSuXjvdus3d97266aqVt1Oau0Wz/bybOSUJzP+UYzpxCkoXgttLZJn0lRGeukzu4yH/c TLjUd7c3yDA== X-Google-Smtp-Source: AGHT+IExwjjEFgLDypHhLOgkiBeWdG6nSHclfK6S4i/Wp/ITD3LzlgyqjOj7gx/fs4ccsVG7rjODpy+mD2/a X-Received: from pjyp14.prod.google.com ([2002:a17:90a:e70e:b0:340:c1bf:6e2d]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:da4b:b0:27e:f018:d2fb with SMTP id d9443c01a7336-297e540dbf8mr80142465ad.6.1762738395522; Sun, 09 Nov 2025 17:33:15 -0800 (PST) Date: Sun, 9 Nov 2025 17:31:51 -0800 In-Reply-To: <20251110013152.3099080-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110013152.3099080-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251110013152.3099080-5-irogers@google.com> Subject: [PATCH v1 4/5] perf build: Remove NO_AUXTRACE build option From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , Tomas Glozar , Quentin Monnet , Yuzhuo Jing , Blake Jones , Charlie Jenkins , Yeoreum Yun , Athira Rajeev , Ravi Bangoria , Collin Funk , Dapeng Mi , Thomas Richter , Dmitry Vyukov , Andi Kleen , Howard Chu , Zecheng Li , tanze , Gabriele Monaco , GuoHan Zhao , Markus Elfring , Colin Ian King , Kan Liang , "Dr. David Alan Gilbert" , Jean-Philippe Romain , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The NO_AUXTRACE build option was used when the __get_cpuid feature test failed or if it was provided on the command line. The option no longer avoids a dependency on a library and so having the option is just adding complexity to the code base. Remove the option CONFIG_AUXTRACE from Build files and HAVE_AUXTRACE_SUPPORT by assuming it is always defined. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/Documentation/perf-check.txt | 1 - tools/perf/Makefile.config | 5 - tools/perf/Makefile.perf | 2 - tools/perf/arch/arm/util/Build | 2 +- tools/perf/arch/arm/util/pmu.c | 2 - tools/perf/arch/arm64/util/Build | 19 +- tools/perf/arch/powerpc/util/Build | 2 +- tools/perf/arch/s390/util/Build | 2 +- tools/perf/arch/x86/tests/Build | 4 +- tools/perf/arch/x86/tests/arch-tests.c | 4 - tools/perf/arch/x86/util/Build | 6 +- tools/perf/arch/x86/util/pmu.c | 2 - tools/perf/builtin-check.c | 1 - tools/perf/builtin-inject.c | 15 -- tools/perf/builtin-record.c | 36 ---- tools/perf/builtin-script.c | 12 -- tools/perf/tests/make | 4 +- tools/perf/util/Build | 24 +-- tools/perf/util/arm-spe-decoder/Build | 2 +- tools/perf/util/auxtrace.h | 220 +----------------------- tools/perf/util/cs-etm-decoder/Build | 2 +- tools/perf/util/hisi-ptt-decoder/Build | 2 +- tools/perf/util/intel-pt-decoder/Build | 8 +- tools/perf/util/synthetic-events.h | 15 -- 24 files changed, 37 insertions(+), 355 deletions(-) diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documenta= tion/perf-check.txt index 4c9ccda6ce91..09e1d35677f5 100644 --- a/tools/perf/Documentation/perf-check.txt +++ b/tools/perf/Documentation/perf-check.txt @@ -50,7 +50,6 @@ feature:: dwarf / HAVE_LIBDW_SUPPORT dwarf_getlocations / HAVE_LIBDW_SUPPORT dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT - auxtrace / HAVE_AUXTRACE_SUPPORT libbfd / HAVE_LIBBFD_SUPPORT libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT libcapstone / HAVE_LIBCAPSTONE_SUPPORT diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 5decc3d5fef8..6b62fea21a0a 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -1113,11 +1113,6 @@ ifndef NO_CAPSTONE endif endif =20 -ifndef NO_AUXTRACE - $(call detected,CONFIG_AUXTRACE) - CFLAGS +=3D -DHAVE_AUXTRACE_SUPPORT -endif - ifdef EXTRA_TESTS $(call detected,CONFIG_EXTRA_TESTS) CFLAGS +=3D -DHAVE_EXTRA_TESTS diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index afeb4e4a8a31..80decc7ce13c 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -84,8 +84,6 @@ include ../scripts/utilities.mak # # Define NO_LZMA if you do not want to support compressed (xz) kernel modu= les # -# Define NO_AUXTRACE if you do not want AUX area tracing support -# # Define NO_LIBBPF if you do not want BPF support # # Define NO_LIBCAP if you do not want process capabilities considered by p= erf diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build index f7a8b37d1c68..fd695e1fdaee 100644 --- a/tools/perf/arch/arm/util/Build +++ b/tools/perf/arch/arm/util/Build @@ -3,4 +3,4 @@ perf-util-y +=3D perf_regs.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 -perf-util-$(CONFIG_AUXTRACE) +=3D pmu.o auxtrace.o cs-etm.o +perf-util-y +=3D pmu.o auxtrace.o cs-etm.o diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c index f70075c89aa0..9be8da5207f5 100644 --- a/tools/perf/arch/arm/util/pmu.c +++ b/tools/perf/arch/arm/util/pmu.c @@ -20,7 +20,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) { struct perf_cpu_map *intersect, *online =3D cpu_map__online(); =20 -#ifdef HAVE_AUXTRACE_SUPPORT if (!strcmp(pmu->name, CORESIGHT_ETM_PMU_NAME)) { /* add ETM default config here */ pmu->auxtrace =3D true; @@ -39,7 +38,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) pmu->selectable =3D true; #endif } -#endif /* Workaround some ARM PMU's failing to correctly set CPU maps for online= processors. */ intersect =3D perf_cpu_map__intersect(online, pmu->cpus); perf_cpu_map__put(online); diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/= Build index a74521b79eaa..d63881081d2e 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build @@ -1,13 +1,14 @@ +perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o +perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o +perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o +perf-util-y +=3D ../../arm/util/auxtrace.o +perf-util-y +=3D ../../arm/util/cs-etm.o +perf-util-y +=3D ../../arm/util/pmu.o +perf-util-y +=3D arm-spe.o perf-util-y +=3D header.o +perf-util-y +=3D hisi-ptt.o perf-util-y +=3D machine.o +perf-util-y +=3D mem-events.o perf-util-y +=3D perf_regs.o -perf-util-y +=3D tsc.o perf-util-y +=3D pmu.o -perf-util-$(CONFIG_LIBTRACEEVENT) +=3D kvm-stat.o -perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o -perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o - -perf-util-$(CONFIG_AUXTRACE) +=3D ../../arm/util/pmu.o \ - ../../arm/util/auxtrace.o \ - ../../arm/util/cs-etm.o \ - arm-spe.o mem-events.o hisi-ptt.o +perf-util-y +=3D tsc.o diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/u= til/Build index a5b0babd307e..3d0d5427aef7 100644 --- a/tools/perf/arch/powerpc/util/Build +++ b/tools/perf/arch/powerpc/util/Build @@ -10,4 +10,4 @@ perf-util-$(CONFIG_LIBDW) +=3D skip-callchain-idx.o =20 perf-util-$(CONFIG_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o -perf-util-$(CONFIG_AUXTRACE) +=3D auxtrace.o +perf-util-y +=3D auxtrace.o diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Bu= ild index 736c0ad09194..c64eb18dbdae 100644 --- a/tools/perf/arch/s390/util/Build +++ b/tools/perf/arch/s390/util/Build @@ -7,4 +7,4 @@ perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o perf-util-y +=3D machine.o perf-util-y +=3D pmu.o =20 -perf-util-$(CONFIG_AUXTRACE) +=3D auxtrace.o +perf-util-y +=3D auxtrace.o diff --git a/tools/perf/arch/x86/tests/Build b/tools/perf/arch/x86/tests/Bu= ild index 7790b3e20f4e..b017d1ca6e3c 100644 --- a/tools/perf/arch/x86/tests/Build +++ b/tools/perf/arch/x86/tests/Build @@ -3,9 +3,9 @@ perf-test-$(CONFIG_DWARF_UNWIND) +=3D dwarf-unwind.o =20 perf-test-y +=3D arch-tests.o perf-test-y +=3D hybrid.o -perf-test-$(CONFIG_AUXTRACE) +=3D intel-pt-test.o +perf-test-y +=3D intel-pt-test.o ifeq ($(CONFIG_EXTRA_TESTS),y) -perf-test-$(CONFIG_AUXTRACE) +=3D insn-x86.o +perf-test-y +=3D insn-x86.o endif perf-test-$(CONFIG_X86_64) +=3D bp-modify.o perf-test-y +=3D amd-ibs-via-core-pmu.o diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/t= ests/arch-tests.c index 8f9cfeaa170f..c3e1619c5e79 100644 --- a/tools/perf/arch/x86/tests/arch-tests.c +++ b/tools/perf/arch/x86/tests/arch-tests.c @@ -3,7 +3,6 @@ #include "tests/tests.h" #include "arch-tests.h" =20 -#ifdef HAVE_AUXTRACE_SUPPORT #ifdef HAVE_EXTRA_TESTS DEFINE_SUITE("x86 instruction decoder - new instructions", insn_x86); #endif @@ -19,7 +18,6 @@ struct test_suite suite__intel_pt =3D { .test_cases =3D intel_pt_tests, }; =20 -#endif #if defined(__x86_64__) DEFINE_SUITE("x86 bp modify", bp_modify); #endif @@ -39,12 +37,10 @@ struct test_suite *arch_tests[] =3D { #ifdef HAVE_DWARF_UNWIND_SUPPORT &suite__dwarf_unwind, #endif -#ifdef HAVE_AUXTRACE_SUPPORT #ifdef HAVE_EXTRA_TESTS &suite__insn_x86, #endif &suite__intel_pt, -#endif #if defined(__x86_64__) &suite__bp_modify, #endif diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 06d7c0205b3d..c0dc5965f362 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build @@ -14,7 +14,7 @@ perf-util-y +=3D iostat.o perf-util-$(CONFIG_LOCAL_LIBUNWIND) +=3D unwind-libunwind.o perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) +=3D unwind-libdw.o =20 -perf-util-$(CONFIG_AUXTRACE) +=3D auxtrace.o +perf-util-y +=3D auxtrace.o perf-util-y +=3D archinsn.o -perf-util-$(CONFIG_AUXTRACE) +=3D intel-pt.o -perf-util-$(CONFIG_AUXTRACE) +=3D intel-bts.o +perf-util-y +=3D intel-pt.o +perf-util-y +=3D intel-bts.o diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c index 58113482654b..a3f96221758d 100644 --- a/tools/perf/arch/x86/util/pmu.c +++ b/tools/perf/arch/x86/util/pmu.c @@ -273,7 +273,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) { struct perf_pmu_caps *ldlat_cap; =20 -#ifdef HAVE_AUXTRACE_SUPPORT if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) { pmu->auxtrace =3D true; pmu->selectable =3D true; @@ -283,7 +282,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) pmu->auxtrace =3D true; pmu->selectable =3D true; } -#endif =20 if (x86__is_amd_cpu()) { if (strcmp(pmu->name, "ibs_op")) diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 9ce2e71999df..d19769a8f689 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -42,7 +42,6 @@ struct feature_status supported_features[] =3D { FEATURE_STATUS("dwarf", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT), - FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT), FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license in= compatibility, use BUILD_NONDISTRO=3D1 and install binutils-dev[el]"), FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT), FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 044074080aa5..bd9245d2dd41 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -239,8 +239,6 @@ static int perf_event__repipe_event_update(const struct= perf_tool *tool, return perf_event__repipe_synth(tool, event); } =20 -#ifdef HAVE_AUXTRACE_SUPPORT - static int copy_bytes(struct perf_inject *inject, struct perf_data *data, = off_t size) { char buf[4096]; @@ -297,19 +295,6 @@ static s64 perf_event__repipe_auxtrace(const struct pe= rf_tool *tool, return event->auxtrace.size; } =20 -#else - -static s64 -perf_event__repipe_auxtrace(const struct perf_tool *tool __maybe_unused, - struct perf_session *session __maybe_unused, - union perf_event *event __maybe_unused) -{ - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -#endif - static int perf_event__repipe(const struct perf_tool *tool, union perf_event *event, struct perf_sample *sample __maybe_unused, diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index fe10bb7f35cb..2584d0d8bc82 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -730,8 +730,6 @@ static void record__sig_exit(void) raise(signr); } =20 -#ifdef HAVE_AUXTRACE_SUPPORT - static int record__process_auxtrace(const struct perf_tool *tool, struct mmap *map, union perf_event *event, void *data1, @@ -889,40 +887,6 @@ static int record__auxtrace_init(struct record *rec) return auxtrace_parse_filters(rec->evlist); } =20 -#else - -static inline -int record__auxtrace_mmap_read(struct record *rec __maybe_unused, - struct mmap *map __maybe_unused) -{ - return 0; -} - -static inline -void record__read_auxtrace_snapshot(struct record *rec __maybe_unused, - bool on_exit __maybe_unused) -{ -} - -static inline -int auxtrace_record__snapshot_start(struct auxtrace_record *itr __maybe_un= used) -{ - return 0; -} - -static inline -int record__auxtrace_snapshot_exit(struct record *rec __maybe_unused) -{ - return 0; -} - -static int record__auxtrace_init(struct record *rec __maybe_unused) -{ - return 0; -} - -#endif - static int record__config_text_poke(struct evlist *evlist) { struct evsel *evsel; diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index d813adbf9889..bd82315bdf8e 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2002,7 +2002,6 @@ static int perf_sample__fprintf_synth_iflag_chg(struc= t perf_sample *sample, FILE return len + perf_sample__fprintf_pt_spacing(len, fp); } =20 -#ifdef HAVE_AUXTRACE_SUPPORT static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data, FIL= E *fp) { struct powerpc_vpadtl_entry *dtl =3D (struct powerpc_vpadtl_entry *)data-= >raw_data; @@ -2021,13 +2020,6 @@ static int perf_sample__fprintf_synth_vpadtl(struct = perf_sample *data, FILE *fp) =20 return len; } -#else -static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data __ma= ybe_unused, - FILE *fp __maybe_unused) -{ - return 0; -} -#endif =20 static int perf_sample__fprintf_synth(struct perf_sample *sample, struct evsel *evsel, FILE *fp) @@ -3649,7 +3641,6 @@ static int process_feature_event(const struct perf_to= ol *tool __maybe_unused, return 0; } =20 -#ifdef HAVE_AUXTRACE_SUPPORT static int perf_script__process_auxtrace_info(const struct perf_tool *tool, struct perf_session *session, union perf_event *event) @@ -3664,9 +3655,6 @@ static int perf_script__process_auxtrace_info(const s= truct perf_tool *tool, =20 return ret; } -#else -#define perf_script__process_auxtrace_info 0 -#endif =20 static int parse_insn_trace(const struct option *opt __maybe_unused, const char *str, int unset __maybe_unused) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index b650ce8864ed..6641701e4828 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -88,7 +88,6 @@ make_no_backtrace :=3D NO_BACKTRACE=3D1 make_no_libcapstone :=3D NO_CAPSTONE=3D1 make_no_libnuma :=3D NO_LIBNUMA=3D1 make_no_libbionic :=3D NO_LIBBIONIC=3D1 -make_no_auxtrace :=3D NO_AUXTRACE=3D1 make_no_libbpf :=3D NO_LIBBPF=3D1 make_libbpf_dynamic :=3D LIBBPF_DYNAMIC=3D1 make_no_libbpf_DEBUG :=3D NO_LIBBPF=3D1 DEBUG=3D1 @@ -121,7 +120,7 @@ make_static :=3D LDFLAGS=3D-static NO_PERF_READ= _VDSO32=3D1 NO_PERF_READ_VDSOX3 make_minimal :=3D NO_LIBPYTHON=3D1 NO_GTK2=3D1 make_minimal +=3D NO_DEMANGLE=3D1 NO_LIBELF=3D1 NO_BACKTRACE=3D1 make_minimal +=3D NO_LIBNUMA=3D1 NO_LIBBIONIC=3D1 NO_LIBDW=3D1 -make_minimal +=3D NO_LIBDW_DWARF_UNWIND=3D1 NO_AUXTRACE=3D1 NO_LIBB= PF=3D1 +make_minimal +=3D NO_LIBDW_DWARF_UNWIND=3D1 NO_LIBBPF=3D1 make_minimal +=3D NO_SDT=3D1 NO_JVMTI=3D1 NO_LIBZSTD=3D1 make_minimal +=3D NO_LIBCAP=3D1 NO_CAPSTONE=3D1 =20 @@ -158,7 +157,6 @@ run +=3D make_no_backtrace run +=3D make_no_libcapstone run +=3D make_no_libnuma run +=3D make_no_libbionic -run +=3D make_no_auxtrace run +=3D make_no_libbpf run +=3D make_no_libbpf_DEBUG run +=3D make_no_libllvm diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 4be313cd115a..1c2a43e1dc68 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -129,22 +129,22 @@ perf-util-y +=3D iostat.o perf-util-y +=3D stream.o perf-util-y +=3D kvm-stat.o perf-util-y +=3D lock-contention.o -perf-util-$(CONFIG_AUXTRACE) +=3D auxtrace.o +perf-util-y +=3D auxtrace.o perf-util-y +=3D intel-pt-decoder/ -perf-util-$(CONFIG_AUXTRACE) +=3D intel-pt.o -perf-util-$(CONFIG_AUXTRACE) +=3D intel-bts.o -perf-util-$(CONFIG_AUXTRACE) +=3D arm-spe.o -perf-util-$(CONFIG_AUXTRACE) +=3D arm-spe-decoder/ -perf-util-$(CONFIG_AUXTRACE) +=3D hisi-ptt.o -perf-util-$(CONFIG_AUXTRACE) +=3D hisi-ptt-decoder/ -perf-util-$(CONFIG_AUXTRACE) +=3D s390-cpumsf.o -perf-util-$(CONFIG_AUXTRACE) +=3D powerpc-vpadtl.o +perf-util-y +=3D intel-pt.o +perf-util-y +=3D intel-bts.o +perf-util-y +=3D arm-spe.o +perf-util-y +=3D arm-spe-decoder/ +perf-util-y +=3D hisi-ptt.o +perf-util-y +=3D hisi-ptt-decoder/ +perf-util-y +=3D s390-cpumsf.o +perf-util-y +=3D powerpc-vpadtl.o =20 ifdef CONFIG_LIBOPENCSD -perf-util-$(CONFIG_AUXTRACE) +=3D cs-etm.o -perf-util-$(CONFIG_AUXTRACE) +=3D cs-etm-decoder/ +perf-util-y +=3D cs-etm.o +perf-util-y +=3D cs-etm-decoder/ endif -perf-util-$(CONFIG_AUXTRACE) +=3D cs-etm-base.o +perf-util-y +=3D cs-etm-base.o =20 perf-util-y +=3D parse-branch-options.o perf-util-y +=3D dump-insn.o diff --git a/tools/perf/util/arm-spe-decoder/Build b/tools/perf/util/arm-sp= e-decoder/Build index 960062b3cb9e..ab500e0efe24 100644 --- a/tools/perf/util/arm-spe-decoder/Build +++ b/tools/perf/util/arm-spe-decoder/Build @@ -1 +1 @@ -perf-util-$(CONFIG_AUXTRACE) +=3D arm-spe-pkt-decoder.o arm-spe-decoder.o +perf-util-y +=3D arm-spe-pkt-decoder.o arm-spe-decoder.o diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index b320a387464d..59cf72b935ff 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -7,17 +7,12 @@ #ifndef __PERF_AUXTRACE_H #define __PERF_AUXTRACE_H =20 -#include #include -#include -#include #include // FILE -#include #include #include -#include -#include #include +#include =20 union perf_event; struct perf_session; @@ -459,8 +454,6 @@ struct addr_filters { =20 struct auxtrace_cache; =20 -#ifdef HAVE_AUXTRACE_SUPPORT - u64 compat_auxtrace_mmap__read_head(struct auxtrace_mmap *mm); int compat_auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail); =20 @@ -706,215 +699,4 @@ void itrace_synth_opts__clear_time_range(struct itrac= e_synth_opts *opts) opts->range_num =3D 0; } =20 -#else -#include "debug.h" - -static inline struct auxtrace_record * -auxtrace_record__init(struct evlist *evlist __maybe_unused, - int *err) -{ - *err =3D 0; - return NULL; -} - -static inline -void auxtrace_record__free(struct auxtrace_record *itr __maybe_unused) -{ -} - -static inline -int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused, - struct evlist *evlist __maybe_unused, - struct record_opts *opts __maybe_unused) -{ - return 0; -} - -static inline -int perf_event__process_auxtrace_info(const struct perf_tool *tool __maybe= _unused, - struct perf_session *session __maybe_unused, - union perf_event *event __maybe_unused) -{ - return 0; -} - -static inline -s64 perf_event__process_auxtrace(const struct perf_tool *tool __maybe_unus= ed, - struct perf_session *session __maybe_unused, - union perf_event *event __maybe_unused) -{ - return 0; -} - -static inline -int perf_event__process_auxtrace_error(const struct perf_tool *tool __mayb= e_unused, - struct perf_session *session __maybe_unused, - union perf_event *event __maybe_unused) -{ - return 0; -} - -static inline -void perf_session__auxtrace_error_inc(struct perf_session *session - __maybe_unused, - union perf_event *event - __maybe_unused) -{ -} - -static inline -void events_stats__auxtrace_error_warn(const struct events_stats *stats - __maybe_unused) -{ -} - -static inline -int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts __mayb= e_unused, - const char *str __maybe_unused, int unset __maybe_unused) -{ - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -static inline -int itrace_parse_synth_opts(const struct option *opt __maybe_unused, - const char *str __maybe_unused, - int unset __maybe_unused) -{ - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -static inline -int auxtrace_parse_snapshot_options(struct auxtrace_record *itr __maybe_un= used, - struct record_opts *opts __maybe_unused, - const char *str) -{ - if (!str) - return 0; - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -static inline -int auxtrace_parse_sample_options(struct auxtrace_record *itr __maybe_unus= ed, - struct evlist *evlist __maybe_unused, - struct record_opts *opts __maybe_unused, - const char *str) -{ - if (!str) - return 0; - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -static inline -int auxtrace_parse_aux_action(struct evlist *evlist __maybe_unused) -{ - pr_err("AUX area tracing not supported\n"); - return -EINVAL; -} - -static inline -int auxtrace__process_event(struct perf_session *session __maybe_unused, - union perf_event *event __maybe_unused, - struct perf_sample *sample __maybe_unused, - const struct perf_tool *tool __maybe_unused) -{ - return 0; -} - -static inline -void auxtrace__dump_auxtrace_sample(struct perf_session *session __maybe_u= nused, - struct perf_sample *sample __maybe_unused) -{ -} - -static inline -int auxtrace__flush_events(struct perf_session *session __maybe_unused, - const struct perf_tool *tool __maybe_unused) -{ - return 0; -} - -static inline -void auxtrace__free_events(struct perf_session *session __maybe_unused) -{ -} - -static inline -void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache __maybe_un= used) -{ -} - -static inline -void auxtrace__free(struct perf_session *session __maybe_unused) -{ -} - -static inline -int auxtrace_index__write(int fd __maybe_unused, - struct list_head *head __maybe_unused) -{ - return -EINVAL; -} - -static inline -int auxtrace_index__process(int fd __maybe_unused, - u64 size __maybe_unused, - struct perf_session *session __maybe_unused, - bool needs_swap __maybe_unused) -{ - return -EINVAL; -} - -static inline -void auxtrace_index__free(struct list_head *head __maybe_unused) -{ -} - -static inline -bool auxtrace__evsel_is_auxtrace(struct perf_session *session __maybe_unus= ed, - struct evsel *evsel __maybe_unused) -{ - return false; -} - -static inline -int auxtrace_parse_filters(struct evlist *evlist __maybe_unused) -{ - return 0; -} - -int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, - struct auxtrace_mmap_params *mp, - void *userpg, int fd); -void auxtrace_mmap__munmap(struct auxtrace_mmap *mm); -void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp, - off_t auxtrace_offset, - unsigned int auxtrace_pages, - bool auxtrace_overwrite); -void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp, - struct evlist *evlist, - struct evsel *evsel, int idx); - -#define ITRACE_HELP "" - -static inline -void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts - __maybe_unused, - struct perf_time_interval *ptime_range - __maybe_unused, - int range_num __maybe_unused) -{ -} - -static inline -void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts - __maybe_unused) -{ -} - -#endif - #endif diff --git a/tools/perf/util/cs-etm-decoder/Build b/tools/perf/util/cs-etm-= decoder/Build index 056d665f7f88..27550db2aa4c 100644 --- a/tools/perf/util/cs-etm-decoder/Build +++ b/tools/perf/util/cs-etm-decoder/Build @@ -1 +1 @@ -perf-util-$(CONFIG_AUXTRACE) +=3D cs-etm-decoder.o +perf-util-y +=3D cs-etm-decoder.o diff --git a/tools/perf/util/hisi-ptt-decoder/Build b/tools/perf/util/hisi-= ptt-decoder/Build index 3298f7b7e308..2ee0eb731656 100644 --- a/tools/perf/util/hisi-ptt-decoder/Build +++ b/tools/perf/util/hisi-ptt-decoder/Build @@ -1 +1 @@ -perf-util-$(CONFIG_AUXTRACE) +=3D hisi-ptt-pkt-decoder.o +perf-util-y +=3D hisi-ptt-pkt-decoder.o diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel= -pt-decoder/Build index 5b8f0149167d..8fd7e4330044 100644 --- a/tools/perf/util/intel-pt-decoder/Build +++ b/tools/perf/util/intel-pt-decoder/Build @@ -1,4 +1,4 @@ -perf-util-$(CONFIG_AUXTRACE) +=3D intel-pt-pkt-decoder.o intel-pt-insn-dec= oder.o intel-pt-log.o intel-pt-decoder.o +perf-util-y +=3D intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-l= og.o intel-pt-decoder.o =20 inat_tables_script =3D $(srctree)/tools/arch/x86/tools/gen-insn-attr-x86.a= wk inat_tables_maps =3D $(srctree)/tools/arch/x86/lib/x86-opcode-map.txt @@ -7,11 +7,7 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_table= s_script) $(inat_table $(call rule_mkdir) @$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) = > $@ || rm -f $@ =20 -ifeq ($(SRCARCH),x86) - perf-util-y +=3D inat.o insn.o -else - perf-util-$(CONFIG_AUXTRACE) +=3D inat.o insn.o -endif +perf-util-y +=3D inat.o insn.o =20 $(OUTPUT)util/intel-pt-decoder/inat.o: $(srctree)/tools/arch/x86/lib/inat.= c $(OUTPUT)util/intel-pt-decoder/inat-tables.c $(call rule_mkdir) diff --git a/tools/perf/util/synthetic-events.h b/tools/perf/util/synthetic= -events.h index ee29615d68e5..f8588b6cf11a 100644 --- a/tools/perf/util/synthetic-events.h +++ b/tools/perf/util/synthetic-events.h @@ -107,24 +107,9 @@ int machine__synthesize_threads(struct machine *machin= e, struct target *target, struct perf_thread_map *threads, bool needs_mmap, bool data_mmap, unsigned int nr_threads_synthesize); =20 -#ifdef HAVE_AUXTRACE_SUPPORT int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr, cons= t struct perf_tool *tool, struct perf_session *session, perf_event__handler_t process); =20 -#else // HAVE_AUXTRACE_SUPPORT - -#include - -static inline int -perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr __maybe_u= nused, - const struct perf_tool *tool __maybe_unused, - struct perf_session *session __maybe_unused, - perf_event__handler_t process __maybe_unused) -{ - return -EINVAL; -} -#endif // HAVE_AUXTRACE_SUPPORT - #ifdef HAVE_LIBBPF_SUPPORT int perf_event__synthesize_bpf_events(struct perf_session *session, perf_e= vent__handler_t process, struct machine *machine, struct record_opts *opts); --=20 2.51.2.1041.gc1ab5b90ca-goog From nobody Sun Feb 8 04:15:12 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 4575221C194 for ; Mon, 10 Nov 2025 01:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738406; cv=none; b=uOf0gHa6GrNiA3ZUueCron0QVWlfxIgoxFlopdxeb8RPGSI08YlM/i2R7KbsosYpKCmYL4ZuzMR7mM31mM2YAtWx0zcdi/cTpcXTKJ1dY4MfiUOWAFWMhN7xhPyj5YAjZW1OjiE1Q/kYLnq1W/HGeZ6u9nPCpZ91Xqrrvt1QXpw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762738406; c=relaxed/simple; bh=okLVEx2Z0nDoWuy9Rr2c630PhagrswsITGTgjHOW3K4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=XKIYcKDVGNbmUJfzQxqACoLnIZYh0RXoh8a+t7laEJf9v8i0ibTD5sDW/Tv3w5/Uw23VkbLvawhZI/GA8RPl51yuG9LldrZWYmX8RgkjdUtV2bobBEyCUvywSMoBN+ke2MeKf+eFfjr8kUyYbf8+lLcx8bwINKQD/Pycrj62g08= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=BSk5508t; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BSk5508t" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-29809acd049so9040165ad.3 for ; Sun, 09 Nov 2025 17:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762738402; x=1763343202; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=myu3L4iks2Z/QSz7cXwMd07OMbyenZ2wKrFbuRIGMWY=; b=BSk5508tGOh9qftsBHK6D6RLl8eTF5SbrZmklXNlKPckeGQvG6HMcw2dr8wculifcQ NId944ItZVOJkKjc+RhCqJ5rO4HRkxnSOklEBl/TNvELALoyE7fc681hFZGmc+qnqiGr tYK/Uuxh5Q79quX2VGlJxIcb5EJk7IoVIH6msdGZOVQktdO4CKFjUM2L+WxQ8geh1n/L 8xpF9dA/pZqowkiraZjLMxHnNGL1wI1Ptvyn6ADQBnJSLFdVRqCDRXJoL9Wxof7EO1qM VVIe/lyMkGSz2SpPUGt/FUdKXRbXQ5eBdaV/SQCuKUbw7mP3CdtixNOFl7LD7lXpNuQo 52iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762738402; x=1763343202; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=myu3L4iks2Z/QSz7cXwMd07OMbyenZ2wKrFbuRIGMWY=; b=i2r38F0502BBu6IAWVKNIwqxwuqwpcU1nQRo/5JT+EjewaliEiuoaEOLhRQOugiDSJ 6p7rbJ2vSTcaBMAteYvIc1aa5XMsI6APTZ8BBD03sNbO9HskwUL58z5HDIp49cL1Y+At AnmfihRcqJxle2UI2+RdorTDfYDC7sP1U9NIXKvzrnB6kjMcY790j9WVlGLgJ3/60VjV dLqTRM+gh9KhkHTk+6O9Tx7nmJjgrfyQfBMnUzxeoJlTy2qlMAsDn9TrUKzske/SEfmJ mbxmtGz9sSrAFdyzygetLUzWBeRA6ofRCSAYbh4wty5tENWr+t6PTJd+4hc52cJqK6uN RfVA== X-Forwarded-Encrypted: i=1; AJvYcCVVUHmEVt+opcJ1Ug3+UA2oxfST5plQPt1+CFX/R3HJM9wZNP3kjfizI8/eUxyam6Yhc0ddUt58GGrP3eA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywv6nm8t+kG7XAz2Ig8ng05+fn3TnC4wfIc7RTawMrvs39OJg3u tIvr/1HIw1Ds7bEOOeqGxUsvRbRe7sDVVLBzWq7OqeqFxfvvkX7AgSD4wc5StDUU9br4hnHXMUU OqMZBnTQymA== X-Google-Smtp-Source: AGHT+IHL3gZbw6A3j8P4KaKK3OWtqFFb+mIJclikOrQBB+uCPq+icWqCkdpk4pMnmUjkwkO6qL5pm6frwPwo X-Received: from pjbso2.prod.google.com ([2002:a17:90b:1f82:b0:33b:ab61:4f71]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:dace:b0:295:28a4:f0aa with SMTP id d9443c01a7336-297e56cfa6emr79657575ad.43.1762738402046; Sun, 09 Nov 2025 17:33:22 -0800 (PST) Date: Sun, 9 Nov 2025 17:31:52 -0800 In-Reply-To: <20251110013152.3099080-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251110013152.3099080-1-irogers@google.com> X-Mailer: git-send-email 2.51.2.1041.gc1ab5b90ca-goog Message-ID: <20251110013152.3099080-6-irogers@google.com> Subject: [PATCH v1 5/5] perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Suzuki K Poulose , Yicong Yang , Jonathan Cameron , Thomas Gleixner , Darren Hart , Davidlohr Bueso , "=?UTF-8?q?Andr=C3=A9=20Almeida?=" , Tomas Glozar , Quentin Monnet , Yuzhuo Jing , Blake Jones , Charlie Jenkins , Yeoreum Yun , Athira Rajeev , Ravi Bangoria , Collin Funk , Dapeng Mi , Thomas Richter , Dmitry Vyukov , Andi Kleen , Howard Chu , Zecheng Li , tanze , Gabriele Monaco , GuoHan Zhao , Markus Elfring , Colin Ian King , Kan Liang , "Dr. David Alan Gilbert" , Jean-Philippe Romain , Yang Li , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" errno.h isn't used in auxtrace.h so remove it and fix build failures caused by transitive dependencies through auxtrace.h on errno.h. Signed-off-by: Ian Rogers Reviewed-by: James Clark --- tools/perf/arch/arm/annotate/instructions.c | 1 + tools/perf/arch/arm/util/auxtrace.c | 1 + tools/perf/arch/arm64/annotate/instructions.c | 1 + tools/perf/arch/arm64/util/arm-spe.c | 1 + tools/perf/arch/arm64/util/hisi-ptt.c | 1 + tools/perf/arch/powerpc/util/auxtrace.c | 2 +- tools/perf/arch/s390/util/auxtrace.c | 1 + tools/perf/arch/x86/tests/topdown.c | 1 + tools/perf/arch/x86/util/topdown.c | 1 + tools/perf/bench/evlist-open-close.c | 1 + tools/perf/bench/futex.c | 1 + tools/perf/bench/pmu-scan.c | 1 + tools/perf/bench/synthesize.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/tests/hwmon_pmu.c | 1 + tools/perf/tests/parse-metric.c | 1 + tools/perf/tests/pfm.c | 1 + tools/perf/ui/hist.c | 1 + tools/perf/util/annotate-data.c | 2 +- tools/perf/util/auxtrace.h | 1 - tools/perf/util/bpf-filter.h | 2 ++ tools/perf/util/bpf-trace-summary.c | 1 + tools/perf/util/bpf_counter_cgroup.c | 1 + tools/perf/util/bpf_ftrace.c | 3 ++- tools/perf/util/bpf_map.c | 1 + tools/perf/util/cgroup.c | 1 + tools/perf/util/drm_pmu.c | 1 + tools/perf/util/evswitch.c | 1 + tools/perf/util/intel-tpebs.c | 1 + tools/perf/util/kvm-stat.h | 1 + tools/perf/util/mmap.c | 1 + tools/perf/util/pfm.c | 1 + tools/perf/util/powerpc-vpadtl.c | 1 + tools/perf/util/stat-shadow.c | 1 + 34 files changed, 35 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/= arm/annotate/instructions.c index cf91a43362b0..5e667b0f5512 100644 --- a/tools/perf/arch/arm/annotate/instructions.c +++ b/tools/perf/arch/arm/annotate/instructions.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include #include #include diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util= /auxtrace.c index 3b8eca0ffb17..eb6404267f17 100644 --- a/tools/perf/arch/arm/util/auxtrace.c +++ b/tools/perf/arch/arm/util/auxtrace.c @@ -5,6 +5,7 @@ */ =20 #include +#include #include #include #include diff --git a/tools/perf/arch/arm64/annotate/instructions.c b/tools/perf/arc= h/arm64/annotate/instructions.c index d465d093e7eb..16cb62d40bd9 100644 --- a/tools/perf/arch/arm64/annotate/instructions.c +++ b/tools/perf/arch/arm64/annotate/instructions.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/u= til/arm-spe.c index cac43cde7dbe..d5ec1408d0ae 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -10,6 +10,7 @@ #include #include #include +#include #include =20 #include "../../../util/cpumap.h" diff --git a/tools/perf/arch/arm64/util/hisi-ptt.c b/tools/perf/arch/arm64/= util/hisi-ptt.c index eac9739c87e6..fe457fd58c9e 100644 --- a/tools/perf/arch/arm64/util/hisi-ptt.c +++ b/tools/perf/arch/arm64/util/hisi-ptt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include =20 #include // page_size diff --git a/tools/perf/arch/powerpc/util/auxtrace.c b/tools/perf/arch/powe= rpc/util/auxtrace.c index 62c6f67f1bbe..292ea335e4ff 100644 --- a/tools/perf/arch/powerpc/util/auxtrace.c +++ b/tools/perf/arch/powerpc/util/auxtrace.c @@ -2,7 +2,7 @@ /* * VPA support */ - +#include #include #include #include diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/ut= il/auxtrace.c index 5068baa3e092..1a3676145066 100644 --- a/tools/perf/arch/s390/util/auxtrace.c +++ b/tools/perf/arch/s390/util/auxtrace.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/tools/perf/arch/x86/tests/topdown.c b/tools/perf/arch/x86/test= s/topdown.c index 1eba3b4594ef..3ee4e5e71be3 100644 --- a/tools/perf/arch/x86/tests/topdown.c +++ b/tools/perf/arch/x86/tests/topdown.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include "arch-tests.h" #include "../util/topdown.h" #include "debug.h" diff --git a/tools/perf/arch/x86/util/topdown.c b/tools/perf/arch/x86/util/= topdown.c index 0d01b662627a..bafd285119d7 100644 --- a/tools/perf/arch/x86/util/topdown.c +++ b/tools/perf/arch/x86/util/topdown.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include "util/evlist.h" #include "util/pmu.h" #include "util/pmus.h" diff --git a/tools/perf/bench/evlist-open-close.c b/tools/perf/bench/evlist= -open-close.c index bfaf50e4e519..faf9c34b4a5d 100644 --- a/tools/perf/bench/evlist-open-close.c +++ b/tools/perf/bench/evlist-open-close.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include diff --git a/tools/perf/bench/futex.c b/tools/perf/bench/futex.c index 1481196a22f0..1968c9d00b5b 100644 --- a/tools/perf/bench/futex.c +++ b/tools/perf/bench/futex.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include diff --git a/tools/perf/bench/pmu-scan.c b/tools/perf/bench/pmu-scan.c index 9e4d36486f62..14a464ad8cea 100644 --- a/tools/perf/bench/pmu-scan.c +++ b/tools/perf/bench/pmu-scan.c @@ -4,6 +4,7 @@ * * Copyright 2023 Google LLC. */ +#include #include #include "bench.h" #include "util/debug.h" diff --git a/tools/perf/bench/synthesize.c b/tools/perf/bench/synthesize.c index b3d493697675..265d49a913d9 100644 --- a/tools/perf/bench/synthesize.c +++ b/tools/perf/bench/synthesize.c @@ -6,6 +6,7 @@ * * Copyright 2019 Google LLC. */ +#include #include #include "bench.h" #include "../util/debug.h" diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c index c6496adff3fe..d43500b92a7b 100644 --- a/tools/perf/builtin-mem.c +++ b/tools/perf/builtin-mem.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c index 151f02701c8c..4aa4aac94f09 100644 --- a/tools/perf/tests/hwmon_pmu.c +++ b/tools/perf/tests/hwmon_pmu.c @@ -4,6 +4,7 @@ #include "hwmon_pmu.h" #include "parse-events.h" #include "tests.h" +#include #include #include #include diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metri= c.c index 66a5275917e2..9b1df1eb455a 100644 --- a/tools/perf/tests/parse-metric.c +++ b/tools/perf/tests/parse-metric.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include diff --git a/tools/perf/tests/pfm.c b/tools/perf/tests/pfm.c index 2e38dfa34b6c..fca4a86452df 100644 --- a/tools/perf/tests/pfm.c +++ b/tools/perf/tests/pfm.c @@ -4,6 +4,7 @@ * * Copyright 2020 Google LLC. */ +#include #include "tests.h" #include "util/debug.h" #include "util/evlist.h" diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index b085eb0de849..e58327595d37 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-dat= a.c index e183c6104d59..07cf9c334be0 100644 --- a/tools/perf/util/annotate-data.c +++ b/tools/perf/util/annotate-data.c @@ -4,7 +4,7 @@ * * Written by Namhyung Kim */ - +#include #include #include #include diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index 59cf72b935ff..eee2c11f7666 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -7,7 +7,6 @@ #ifndef __PERF_AUXTRACE_H #define __PERF_AUXTRACE_H =20 -#include #include // FILE #include #include diff --git a/tools/perf/util/bpf-filter.h b/tools/perf/util/bpf-filter.h index 122477f2de44..818c554b91b2 100644 --- a/tools/perf/util/bpf-filter.h +++ b/tools/perf/util/bpf-filter.h @@ -36,6 +36,8 @@ int perf_bpf_filter__unpin(void); =20 #else /* !HAVE_BPF_SKEL */ =20 +#include + static inline int perf_bpf_filter__parse(struct list_head *expr_head __may= be_unused, const char *str __maybe_unused) { diff --git a/tools/perf/util/bpf-trace-summary.c b/tools/perf/util/bpf-trac= e-summary.c index 8dfe7e678941..cf6e1e4402d5 100644 --- a/tools/perf/util/bpf-trace-summary.c +++ b/tools/perf/util/bpf-trace-summary.c @@ -1,4 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#include #include #include #include diff --git a/tools/perf/util/bpf_counter_cgroup.c b/tools/perf/util/bpf_cou= nter_cgroup.c index 68bd994c8880..17d7196c6589 100644 --- a/tools/perf/util/bpf_counter_cgroup.c +++ b/tools/perf/util/bpf_counter_cgroup.c @@ -4,6 +4,7 @@ /* Copyright (c) 2021 Google */ =20 #include +#include #include #include #include diff --git a/tools/perf/util/bpf_ftrace.c b/tools/perf/util/bpf_ftrace.c index e61a3b20be0a..c456d24efa30 100644 --- a/tools/perf/util/bpf_ftrace.c +++ b/tools/perf/util/bpf_ftrace.c @@ -1,6 +1,7 @@ -#include +#include #include #include +#include #include =20 #include diff --git a/tools/perf/util/bpf_map.c b/tools/perf/util/bpf_map.c index 578f27d2d6b4..442f91b4e8e1 100644 --- a/tools/perf/util/bpf_map.c +++ b/tools/perf/util/bpf_map.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c index 25e2769b5e74..040eb75f0804 100644 --- a/tools/perf/util/cgroup.c +++ b/tools/perf/util/cgroup.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/util/drm_pmu.c b/tools/perf/util/drm_pmu.c index 98d4d2b556d4..b3052266d599 100644 --- a/tools/perf/util/drm_pmu.c +++ b/tools/perf/util/drm_pmu.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/perf/util/evswitch.c b/tools/perf/util/evswitch.c index 40cb56a9347d..d4c06a3f825a 100644 --- a/tools/perf/util/evswitch.c +++ b/tools/perf/util/evswitch.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only // Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo =20 +#include #include "evswitch.h" #include "evlist.h" =20 diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c index 21359155f2a0..3c958d738ca6 100644 --- a/tools/perf/util/intel-tpebs.c +++ b/tools/perf/util/intel-tpebs.c @@ -25,6 +25,7 @@ #include "stat.h" #include #include +#include #include #include =20 diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h index 53db3d56108b..a356b839c2ee 100644 --- a/tools/perf/util/kvm-stat.h +++ b/tools/perf/util/kvm-stat.h @@ -10,6 +10,7 @@ #include "symbol.h" #include "record.h" =20 +#include #include #include =20 diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index a34726219af3..b69f926d314b 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -7,6 +7,7 @@ */ =20 #include +#include #include #include #include diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c index e5b3a2a5ddef..d9043f4afbe7 100644 --- a/tools/perf/util/pfm.c +++ b/tools/perf/util/pfm.c @@ -15,6 +15,7 @@ #include "util/strbuf.h" #include "util/thread_map.h" =20 +#include #include #include #include diff --git a/tools/perf/util/powerpc-vpadtl.c b/tools/perf/util/powerpc-vpa= dtl.c index bfa4156d7a97..d1c3396f182f 100644 --- a/tools/perf/util/powerpc-vpadtl.c +++ b/tools/perf/util/powerpc-vpadtl.c @@ -4,6 +4,7 @@ */ =20 #include +#include #include #include "color.h" #include "evlist.h" diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index abaf6b579bfc..0002e51194c2 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include #include "evsel.h" --=20 2.51.2.1041.gc1ab5b90ca-goog