<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63456>63456</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[BOLT] PERF2BOLT fails at stage 3 using the LBR sampling method
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ms178
</td>
</tr>
</table>
<pre>
@aaupov Also seen with LLVM-17 (7c2604ca196c3ba0247509c0fde350e23f0cccb0) is the following issue when using the LBR sampling method for BOLT profile gathering (which uses the [build_stage3-bolt.bash](https://github.com/ms178/archpkgbuilds/blob/main/toolchain-experimental/llvm-bolt-scripts-master/build_stage3-bolt.bash) script in my repo. As all was fine in LLVM snapshots from last week, I suspect either an issue on my system or the newly locally introduced usage of `-mllvm -enable-dfa-jump-thread` during stage 2 or during training could lead to this. As the script automatically handles the re-naming of the binary etc., I cannot explain why I get the error message at the end.
```
RF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x557be99dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x55cee37dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x5573551dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x561af2bdd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x55acf17dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x559cc33dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x556f1cbdd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x55ea9abdd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x55a6549dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x55c7d69dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
PERF2BOLT-WARNING: unable to find base address of the binary when memory mapped at 0x561b1f3dd000 using file offset 0x21dd000. Ignoring profile data for this mapping
[snipping dozens of similar lines]
PERF2BOLT-ERROR: could not find a profile matching binary "/home/marcus/toolchain/llvm/stage2-prof-use-lto/install/bin/clang-17". Profile for the following binary name(s) is available:
bash
clang-17
clang-tblgen
cmake
git
ld-linux-x86-64.so.2
libbrotlicommon.so.1.0.9
libbrotlidec.so.1.0.9
libbrotlienc.so.1.0.9
libbz2.so.1.0.8
libc.so.6
libcom_err.so.2.1
libcrypto.so.3
libcurl.so.4.8.0
libffi.so.8.1.2
libgcc_s.so.1
libgmp.so.10.4.1
libgnutls.so.30.35.0
libgssapi_krb5.so.2.2
libhogweed.so.6.8
libicuuc.so.72.1
libidn2.so.0.3.8
libjsoncpp.so.25
libk5crypto.so.3.1
libkeyutils.so.1.10
libkrb5.so.3.3
libkrb5support.so.0.1
liblzma.so.5.4.3
libm.so.6
libncursesw.so.6.4
libnettle.so.8.8
libnghttp2.so.14.24.2
libp11-kit.so.0.3.0
libpcre2-8.so.0.11.2
libpsl.so.5.3.4
libreadline.so.8.2
libresolv.so.2
librhash.so.0
librtmp.so.1
libssh2.so.1.0.1
libssl.so.3
libstdc++.so.6.0.32
libtasn1.so.6.6.3
libunistring.so.5.0.0
libuv.so.1.0.0
libxml2.so.2.10.4
libz.so.1.2.13.zlib-ng
libzstd.so.1.5.5
lld
llvm-ar
llvm-min-tblgen
llvm-tblgen
ninja
Please rename the input binary.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUWE1v4zgS_TX0hZBAUR-2Dj4km_Gigd6ZQbDYP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