From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (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 AA95D3E410E for ; Thu, 17 Sep 2026 04:53:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789620823; cv=none; b=JeH10QXYywnSokJx5btxkTFf63WDIaV0qHyg4DFH9CcYMgjG0uB4i7jvwAH9uRFpOlQDZIblKNHTrFGTBNE2y2QgcAU9tOX+CuG33I07ZgfnYhSwTyW7CaGLK7HeolUBLvho0UqPdmtSRQx3jmA7kdLvQunk14L201P9eT6Z7NY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789620823; c=relaxed/simple; bh=UFZw8ccWukYPTXWDhuLgW3RK9MncZoRZK2RoRe3blgM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=X8/+YS0s31aeYNOUi7FQpjml1tHMAKQmWlN6pxAu39EbrWLj8hb3QXkJ8P7DnlPxT4HnmZ3uxmJWAau5pnwdUKH7/CV3lLlTmzZMdOV3d7UN5xO2TLNWbH3TmreOczEPo3VdxDgN+IqDaW6tfYaN8MF/b/aNlbzE8+y6P4MgT/Q= 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=aQouRKFA; arc=none smtp.client-ip=209.85.214.197 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="aQouRKFA" Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2db3d832827so6445705ad.2 for ; Wed, 16 Sep 2026 21:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1789620821; x=1790225621; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FW5H/Iu2+HolG/+BtlKduLPhDgOXa5vtUBne8YJ7Hg8=; b=aQouRKFAVCJRi5owluvqZGmT+cV8D11I3TzY9QJzipzhQlTPbeUhXijDNFbiNeV6dN Q5bTmP0Q08LeFyAiFlFtV/YXTAETQEKnKH8zdSYPZ7Z6PWtypBJzk1YRBZsYpCeqxH1o NipLWmQ23a7TBo1Pu/goKk6jR1lx79iHbo4sC+wgYMgQ7L9unXgcVpa5EEzIT5bwu+LO BM5GotZpnNoCr4gbnys/6tGE/Gba3lPlQ5J6/xDa3A1TM/6/5nay+drveYuQb3tQrvcl b7VuNhYHfTCU1NUoV2+9pQjHFnWEJl/5SYmxzpZuFifTEj7lLoUpMKT2VhmT6w8azGA8 otEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789620821; x=1790225621; h=content-type: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:content-type; bh=FW5H/Iu2+HolG/+BtlKduLPhDgOXa5vtUBne8YJ7Hg8=; b=Y0A5HpQDpT+nb6TdqHIA5tJkTDMxqWMPirjeK5T0WjNxHbDXuA7eFDQ6yMT2xMm3qA xt7aXeZiBsFepqPfxLBq/q0oMwhP00+/hhHBfddJfL2ebXXcXiVngGuVCh9DPTTpWnna KErQGuE9kHq73zPD4ZUlTJUKE5c0tI9ok+Y1U5d2gnPp4wd28cSKC1ToSFuwlHFvl3/W 6546mh3TOR2u+AFnVrdm3xU/dkfQv5YyFYZPmOhhVpO72aMm4YN90ct9fvfBFJk9NEhL aD4i4Asqwm1UcKNmaTsy88SYx2YczTpyn6aRLJRzTEGnqE+pUCal2DiSHKwTYMyn74RF IAJw== X-Forwarded-Encrypted: i=1; AKwUvBzQ1vLHIGz+Gr5k4DHqKJGz0DbnT2bOxUzfOvxA6b+d8tPCNGJx9InkqRqP4BMahDOItS3L24TBjANjPr4=@vger.kernel.org X-Gm-Message-State: AFuF++kG2LQMtA5iZV9jyaiTvqoY1+3eN/9capMfRqQz81VRukDLH+Gr M/QDJNfYRwS3owfGXlqBHkkFDTxqaWl6x+GtDuFP5c4kdh74Xscvs0hiL3MLBHL5me85vI63mCV iWf2UJwUEsw== X-Received: from dybzy15.prod.google.com ([2002:a05:7301:e10f:b0:336:e0f9:1b3]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:b85:b0:2dd:9b53:f9ba with SMTP id d9443c01a7336-2dd9b53faa9mr59334475ad.1.1789620820770; Wed, 16 Sep 2026 21:53:40 -0700 (PDT) Date: Wed, 16 Sep 2026 21:53:19 -0700 In-Reply-To: <20260917045326.63601-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: <20260917045326.63601-1-irogers@google.com> X-Mailer: git-send-email 2.55.0.1082.g2b9226bbc0-goog Message-ID: <20260917045326.63601-4-irogers@google.com> Subject: [PATCH v1 04/11] perf llvm: missing explicit POSIX headers in symbol__disassemble_llvm() From: Ian Rogers To: Arnaldo Carvalho de Melo , Namhyung Kim , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: sashiko-bot@kernel.org Content-Type: text/plain; charset="UTF-8" Sashiko reported: When building the perf tool in an environment utilizing a strict C library such as musl libc, compilation fails because tools/perf/util/llvm.c omits explicit inclusion of and . The function symbol__disassemble_llvm() directly invokes free() for memory deallocation and utilizes the PRIx64 macro for formatting 64-bit integers. While glibc often implicitly provides these POSIX definitions via other includes, relying on transitive inclusion creates a brittle dependency that violates perf subsystem portability guidelines. On environments that do not implicitly pull in these headers, the compiler encounters undeclared identifier and unknown type name errors for free() and PRIx64, preventing successful builds of the perf toolchain. Add the header files and use git clang-format to sort. Reported-by: sashiko-bot@kernel.org Signed-off-by: Ian Rogers --- tools/perf/util/llvm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c index a0deb742a733..95efd089014b 100644 --- a/tools/perf/util/llvm.c +++ b/tools/perf/util/llvm.c @@ -1,5 +1,14 @@ // SPDX-License-Identifier: GPL-2.0 #include "llvm.h" + +#include +#include +#include + +#include +#include +#include + #include "annotate.h" #include "debug.h" #include "dso.h" @@ -7,10 +16,6 @@ #include "namespaces.h" #include "srcline.h" #include "symbol.h" -#include -#include -#include -#include #ifdef HAVE_LIBLLVM_SUPPORT #include "llvm-c-helpers.h" -- 2.55.0.1082.g2b9226bbc0-goog