From nobody Mon Jun 8 19:36:08 2026 Received: from mail-dy1-f201.google.com (mail-dy1-f201.google.com [74.125.82.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 9FDD3316199 for ; Tue, 26 May 2026 22:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779835368; cv=none; b=EwJyB/i0x7ptAqGL9vCvV+NhI7fKJTFQpPAgSNaoxWt6zP+1OD+SL6oVVSHRMjElp+dphmxLW/PVFIWht2QtqZkxJlduXsi4vpP/YGx8fYZTonH6WL9bVgd1GrapTK2SiKgZVVGKqRrS1vfIREqXpiIxN0smMFHF6SBqwiIJXqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779835368; c=relaxed/simple; bh=vww+rjEciI/jnuHVolvlPKNoqynwRPmfdwRnigpNjsk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Ge3gtFQpURabY26fqFmLhuYIji5Rntc71pNsJVSGtz868XThNI0RJLUvM002nJIecDB5IX5P/OsPHjVmw2gZ5o52QMFt7SwbRWVvIYiv1orcZJPmkoGAm0KWOvwXUlx9b4gq217CAq2fJ0s77zV5zSLM4FKK+jPcA45baq0DA1k= 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=ggb7Y3dl; arc=none smtp.client-ip=74.125.82.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="ggb7Y3dl" Received: by mail-dy1-f201.google.com with SMTP id 5a478bee46e88-2f5943ca81aso1700140eec.0 for ; Tue, 26 May 2026 15:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1779835366; x=1780440166; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=xQxE4m0y/g/kyGF/YyzHUqc5QrloWGxY2+46+x6obQ0=; b=ggb7Y3dlE8NfzVzoUuJthES1VJClQZZplhbfZgKCwDz6yRnQ4FdcOwm+Q35tl1JCdS WbTdOEs5r7fgwQq/KNwZG5ioYHcrLvunEU+r2rjWw1ON31BitsXtwsLUElgQuHQ2k/vW 3+n8931En6RSjdASGgqCZe+NSoiKx00D9zlAXAEyXNkyzVprHw1cATKKGwqkt8n0ae5j A+AvmNSRp7IQQHD7ImyRsaWcFOMZD2CQ16sOKeM5RkN3CyHi6f8EGVnmTbm/mE1jEAUY SCD1FcPLwoXvzV3fGb12cuHPiIHPU/PX2r46oipze4JrS46ab4N52irtem+XVCS58F8l ARuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779835366; x=1780440166; h=content-transfer-encoding:cc: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=xQxE4m0y/g/kyGF/YyzHUqc5QrloWGxY2+46+x6obQ0=; b=kTzfy8YBISnnSb1MwWdn6bg4e6LT8cLHgDNSuDVoH86PPRN17nos8SZbO1nKIpG68t XM2xRCYVaVFcl9NsGVJjfz/9HnpDCdGrjKPjgjutV5z0LzGn7OelhuR0V/xXXK7Ik8G2 hTd5SV8WZ8wbFmx7/jWc9/5auuYW4xnYJfjJK4V8CG9hWiFDiTH8zw1ncA0WEz8Z/yK9 I20y0ytJfbdgDu3h6Uh6y5nKjk+QxL00ItYLY3kOD+zJ/HnJ+sBofqW5yZkSZo6d0Svs AiyYZh6CesDwIrzRSaloh9OQYvJpD0COD9jEqySQUseJ16dDg4ekcK9ul5xgORf0mRvW H9ig== X-Forwarded-Encrypted: i=1; AFNElJ8LNdtVCp61fLVc2skm1kvjAwaVtTsb76MQyw2lFxdlDel9Dcgpe+X0Cm1pUVHHA8aFWWy6+s6YArcJv34=@vger.kernel.org X-Gm-Message-State: AOJu0YzeLP6zQWEiCHWWZD5JEHHvb5RhlUuwMgF0K4YfoM8JQKNpNMHu GMhrOLYB55NhRcu7SzdgoDvHeK2I0RQ1FF5+LTt63kB02tVrHB+8BzTxRRlgJ/V+e2lU3O7QAIe dMMzMuGLuqA== X-Received: from dybup7.prod.google.com ([2002:a05:7301:c087:b0:304:997c:c43e]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:ef83:b0:2f2:b544:2fd4 with SMTP id 5a478bee46e88-30449201503mr10361396eec.34.1779835365521; Tue, 26 May 2026 15:42:45 -0700 (PDT) Date: Tue, 26 May 2026 15:42:41 -0700 In-Reply-To: <20260526213911.3993710-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: <20260526213911.3993710-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.823.g6e5bcc1fc9-goog Message-ID: <20260526224241.4016312-1-irogers@google.com> Subject: [PATCH v2] perf clang-format: Prioritize Python.h and expand other categories From: Ian Rogers To: irogers@google.com, acme@kernel.org, namhyung@kernel.org Cc: adrian.hunter@intel.com, james.clark@linaro.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mingo@redhat.com, peterz@infradead.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" - Prioritize Python.h by sorting it first (Priority 0). - Shift other header priorities down to accommodate Python.h. - Sanity check and complete "C Standard Library Headers" up to C23 (added stdbit.h, stdckdint.h). - Sanity check and complete "OS/System-Specific Headers" based on actual usage in tools/perf (added asm-generic, uapi, and various flat POSIX/system headers). Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.5-flash --- tools/perf/.clang-format | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/perf/.clang-format b/tools/perf/.clang-format index 902b2f7456f6..e4cff363a603 100644 --- a/tools/perf/.clang-format +++ b/tools/perf/.clang-format @@ -2,15 +2,18 @@ BasedOnStyle: InheritParentConfig SortIncludes: true IncludeBlocks: Regroup IncludeCategories: + # Python.h must be first + - Regex: '^' + Priority: -1 # Implicitly the corresponding header for the C file has Priority 0 # C Standard Library Headers - - Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|is= o646|limits|locale|math|setjmp|signal|stdalign|stdarg|stdatomic|stdbool|std= def|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|time|uchar|wchar|= wctype)\.h>' + - Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|is= o646|limits|locale|math|setjmp|signal|stdalign|stdarg|stdatomic|stdbit|stdb= ool|stdckdint|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|= time|uchar|wchar|wctype)\.h>' Priority: 1 # OS/System-Specific Headers (directories) - - Regex: '^<(sys|linux|asm|arpa|net|netinet|x86_64|machine)/.*= >' + - Regex: '^<(arpa|asm|asm-generic|linux|machine|net|netinet|sy= s|uapi|x86_64)/.*>' Priority: 2 # OS/System-Specific Headers (POSIX/System flat headers) - - Regex: '^<(unistd|pthread|fcntl|dirent|dlfcn|poll|sched|sema= phore|spawn|syslog|termios|pwd|grp|netdb|sysexits|err|paths|pty|utmp|resolv= |ifaddrs|elf|libelf|gelf)\.h>' + - Regex: '^<(aio|byteswap|dirent|dlfcn|elf|endian|err|execinfo= |fcntl|features|fnmatch|ftw|gelf|getopt|grp|ifaddrs|libelf|libgen|malloc|me= mory|mntent|netdb|numa|numaif|paths|poll|pthread|pty|pwd|regex|resolv|sched= |semaphore|spawn|strings|syscall|sysexits|syslog|termios|unistd|utmp|x86int= rin)\.h>' Priority: 2 # Third-Party Library Headers - Regex: '^<.*>' --=20 2.54.0.823.g6e5bcc1fc9-goog