From 8d4b9fb8d941610e0f4d8729dc72f4da96ef4f21 Mon Sep 17 00:00:00 2001 From: eastb233 Date: Tue, 16 Dec 2025 11:50:02 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!343=20:?= =?UTF-8?q?=20[Sample=20Profile]=20make=20page=20size=20configurable=20for?= =?UTF-8?q?=20ProfiledBinary'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- llvm/tools/llvm-profgen/ProfiledBinary.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.cpp b/llvm/tools/llvm-profgen/ProfiledBinary.cpp index 35187c409f6e..632ddc7b50f5 100644 --- a/llvm/tools/llvm-profgen/ProfiledBinary.cpp +++ b/llvm/tools/llvm-profgen/ProfiledBinary.cpp @@ -60,11 +60,6 @@ static cl::opt KernelBinary("kernel", cl::desc("Generate the profile for Linux kernel binary.")); -static cl::opt - Pagesize("page-size", - cl::desc("page size"), cl::init(0x1000), - cl::desc("target system pagee size.")); - extern cl::opt ShowDetailedWarning; extern cl::opt InferMissingFrames; @@ -331,7 +326,7 @@ void ProfiledBinary::setPreferredTextSegmentAddresses(const ELFFile &Obj, // However such info isn't available at post-processing time, assuming // 4K page now. Note that we don't use EXEC_PAGESIZE from // because we may build the tools on non-linux. - uint64_t PageSize = Pagesize; + uint64_t PageSize = 0x1000; for (const typename ELFT::Phdr &Phdr : PhdrRange) { if (Phdr.p_type == ELF::PT_LOAD) { if (!FirstLoadableAddress) -- Gitee