GithubHelp home page GithubHelp logo

bolt's Introduction

BOLT project is now part of LLVM!

This repository will not be updated. Please navigate to https://github.com/llvm/llvm-project/tree/main/bolt for up-to-date code and instructions.

The LLVM Compiler Infrastructure

This directory and its sub-directories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The README briefly describes how to get started with building LLVM. For more information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting Started with the LLVM System

Taken from https://llvm.org/docs/GettingStarted.html.

Overview

Welcome to the LLVM project!

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer. It also contains basic regression tests.

C-like languages use the Clang front end. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

The LLVM Getting Started documentation may be out of date. The Clang Getting Started page might have more accurate information.

This is an example work-flow and configuration to get and build the LLVM source:

  1. Checkout LLVM (including related sub-projects like Clang):

    • git clone https://github.com/llvm/llvm-project.git

    • Or, on windows, git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git

  2. Configure and build LLVM and Clang:

    • cd llvm-project

    • cmake -S llvm -B build -G <generator> [options]

      Some common build system generators are:

      • Ninja --- for generating Ninja build files. Most llvm developers use Ninja.
      • Unix Makefiles --- for generating make-compatible parallel makefiles.
      • Visual Studio --- for generating Visual Studio projects and solutions.
      • Xcode --- for generating Xcode projects.

      Some common options:

      • -DLLVM_ENABLE_PROJECTS='...' --- semicolon-separated list of the LLVM sub-projects you'd like to additionally build. Can include any of: clang, clang-tools-extra, compiler-rt,cross-project-tests, flang, libc, libclc, libcxx, libcxxabi, libunwind, lld, lldb, mlir, openmp, polly, or pstl.

        For example, to build LLVM, Clang, libcxx, and libcxxabi, use -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi".

      • -DCMAKE_INSTALL_PREFIX=directory --- Specify for directory the full path name of where you want the LLVM tools and libraries to be installed (default /usr/local).

      • -DCMAKE_BUILD_TYPE=type --- Valid options for type are Debug, Release, RelWithDebInfo, and MinSizeRel. Default is Debug.

      • -DLLVM_ENABLE_ASSERTIONS=On --- Compile with assertion checks enabled (default is Yes for Debug builds, No for all other build types).

    • cmake --build build [-- [options] <target>] or your build system specified above directly.

      • The default target (i.e. ninja or make) will build all of LLVM.

      • The check-all target (i.e. ninja check-all) will run the regression tests to ensure everything is in working order.

      • CMake will generate targets for each tool and library, and most LLVM sub-projects generate their own check-<project> target.

      • Running a serial build will be slow. To improve speed, try running a parallel build. That's done by default in Ninja; for make, use the option -j NNN, where NNN is the number of parallel jobs, e.g. the number of CPUs you have.

    • For more information see CMake

Consult the Getting Started with LLVM page for detailed information on configuring and compiling LLVM. You can visit Directory Layout to learn about the layout of the source code tree.

bolt's People

Contributors

akyrtzi avatar arsenm avatar chandlerc avatar chapuni avatar d0k avatar ddunbar avatar douggregor avatar dwblaikie avatar echristo avatar eefriedman avatar ericwf avatar espindola avatar isanbard avatar kcc avatar labath avatar lattner avatar lebedevri avatar lhames avatar maskray avatar nico avatar resistor avatar rksimon avatar rnk avatar rotateright avatar rui314 avatar stoklund avatar tkremenek avatar tobiasgrosser avatar topperc avatar zygoloid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bolt's Issues

`LLVM ERROR: Undefined temporary symbol` from llvm-bolt, no binary generated

Invocation as
> sudo PATH=$PATH:build/bin build/bin/llvm-bolt cookiemonster -o cookiemonster.bolt reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats -update-debug-sections -data=perf.fdata

results in output

BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x4e00000, offset 0x4a00000
BOLT-INFO: enabling relocation mode
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected
BOLT-INFO: 704 functions out of 7668 simple functions (9.2%) have non-empty execution profile.
BOLT-INFO: 194 non-simple function(s) have profile.
BOLT-INFO: profile for 1 objects was ignored
BOLT-INFO: the input contains 348 (dynamic count : 498927) missed opportunities for macro-fusion optimization. Will fix instances on a hot path.
BOLT-INFO: removed 32 'repz' prefixes with estimated execution count of 0 times.
BOLT-INFO: UCE removed 1413 blocks and 26003 bytes of code.
BOLT-INFO: running hfsort+ for 709 functions
BOLT-INFO: program-wide dynostats after all optimizations before SCTC and FOP:

            34106516 : executed forward branches
             7414759 : taken forward branches
            15375720 : executed backward branches
             8358219 : taken backward branches
             4648654 : executed unconditional branches
            19960039 : all function calls
             7434182 : indirect calls
             6583156 : PLT calls
           377604140 : executed instructions
            92739869 : executed load instructions
            59455877 : executed store instructions
               28577 : taken jump table branches
            54130890 : total branches
            20421632 : taken branches
            33709258 : non-taken conditional branches
            15772978 : taken conditional branches
            49482236 : all conditional branches

            33780793 : executed forward branches (-1.0%)
             7267644 : taken forward branches (-2.0%)
            15375694 : executed backward branches (-0.0%)
             8358193 : taken backward branches (-0.0%)
             4346996 : executed unconditional branches (-6.5%)
            19781435 : all function calls (-0.9%)
             7434182 : indirect calls (=)
             6583156 : PLT calls (=)
           373937996 : executed instructions (-1.0%)
            91209281 : executed load instructions (-1.7%)
            59455774 : executed store instructions (-0.0%)
               28577 : taken jump table branches (=)
            53503483 : total branches (-1.2%)
            19972833 : taken branches (-2.2%)
            33530650 : non-taken conditional branches (-0.5%)
            15625837 : taken conditional branches (-0.9%)
            49156487 : all conditional branches (-0.7%)

BOLT-INFO: SCTC: patched 105 tail calls (104 forward) tail calls (1 backward) from a total of 105 while removing 0 double jumps and removing 74 basic blocks totalling 370 bytes of code. CTCs total execution count is 2 and the number of times CTCs are taken is 0.
LLVM ERROR: Undefined temporary symbol

I'm at a loss for what could cause this.

LLVM ERROR: Unknown augmentation character

I just followed the instructions and stuck in step 2. Here is the message:

$ perf2bolt -p perf.data -o perf.fdata <executable>
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read events without LBR
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     4bf671ba126d4b1750d38239dc415dc39931af2f
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
LLVM ERROR: Unknown augmentation character in entry at cdf0

What the problem might be? Thanks!

[Question] Is GCC -freorder-blocks-and-partition going to be handled?

Hi,
Do you plan to handle the GCC -freorder-blocks-and-partition flag in the future?
As this flag needs to be apply at compilation time, it's matter in a daily development.

We are currently using this flag on our libraries, and the need to disable it for BOLT means either deliver two version of these, either slow down every applications not using BOLT
It's a big drawback of using BOLT at the moment.

If you plan to, do you have an estimated time for it?

Thanks you,
Pierre

Zero-sized symbol on end of section

Hi, we got an internal error for a symbol sitting right on the edge of section end.

  [13] xxx_malloc        PROGBITS        00000000238aa800 238aa800 001c7a 00  AX  0   0 64
  [14] malloc_hook       PROGBITS        00000000238ac480 238ac480 0006c2 00  AX  0   0 16

And we have a symbol with size 0 sitting exactly on the end of the section.
xxx at 0x238ac47a = (00000000238aa800 + 001c7a)
So BinaryContext::getSectionFromAddress fails to find a home for the symbol.

The fix is straightforward, does it make sense to you to include zero-sized symbol on edge of section end?

Unknown relocation type

BOLT fails with the following stack trace:
Breakpoint 1, llvm::bolt::Relocation::isPCRelative (Type=24) at llvm/tools/llvm-bolt/src/Relocation.cpp:235
235 llvm_unreachable("Unknown relocation type");
gdb) bt
#0 llvm::bolt::Relocation::isPCRelative (Type=24) at llvm/tools/llvm-bolt/src/Relocation.cpp:235
#1 0x0000555555a72a65 in llvm::bolt::RewriteInstance::analyzeRelocation (this=0x7fffffffd620, Rel=..., RelocatedSection=..., SymbolName="", SymbolAddress=@0x7fffffffbfb8: 654552064,
Addend=@0x7fffffffbfb0: -4, ExtractedValue=@0x7fffffffbfa8: 304121793) at lvm/tools/llvm-bolt/src/RewriteInstance.cpp:1853
#2 0x0000555555a752c4 in llvm::bolt::RewriteInstance::readRelocations (this=0x7fffffffd620, Section=...)
at lvm/tools/llvm-bolt/src/RewriteInstance.cpp:2055
#3 0x0000555555a70535 in llvm::bolt::RewriteInstance::discoverFileObjects (this=0x7fffffffd620)
at llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1471
#4 0x0000555555a6c866 in llvm::bolt::RewriteInstance::<lambda(const std::set<long unsigned int, std::less, std::allocator >&)>::operator()(const std::set<unsigned long, std::less, std::allocator > &) const (__closure=0x7fffffffd208, NonSimpleFunctions=std::set with 0 elements)
at llvm/tools/llvm-bolt/src/RewriteInstance.cpp:970
#5 0x0000555555a6cbe3 in llvm::bolt::RewriteInstance::run (this=0x7fffffffd620) at llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1003
#6 0x00005555559170be in main (argc=4, argv=0x7fffffffde78) at llvm/tools/llvm-bolt/src/llvm-bolt.cpp:270

The relocation type 24 corresponds to ELF::R_X86_64_PC64.

[Question] Will BOLT be upstreamed into LLVM

Question as the title says.
Is there a plan to follow the upstream releases in a predictable manner or similar?

P.S. Thanks for the nice project, I see good performance improvements in my experiments so far!

perf PMU error

I've tried on it on differen machines, but when I run the perf command as given in the readme I get the following error:
sudo perf record -e cycles:u -j any,u -o perf.data -- ls -als
Error:
PMU Hardware doesn't support sampling/overflow-interrupts.

It doesn't make a difference if I run it with sudo or without.
It only works if I run it without -j any,u, but then bolt does not work.
Any ideas?

llvm-bolt crashes with a seg fault

Summary: After adding -print-all to the llvm-bolt command arguments, it crashes.

Command that does not crash:
llvm-bolt memcached -o memcached.bolt -data=lbr.fdata -reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats -print-profile-stats -print-cache-metrics -report-stale -v=1

Add: -print-all to the command above
Result: Crash
Please see .fdata file and the memcached executable (attached tarball) to reproduce the issue.

Stack dump is as follows:
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000000eea11a (llvm-bolt+0xeea11a)
#1 0x0000000000ee82ae (llvm-bolt+0xee82ae)
#2 0x0000000000ee83fc (llvm-bolt+0xee83fc)
#3 0x00007f2c592ec390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x0000000000508b46 (llvm-bolt+0x508b46)
#5 0x00000000004bc128 (llvm-bolt+0x4bc128)
#6 0x00000000004d318b (llvm-bolt+0x4d318b)
#7 0x00000000004d5807 (llvm-bolt+0x4d5807)
#8 0x0000000000531d13 (llvm-bolt+0x531d13)
#9 0x00000000005735a1 (llvm-bolt+0x5735a1)
#10 0x00000000005736a5 (llvm-bolt+0x5736a5)
#11 0x000000000042d4cc (llvm-bolt+0x42d4cc)
#12 0x00007f2c58049830 __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:325:0
#13 0x000000000047cec9 (llvm-bolt+0x47cec9)
Stack dump:
0. Program arguments: llvm-bolt memcached -o memcached.bolt -data=lbr.fdata -reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats -print-profile-stats -print-cache-metrics -report-stale -v=1 -print-all
Segmentation fault (core dumped)

Note: I renamed the tarball (.tgz) to .zip to satisfy the file uploader

bolt-crash.zip

perf2bolt crashes with Assertion

Thank you for open sourcing this.

Looks like I am missing something. I built the binary with '-Wl,--emit-relocs',

Software versions

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 
Ubuntu 16.04
labuser@y004:~/ssuresh/node$ uname -a
Linux y004 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
labuser@y004:~/ssuresh/node$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

I also have one function in a different section '.lpstub'.

labuser@y004:~/ssuresh$ perf2bolt -p perf.data -o perf.fdata node/node
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     605ef65b6b623ad564a2cfd14f929c6c1b0cc223
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x2600000, offset 0x2200000
BOLT-INFO: enabling relocation mode
perf2bolt: /home/labuser/ssuresh/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1381: void llvm::bolt::RewriteInstance::discoverFileObjects(): Assertion `Section && "section for functions must be registered."' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x000000000253f805 (perf2bolt+0x253f805)
#1 0x000000000253f898 (perf2bolt+0x253f898)
#2 0x000000000253da81 (perf2bolt+0x253da81)
#3 0x000000000253f07a (perf2bolt+0x253f07a)
#4 0x00007ffff7bcb390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#5 0x00007ffff693d428 gsignal /build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#6 0x00007ffff693f02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#7 0x00007ffff6935bd7 __assert_fail_base /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#8 0x00007ffff6935c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#9 0x0000000000584fa5 (perf2bolt+0x584fa5)
#10 0x000000000058199e (perf2bolt+0x58199e)
#11 0x0000000000581d09 (perf2bolt+0x581d09)
#12 0x0000000000412248 (perf2bolt+0x412248)
#13 0x00007ffff6928830 __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#14 0x0000000000410e49 (perf2bolt+0x410e49)
Stack dump:
0.      Program arguments: perf2bolt -p perf.data -o perf.fdata node/node 
Aborted (core dumped)

I have the following sections in the executable

    0x0000000000400270 - 0x000000000040028c is .interp
    0x000000000040028c - 0x00000000004002ac is .note.ABI-tag
    0x00000000004002ac - 0x00000000004002d0 is .note.gnu.build-id
    0x00000000004002d0 - 0x0000000000455774 is .gnu.hash
    0x0000000000455778 - 0x0000000000565320 is .dynsym
    0x0000000000565320 - 0x0000000000847760 is .dynstr
    0x0000000000847760 - 0x000000000085e1ae is .gnu.version
    0x000000000085e1b0 - 0x000000000085e3c0 is .gnu.version_r
    0x000000000085e3c0 - 0x0000000000860d48 is .rela.dyn
    0x0000000000860d48 - 0x0000000000860f28 is .rela.plt
    0x0000000000860f28 - 0x0000000000860f47 is .init
    0x0000000000860f50 - 0x00000000008610a0 is .plt
    0x00000000008610a0 - 0x0000000000861da8 is .plt.got
    0x0000000000a00000 - 0x0000000000a0018b is .lpstub
    0x0000000000a01000 - 0x00000000018cc669 is .text
    0x00000000018cc66c - 0x00000000018cc675 is .fini
    0x00000000018cc680 - 0x00000000020f7b88 is .rodata
    0x00000000020f7b88 - 0x000000000214c40c is .eh_frame_hdr
    0x000000000214c410 - 0x0000000002307a9c is .eh_frame
    0x0000000002507f60 - 0x0000000002507f64 is .tbss
    0x0000000002507f60 - 0x0000000002507fc8 is .init_array
    0x0000000002507fc8 - 0x0000000002507fe0 is .fini_array
    0x0000000002507fe0 - 0x0000000002507fe8 is .jcr
    0x0000000002507fe8 - 0x0000000002508238 is .dynamic
    0x0000000002508238 - 0x0000000002509000 is .got
    0x0000000002509000 - 0x000000000251f4f0 is .data
    0x000000000251f4f0 - 0x000000000251f4f0 is .tm_clone_table
    0x000000000251f500 - 0x0000000002537950 is .bss

Dwarf-4 support?

Hi,
I have some problems using bolt. My setup is Intel Compiler 17 with gcc 4.8.5, so it produces dwarf 4.
The code is compiled without PIC/PIE and linked with --emit-relocs so that it produces RELA rela.text.
Here is the problem:
perf2bolt -p perf.data -o perf.fdata ./test
outtputs:

PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     270c5a1e626f1b4f158599ab044340721e063450
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
LLVM ERROR: Parsing augmentation data at 90 failed

Also i have run just llvm-dwarfdump on my binary and it crashes(unpatched llvm-dwarfdump does not crash ):

Program received signal SIGSEGV, Segmentation fault.
0x000000000043da48 in llvm::DWARFAbbreviationDeclarationSet::getOffset (this=0x0) at /bolt/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h:36
36        uint32_t getOffset() const { return Offset; }
Missing separate debuginfos, use: debuginfo-install glibc-2.17-196.el7.x86_64 libgcc-4.8.5-16.el7.x86_64 ncurses-libs-5.9-14.20130511.el7_4.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb) back
#0  0x000000000043da48 in llvm::DWARFAbbreviationDeclarationSet::getOffset (this=0x0) at /bolt/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h:36
#1  0x000000000043d7e0 in llvm::DWARFCompileUnit::dump (this=0x1d70940, OS=..., DumpOpts=...) at /bolt/llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp:24
#2  0x000000000043f7d3 in llvm::DWARFContext::<lambda(bool, char const*, llvm::DWARFSection, llvm::DWARFContext::cu_iterator_range)>::operator()(bool, const char *, llvm::DWARFSection, llvm::DWARFContext::cu_iterator_range) const (__closure=0x7fffffffad20, IsExplicit=true, Name=0xd6125a ".debug_info", Section=..., CUs=...)
    at /bolt/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:314
#3  0x000000000043ff2f in llvm::DWARFContext::dump (this=0x1d6dda0, OS=..., DumpOpts=..., DumpOffsets=...)
    at /bolt/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:317
#4  0x000000000040fef0 in dumpObjectFile (Obj=..., DICtx=..., Filename=..., OS=...) at /bolt/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:392
#5  0x0000000000420ff1 in std::_Function_handler<bool (llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&), bool (*)(llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&)>::_M_invoke(std::_Any_data const&, llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine&&, llvm::raw_ostream&) (
    __functor=..., __args#0=..., __args#1=..., __args#2=<unknown type in /bolt/build/bin/llvm-dwarfdump, CU 0x2043b, DIE 0x6be56>, __args#3=...)
    at /gcc-7.2/include/c++/7.2.0/bits/std_function.h:302
#6  0x000000000041c94d in std::function<bool (llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&)>::operator()(llvm::object::ObjectFile&, llvm::DWARFContext&, llvm::Twine, llvm::raw_ostream&) const (this=0x7fffffffbb00, __args#0=..., __args#1=..., __args#2=..., __args#3=...)
    at /gcc-7.2/include/c++/7.2.0/bits/std_function.h:706
#7  0x000000000041068d in handleBuffer (Filename=..., Buffer=..., HandleObj=..., OS=...) at /bolt/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:440
#8  0x0000000000410de3 in handleFile (Filename=..., HandleObj=..., OS=...) at /bolt/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:474
#9  0x0000000000412287 in main (argc=2, argv=0x7fffffffbea8) at /bolt/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:594

BOLT fails on Clang 7 compiled with GCC 8.1.1 (Fedora 28)

Hello.
I am trying to apply llvm-bolt on clang compiler and I met one strange error.

Clang(trunk) is compiled with .rela.text section (-Wl,--emit-relocs linker flags, .rela.text existence is checked by readelf -a). After that I run perf record -e cycles:u -j any,u -o perf.data -- clang-7 main.cpp and got some profiling data. The next step is converting into BOLT-compatible format by perf2bolt. I do it with perf2bolt -p perf.data -o perf.fdata ../clang-7 and get this error:

PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     594a620eb7605f41576639b367be3f056946eea4
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x5600000, offset 0x5200000
BOLT-INFO: enabling relocation mode
BOLT-ERROR: cannot process binaries with unmarked object in code at address 0x102e209 belonging to section .text in relocation mode.

What is wrong?

[C++] Exceptions catch leads to SIGSEGV

Hi,

I have an issue with C++ code compiled with g++ (version 7.3.0).
After applied BOLT (commit 85e16a2) on a very short program, it SIGSEGV when throwing an exception.

here is the source code

#include <iostream>
#include <exception>

void test()
{
	throw std::exception();
}

int main()
{
	try {
		test();
	} catch (...) {
		std::cout << "Works!!" << std::endl;
	}
	std::cout << "end of main" << std::endl;
	return 0;
}

And here is the backtrace of the core dump generated.

#0  0x00007fd3b351d052 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007fd3b351d2a3 in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x00007fd3b328394b in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#3  0x00007fd3b351dc67 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00005590f652e137 in test() ()
#5  0x00007fd3b2ea3b97 in __libc_start_main (main=0x5590f652e100 <test()>, argc=1, argv=0x7ffcca438a78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcca438a68) at ../csu/libc-start.c:310
#6  0x00005590f652e048 in _start ()

After investigation, it figures that the assembly code of both functions is exactly the same on the bolted program and the original one.
Also, the .eh_frame differs from the original one, but I don't really know how.

[libcurl] Commit 76b9790 leads to assertion failure

After updated BOLT to 76b9790, I have an assertion failure when I try to apply BOLT on a binary including libcurl.a. Here is the assertion:

llvm-bolt: /home/cloud-user/repo/llvm/tools/llvm-bolt/src/BinaryContext.cpp:265: 
std::pair<llvm::bolt::JumpTable*, const llvm::MCSymbol*>
llvm::bolt::BinaryContext::createJumpTable(llvm::bolt::BinaryFunction&, uint64_t, llvm::bolt::JumpTable::JumpTableType, llvm::bolt::JumpTable::OffsetEntriesType&&): 
Assertion `JT->Parent == &Function && "cannot re-use jump table of a different function"' failed.

It occurs when BOLT is processing curl_multi_strerror as function and curl_easy_strerror as parent.

To reproduce you can either apply BOLT on the shared libcurl, or compile this small program with the static version of libcurl:

#include <curl.h>

int main() {
  curl_easy_init();
  return 0;
}

For what I saw, this assertion wasn't present on the previous commit, and BOLT was finishing with no warning or error.

Disabling emitting .bolt.org.text

I noticed .bolt.org.text is emitted and is ALLOCed. Is there a way to disable this? I also noticed the new .text is in a third LOAD segment. Was this done because it was easier to rewrite the binary this way?

Assertion `I > 1 && "jump table with a size smaller than 1 detected"'

I've been running some tests with BOLT and the SPEC CPU2017 benchmarks recently and have encountered a couple of issues. While I can't currently seem to reproduce the main issue I'm experiencing with 511.povray_r (where the rewritten binary segfaults if -Wl,-q is added to OPTIMIZE when compiling) using the open source version of povray, I thought I'd report an issue I ran into along the way that seems to apply to quite a few of the workloads I've tested.

Essentially, when compiling with -march=native using gcc 7.3.0 on Ubuntu 7.3.0, I frequently hit the assertion in BinaryFunction.cpp about jump tables with a size smaller than one. This is reproducable, for instance, with the following steps:

# Clone povray (3.7-stable)
$ git clone https://github.com/POV-Ray/povray.git
$ cd povray && git checkout 3.7-stable

# Compile and install boost
$ wget https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.gz
$ tar xvzf boost_1_66_0.tar.gz && cd boost_1_66_0
$ mkdir $BOOST_ROOT && ./bootstrap.sh --prefix=$BOOST_ROOT && ./bjam install

# Compile and install povray
$ cd ../unix
$ ./prebuild.sh
$ cd ../
$ mkdir build
$ LIBS="-L$BOOST_ROOT/lib -lboost_system -lboost_thread" LD_LIBRARY_PATH="$BOOST_ROOT/lib" ./configure COMPILED_BY="name <email>" --prefix=$(pwd)/build --with-boost=$BOOST_ROOT
$ make -j 8 && make install

# Run BOLT
$ llvm-bolt build/bin/povray -o build/bin/povray.bolt

Modifying povray's configure script to remove the -march=native flag seems to resolve this issue. In the case where this flag is present, though, it would be preferable if BOLT just bailed on the function rather than crashing completely.

For reference, here's the output I get along with the crash:

BOLT-INFO: Target architecture: x86_64
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x600000, offset 0x600000
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function __BOLT_FDE_FUNCat50800
llvm-bolt: ../tools/llvm-bolt/src/BinaryFunction.cpp:1477: void llvm::bolt::BinaryFunction::postProcessJumpTables(): Assertion `I > 1 && "jump table with a size smaller than 1 detected"' failed.
#0 0x000055de99fea0e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:398:0
#1 0x000055de99fea17a PrintStackTraceSignalHandler(void*) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:462:0
#2 0x000055de99fe834f llvm::sys::RunSignalHandlers() path_to_llvm/llvm/build/../lib/Support/Signals.cpp:49:0
#3 0x000055de99fe9953 SignalHandler(int) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:252:0
#4 0x00007f33adabc890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#5 0x00007f33ac98ae97 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x3ee97)
#6 0x00007f33ac98c801 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40801)
#7 0x00007f33ac97c39a (/lib/x86_64-linux-gnu/libc.so.6+0x3039a)
#8 0x00007f33ac97c412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#9 0x000055de98c26b68 llvm::bolt::BinaryFunction::postProcessJumpTables() path_to_llvm/llvm/build/../tools/llvm-bolt/src/BinaryFunction.cpp:1478:0
#10 0x000055de98c2686a llvm::bolt::BinaryFunction::disassemble(llvm::ArrayRef<unsigned char>) path_to_llvm/llvm/build/../tools/llvm-bolt/src/BinaryFunction.cpp:974:0
#11 0x000055de98d6edf7 llvm::bolt::RewriteInstance::disassembleFunctions() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:2524:0
#12 0x000055de98d63736 operator() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:1006:0
#13 0x000055de98d63736 llvm::bolt::RewriteInstance::run()::'lambda'(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&)::operator()(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&) const (path_to_llvm/llvm/build/bin/llvm-bolt+0x359736)
#14 0x000055de98d639da llvm::bolt::RewriteInstance::run() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:1034:0
#15 0x000055de98bcfcc1 main path_to_llvm/llvm/build/../tools/llvm-bolt/src/llvm-bolt.cpp:312:0
#16 0x00007f33ac96db97 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#17 0x000055de98bce47a _start (path_to_llvm/llvm/build/bin/llvm-bolt+0x1c447a)
Stack dump:
0.	Program arguments: path_to_llvm/llvm/build/bin/llvm-bolt build/bin/povray -o build/bin/povray.bolt 
Aborted (core dumped)

And with -debug:

<snip>
Checking for PIC jump table
checking potential PIC jump table
BOLT-DEBUG: addressed memory is 0x279780
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279780, which contains value 75cf8
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279784, which contains value 75cf8
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279788, which contains value 75c10
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x27978c, which contains value 75c38
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279790, which contains value 75c38
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279794, which contains value 75b30
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x279798, which contains value 75b30
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x27979c, which contains value 75bd8
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x2797a0, which contains value 75bd8
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x2797a4, which contains value 75c38
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x2797a8, which contains value 75c38
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x2797ac, which contains value 75b67
BOLT-DEBUG: indirect jmp at 0x75b2e is referencing address 0x2797b0, which contains value 75ff0
BOLT-DEBUG: creating jump table JUMP_TABLE/__BOLT_FDE_FUNCat75af0.0 in function __BOLT_FDE_FUNCat75af0 with 12 entries.
BOLT-DEBUG: truncating jump table JUMP_TABLE/__BOLT_FDE_FUNCat75af0.0 at index 0 containing offset 0x208
llvm-bolt: ../tools/llvm-bolt/src/BinaryFunction.cpp:1477: void llvm::bolt::BinaryFunction::postProcessJumpTables(): Assertion `I > 1 && "jump table with a size smaller than 1 detected"' failed.
#0 0x00005565ff6000e7 llvm::sys::PrintStackTrace(llvm::raw_ostream&) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:398:0
#1 0x00005565ff60017a PrintStackTraceSignalHandler(void*) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:462:0
#2 0x00005565ff5fe34f llvm::sys::RunSignalHandlers() path_to_llvm/llvm/build/../lib/Support/Signals.cpp:49:0
#3 0x00005565ff5ff953 SignalHandler(int) path_to_llvm/llvm/build/../lib/Support/Unix/Signals.inc:252:0
#4 0x00007fdb16e6d890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#5 0x00007fdb15d3be97 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x3ee97)
#6 0x00007fdb15d3d801 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40801)
#7 0x00007fdb15d2d39a (/lib/x86_64-linux-gnu/libc.so.6+0x3039a)
#8 0x00007fdb15d2d412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#9 0x00005565fe23cb68 llvm::bolt::BinaryFunction::postProcessJumpTables() path_to_llvm/llvm/build/../tools/llvm-bolt/src/BinaryFunction.cpp:1478:0
#10 0x00005565fe23c86a llvm::bolt::BinaryFunction::disassemble(llvm::ArrayRef<unsigned char>) path_to_llvm/llvm/build/../tools/llvm-bolt/src/BinaryFunction.cpp:974:0
#11 0x00005565fe384df7 llvm::bolt::RewriteInstance::disassembleFunctions() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:2524:0
#12 0x00005565fe379736 operator() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:1006:0
#13 0x00005565fe379736 llvm::bolt::RewriteInstance::run()::'lambda'(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&)::operator()(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&) const (path_to_llvm/llvm/build/bin/llvm-bolt+0x359736)
#14 0x00005565fe3799da llvm::bolt::RewriteInstance::run() path_to_llvm/llvm/build/../tools/llvm-bolt/src/RewriteInstance.cpp:1034:0
#15 0x00005565fe1e5cc1 main path_to_llvm/llvm/build/../tools/llvm-bolt/src/llvm-bolt.cpp:312:0
#16 0x00007fdb15d1eb97 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#17 0x00005565fe1e447a _start (path_to_llvm/llvm/build/bin/llvm-bolt+0x1c447a)
Stack dump:
0.	Program arguments: path_to_llvm/llvm/build/bin/llvm-bolt -debug build/bin/povray -o build/bin/povray.bolt 
Aborted (core dumped)

"couldn't properly understand this function" for Haskell (GHC) Hello World

jberryman Code/BOLT-experiments ‹master*› » llvm-bolt --version                                                                                                                                                                                                                                                         130 ↵
LLVM (http://llvm.org/):
  LLVM version 7.0.0svn
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: ivybridge

BOLT revision f137ed238db11440f03083b1c88b7ffc0f4af65e
  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_be - AArch64 (big endian)
    arm64      - ARM64 (little endian)
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64

I've just started experimenting with BOLT and was curious if it would work on a haskell binary. I'm building a hello world program with ghc 8.4.3, with ghc --make hello.hs -o hello.

module Main where

main :: IO ()
main = putStrLn "hi"

Using this oneliner to do the perf/BOLT stuff, straight from README:

$ function bolt_stuff(){ perf record -e cycles:u -j any,u -o $1.data -- ./$1 ; perf2bolt -p $1.data -o perf.fdata $1 ; llvm-bolt $1 -o $1.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats }

Getting this error from llvm-bolt

$ bolt_stuff hello                                                                                                                                                                                                                                                            
hi
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.023 MB hello_plain.data (13 samples) ]
PERF2BOLT: Starting data aggregation job for hello_plain.data
PERF2BOLT: spawning perf job to read branch events
PERF2BOLT: spawning perf job to read mem events
PERF2BOLT: spawning perf job to read process events
PERF2BOLT: spawning perf job to read task events
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x600000, offset 0x200000
BOLT-INFO: binary build-id is:     31cbb6046be99aadc42647ab499f7293795b0662
PERF2BOLT: spawning perf job to read buildid list
PERF2BOLT: matched build-id and file name
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
PERF2BOLT: waiting for perf mmap events collection to finish...
PERF2BOLT: parsing perf-script mmap events output
PERF2BOLT: waiting for perf task events collection to finish...
PERF2BOLT: parsing perf-script task events output
PERF2BOLT: input binary is associated with 1 PID(s)
PERF2BOLT: waiting for perf events collection to finish...
PERF2BOLT: parse branch events...
PERF2BOLT: read 7 samples and 112 LBR entries
PERF2BOLT: 6 samples (46.2%) were ignored
PERF2BOLT: traces mismatching disassembled function contents: 0 (0.0%)
PERF2BOLT: out of range traces involving unknown regions: 86 (81.9%)
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function evacuate/crtstuff.c/1(*2)
PERF2BOLT: processing branch events...
PERF2BOLT: wrote 24 objects and 0 memory objects to perf.fdata
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x600000, offset 0x200000
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
BOLT-WARNING: disabling -split-eh in non-relocation mode
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function evacuate/crtstuff.c/1(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x406cc8) in function base_ControlziExceptionziBase_zdfShowNonTerminationzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x406d40) in function base_ControlziExceptionziBase_zdfExceptionNonTerminationzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x75 (address 0x4070dd) in function base_ControlziExceptionziBase_absentError_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x407218) in function base_ControlziExceptionziBase_zdfExceptionNonTermination4_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x407370) in function base_ControlziExceptionziBase_zdfExceptionNestedAtomically4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x4074b2) in function base_ControlziExceptionziBase_zdfExceptionNonTerminationzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x40773a) in function base_ControlziExceptionziBase_zdfExceptionNestedAtomicallyzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x20 (address 0x407980) in function base_GHCziBase_eqString_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x407bf0) in function base_GHCziBase_zpzp_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x407db8) in function base_GHCziBase_map_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x4081d8) in function base_GHCziConcziSignal_signalzuhandlers_info
BOLT-WARNING: function base_GHCziConcziIO_ioManagerCapabilitiesChanged_info has an object detected in a padding region at address 0x407f90
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x408275) in function base_GHCziConcziSignal_setHandler2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x408830) in function base_GHCziConcziSignal_setHandler1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x52 (address 0x409272) in function base_GHCziConcziSignal_runHandlers1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4095d8) in function base_GHCziConcziSignal_zdwrunHandlersPtr_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x409778) in function base_GHCziConcziSync_runSparkszuloop_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x40a0c8) in function base_GHCziConcziSync_uncaughtExceptionHandler_info
BOLT-WARNING: function base_GHCziConcziSync_always2_info has an object detected in a padding region at address 0x409fc0
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x40a678) in function base_GHCziConcziSync_zdwmodifyMVarzu_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x40ae30) in function base_GHCziConcziSync_zdwwithMVar_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40b0c8) in function base_GHCziConcziSync_reportStackOverflow1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40bae0) in function base_GHCziException_zdp1Exception_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40bb40) in function base_GHCziException_zdp2Exception_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40bba0) in function base_GHCziException_toException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x40bc80) in function base_GHCziException_zdwzdcshowsPrec1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40bd30) in function base_GHCziException_zdfShowErrorCallzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x40bda8) in function base_GHCziException_zdfExceptionErrorCallzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x40be90) in function base_GHCziException_zdfShowErrorCall1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x40c130) in function base_GHCziException_zdfExceptionErrorCall3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x40c272) in function base_GHCziException_zdfExceptionErrorCallzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x40d0ca) in function base_GHCziException_errorCallWithCallStackException_info
BOLT-WARNING: function base_GHCziForeign_charIsRepresentable3_info has an object detected in a padding region at address 0x40db80
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x40d940) in function base_GHCziForeign_charIsRepresentable3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x42 (address 0x40f022) in function base_GHCziForeign_zdwpeekCString_info
BOLT-WARNING: unable to disassemble instruction at offset 0x42 (address 0x40f0ea) in function base_GHCziForeign_charIsRepresentable2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x40f3f0) in function base_GHCziForeign_charIsRepresentable1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x40f4f0) in function base_GHCziForeignPtr_mallocPlainForeignPtrBytes2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x40f580) in function base_GHCziForeignPtr_noMixingError_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x40f740) in function base_GHCziForeignPtr_zdwinsertCFinalizzer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x40fb08) in function base_GHCziForeignPtr_mallocForeignPtrBytes2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x410068) in function base_GHCziIO_bracket1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xd0 (address 0x410fd0) in function base_GHCziIOziEncoding_getFileSystemEncodingzugo_info
BOLT-WARNING: unable to disassemble instruction at offset 0x75 (address 0x411155) in function base_GHCziIOziEncoding_getFileSystemEncoding6_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x411478) in function base_GHCziIOziEncoding_getFileSystemEncoding5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x4119f8) in function base_GHCziIOziEncoding_getForeignEncoding3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x411ad0) in function base_GHCziIOziEncoding_getForeignEncoding2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x411bd0) in function base_GHCziIOziEncoding_getForeignEncoding1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x411c58) in function base_GHCziIOziEncoding_getForeignEncoding_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x411cc8) in function base_GHCziIOziEncoding_initLocaleEncoding1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x411d50) in function base_GHCziIOziEncoding_initLocaleEncoding_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x411e28) in function base_GHCziIOziEncoding_getLocaleEncoding2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x411f28) in function base_GHCziIOziEncoding_getLocaleEncoding1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3f0 (address 0x412678) in function base_GHCziIOziEncodingziFailure_recoverDecode1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x412732) in function base_GHCziIOziEncodingziFailure_recoverEncode1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x412e30) in function base_GHCziIOziEncodingziIconv_iconvEncoding11_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x4132a8) in function base_GHCziIOziEncodingziIconv_localeEncodingName_info
BOLT-WARNING: unable to disassemble instruction at offset 0x90 (address 0x413a40) in function base_GHCziIOziEncodingziIconv_iconvEncoding6_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x414210) in function base_GHCziIOziEncodingziIconv_iconvEncoding18_info
BOLT-WARNING: unable to disassemble instruction at offset 0x120 (address 0x414600) in function base_GHCziIOziEncodingziIconv_iconvEncoding2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x414830) in function base_GHCziIOziEncodingziLatin1_latin5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x414ea0) in function base_GHCziIOziEncodingziLatin1_ascii5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x4155f0) in function base_GHCziIOziEncodingziLatin1_latin3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x415c60) in function base_GHCziIOziEncodingziLatin1_ascii3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x416458) in function base_GHCziIOziEncodingziLatin1_latin1zuchecked2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x416f20) in function base_GHCziIOziEncodingziTypes_close_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x417458) in function base_GHCziIOziEncodingziUTF16_mkUTF1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x418438) in function base_GHCziIOziEncodingziUTF16_mkUTF16le1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x419038) in function base_GHCziIOziEncodingziUTF16_zdwutf16zuencode_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x4197d0) in function base_GHCziIOziEncodingziUTF16_mkUTF3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x41ae48) in function base_GHCziIOziEncodingziUTF16_mkUTF5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x41ccd0) in function base_GHCziIOziEncodingziUTF32_mkUTF32le1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x41dae0) in function base_GHCziIOziEncodingziUTF32_mkUTF1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x208 (address 0x41e9d8) in function base_GHCziIOziEncodingziUTF32_mkUTF3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x208 (address 0x41f6d8) in function base_GHCziIOziEncodingziUTF32_mkUTF5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4d0 (address 0x4203f8) in function base_GHCziIOziEncodingziUTF32_zdwutf32zudecode_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x420608) in function base_GHCziIOziEncodingziUTF32_zdwutf32zuencode_info
BOLT-WARNING: unable to disassemble instruction at offset 0x2f0 (address 0x421578) in function base_GHCziIOziEncodingziUTF8_mkUTF1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xc88 (address 0x424610) in function base_GHCziIOziEncodingziUTF8_mkUTF4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x427080) in function base_GHCziIOziEncodingziUTF8_utf2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4271d0) in function base_GHCziIOziException_zdfShowBlockedIndefinitelyOnMVarzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x427248) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnMVarzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4273d0) in function base_GHCziIOziException_zdfShowBlockedIndefinitelyOnSTMzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x427448) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnSTMzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4275d0) in function base_GHCziIOziException_zdfShowAllocationLimitExceededzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4276c0) in function base_GHCziIOziException_zdfShowAllocationLimitExceeded1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x427870) in function base_GHCziIOziException_zdfExceptionSomeAsyncExceptionzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x427908) in function base_GHCziIOziException_zdfShowSomeAsyncExceptionzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4279d8) in function base_GHCziIOziException_zdfShowSomeAsyncException1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x1b0 (address 0x428620) in function base_GHCziIOziException_zdwzdcshowsPrec4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x79 (address 0x428c59) in function base_GHCziIOziException_zdwzdcshowsPrec3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4b (address 0x428e4b) in function base_GHCziIOziException_zdfExceptionIOExceptionzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x43 (address 0x428ecb) in function base_GHCziIOziException_zdfExceptionIOExceptionzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4b (address 0x428f5b) in function base_GHCziIOziException_zdfShowIOException1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x429100) in function base_GHCziIOziException_zdfExceptionAsyncException9_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x429258) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnMVar4_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x4293b0) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnSTM4_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x429508) in function base_GHCziIOziException_zdfExceptionAllocationLimitExceeded3_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x429660) in function base_GHCziIOziException_zdfExceptionCompactionFailed3_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x4297b8) in function base_GHCziIOziException_zdfExceptionSomeAsyncException2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x4298fa) in function base_GHCziIOziException_zdfExceptionSomeAsyncExceptionzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x42 (address 0x429aca) in function base_GHCziIOziException_asyncExceptionFromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x429f00) in function base_GHCziIOziException_zdfExceptionExitCode5_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x42a0b8) in function base_GHCziIOziException_zdfExceptionIOException5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x42a1fa) in function base_GHCziIOziException_zdfExceptionIOExceptionzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x42a422) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnMVarzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x42a6aa) in function base_GHCziIOziException_zdfExceptionBlockedIndefinitelyOnSTMzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x42a992) in function base_GHCziIOziException_zdfExceptionCompactionFailedzuzdcfromException_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x42b290) in function base_GHCziIOziHandleziFD_fdToHandle12_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x42bc98) in function base_GHCziIOziHandleziFD_stderr_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x42beb8) in function base_GHCziIOziHandleziFD_stdout_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x42c210) in function base_GHCziIOziHandleziInternals_zdwstreamEncode_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x42c538) in function base_GHCziIOziHandleziInternals_flushWriteBuffer1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x42c6f5) in function base_GHCziIOziHandleziInternals_decodeByteBuf2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x8a (address 0x42cba2) in function base_GHCziIOziHandleziInternals_mkDuplexHandle9_info
BOLT-WARNING: unable to disassemble instruction at offset 0x68 (address 0x42d650) in function base_GHCziIOziHandleziInternals_zdwwriteCharBuffer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x42defa) in function base_GHCziIOziHandleziInternals_flushBuffer2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x62 (address 0x42eac2) in function base_GHCziIOziHandleziInternals_zdwdozuoperation_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x42eca0) in function base_GHCziIOziHandleziInternals_zdwwithHandlezq_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x42f7e8) in function base_GHCziIOziHandleziInternals_wantWritableHandle1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x42f878) in function base_GHCziIOziHandleziTypes_outputNL_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x42f8d8) in function base_GHCziIOziHandleziTypes_inputNL_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x42fa78) in function base_GHCziInt_zdfIntegralInt64zuzdctoInteger_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x42fc0a) in function base_GHCziList_splitAtzuzdszdwsplitAtzq_info
BOLT-WARNING: unable to disassemble instruction at offset 0x20 (address 0x42ff58) in function base_GHCziList_elem_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x430060) in function base_GHCziList_reverse1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x4301b8) in function base_GHCziList_zdwspan_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x430348) in function base_GHCziList_filter_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x430520) in function base_GHCziPack_unpackCString_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4305f0) in function base_GHCziShow_showsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x430650) in function base_GHCziShow_show_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x430b70) in function base_GHCziShow_showSignedInt_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x430ef0) in function base_GHCziShow_showListzuzu_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x431020) in function base_GHCziShow_zdfShowZLz2cUZRzuzdsgo1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x431178) in function base_GHCziShow_zdfShowTrNamezuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4311f0) in function base_GHCziShow_zdfShowIntzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4312b8) in function base_GHCziShow_zdfShowInt1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x90 (address 0x431688) in function base_GHCziStackziCCS_zdwgo_info
BOLT-WARNING: unable to disassemble instruction at offset 0xa8 (address 0x4319a8) in function base_GHCziStackziTypes_getCallStack_info
BOLT-WARNING: unable to disassemble instruction at offset 0xc0 (address 0x431b40) in function base_GHCziTopHandler_runMainIO2_info
BOLT-WARNING: function base_GHCziTopHandler_flushStdHandles_info has an object detected in a padding region at address 0x4323c0
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x431df0) in function base_GHCziTopHandler_flushStdHandles3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x431ea0) in function base_GHCziTopHandler_flushStdHandles1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x433d10) in function base_GHCziWeak_runFinalizzerBatch1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x434148) in function base_SystemziPosixziInternals_fdFileSizzezupred_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x4344a8) in function base_SystemziPosixziInternals_getEcho3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x434c18) in function base_SystemziPosixziInternals_getEcho2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x435018) in function base_SystemziPosixziInternals_fdStat1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x56 (address 0x4357de) in function base_SystemziPosixziInternals_fdFileSizze1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x435b28) in function base_DataziOldList_prependToAll_info
BOLT-WARNING: unable to disassemble instruction at offset 0xca (address 0x436822) in function base_DataziTypeableziInternal_tcSymbol_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x436bd0) in function base_DataziTypeableziInternal_zdmApp2_info
BOLT-WARNING: unable to disassemble instruction at offset 0xca (address 0x436d3a) in function base_DataziTypeableziInternal_zdmApp5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x437330) in function base_DataziTypeableziInternal_typeRepFingerprint_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x437460) in function base_DataziTypeableziInternal_someTypeRepFingerprint_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x439a90) in function base_DataziTypeableziInternal_zdfShowSomeTypeRepzuzdcshowsPrec_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x439b08) in function base_DataziTypeableziInternal_zdfShowSomeTypeRepzuzdcshow_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x439b90) in function base_DataziTypeableziInternal_zdfShowSomeTypeRep1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x439d48) in function base_DataziTypeableziInternal_zdmApp3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x439e78) in function base_DataziTypeableziInternal_zdwgo_info
BOLT-WARNING: unable to disassemble instruction at offset 0x90 (address 0x449d68) in function base_DataziTypeableziInternal_showTypeable_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x4509f0) in function base_DataziTypeableziInternal_mkTrApp_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x451c30) in function base_DataziTypeableziInternal_typeRepTyCon_info
BOLT-WARNING: unable to disassemble instruction at offset 0xba (address 0x452cd2) in function base_DataziTypeableziInternal_zdwmkTrCon_info
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x4536c8) in function base_GHCziEventziInternal_zdwgo1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x4538b0) in function base_GHCziEventziThread_numEnabledEventManagers_info
BOLT-WARNING: function base_GHCziEventziInternal_Forever_con_info has an object detected in a padding region at address 0x4537b8
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x454370) in function base_GHCziEventziThread_zdwstartIOManagerThread_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x454978) in function base_GHCziEventziThread_timerManagerThreadVar_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x454c00) in function base_GHCziEventziThread_timerManager_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x454ea8) in function base_GHCziEventziThread_ioManagerLock_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x455208) in function base_GHCziEventziThread_eventManager_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x455480) in function base_GHCziEventziThread_ensureIOManagerIsRunning3_info
BOLT-WARNING: unable to disassemble instruction at offset 0xa2 (address 0x45587a) in function base_GHCziEventziThread_ensureIOManagerIsRunning2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x52 (address 0x455bba) in function base_GHCziEventziThread_ensureIOManagerIsRunning6_info
BOLT-WARNING: unable to disassemble instruction at offset 0x118 (address 0x456240) in function base_GHCziEventziThread_zdwioManagerCapabilitiesChanged_info
BOLT-WARNING: function base_GHCziEventziThread_ensureIOManagerIsRunning1_info has an object detected in a padding region at address 0x4560b0
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x457952) in function base_GHCziEventziThread_getSystemEventManager1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x459e7a) in function base_GHCziEventziThread_threadWaitRead1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x45bfe2) in function base_GHCziEventziThread_closeFdWith1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x45c62a) in function base_GHCziEventziTimerManager_new2_info
BOLT-WARNING: unable to disassemble instruction at offset 0xbd (address 0x45ce55) in function base_GHCziEventziTimerManager_step1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb0 (address 0x45ddb8) in function base_GHCziEventziTimerManager_zdwloop_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x45e910) in function base_DataziTuple_snd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x45eae0) in function base_ForeignziCziError_zdwerrnoToIOError_info
BOLT-WARNING: unable to disassemble instruction at offset 0x18 (address 0x45eda8) in function base_ForeignziCziError_throwErrnoIfMinus1Retry2_info
BOLT-WARNING: unable to disassemble instruction at offset 0xc0 (address 0x45ef58) in function base_ForeignziCziError_throwErrnoIfMinus1RetryMayBlock2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x9e (address 0x45f0b6) in function base_ForeignziCziString_zdwpeekCAString_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x45f280) in function base_ForeignziStorable_sizzeOf_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x45f2e0) in function base_ForeignziStorable_pokeElemOff_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x45f340) in function base_ForeignziStorable_peek_info
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x45f4a5) in function base_GHCziArr_negRange_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x45f528) in function base_GHCziArr_arrEleBottom_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x45f980) in function base_GHCziArr_zdwindexError_info
BOLT-WARNING: unable to disassemble instruction at offset 0x75 (address 0x45fb05) in function base_GHCziChar_zdwlvl_info
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x45fb95) in function base_GHCziEnum_zdfEnumBool1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x45fc38) in function base_GHCziFingerprint_zdwfingerprintData_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x460120) in function base_GHCziFingerprint_fingerprintStringzugo_info
BOLT-WARNING: unable to disassemble instruction at offset 0x20 (address 0x4602a8) in function base_GHCziFingerprint_fingerprintString_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x460450) in function base_GHCziFingerprint_fingerprintFingerprints_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x46068a) in function base_GHCziFingerprintziType_zdWFingerprint_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x460760) in function base_GHCziIOziBufferedIO_newBuffer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4607c0) in function base_GHCziIOziBufferedIO_emptyWriteBuffer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x460820) in function base_GHCziIOziBufferedIO_flushWriteBuffer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4608a0) in function base_GHCziIOziDevice_isTerminal_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x460900) in function base_GHCziIOziDevice_isSeekable_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x460960) in function base_GHCziIOziDevice_seek_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x460ad0) in function base_GHCziIOziFD_zdfBufferedIOFD5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x168 (address 0x460fd0) in function base_GHCziIOziFD_zdwreadRawBufferPtrNoBlock_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x461140) in function base_GHCziIOziFD_zdfBufferedIOFD14_info
BOLT-WARNING: unable to disassemble instruction at offset 0xa8 (address 0x461668) in function base_GHCziIOziFD_zdwreadRawBufferPtr_info
BOLT-WARNING: unable to disassemble instruction at offset 0x240 (address 0x4620d8) in function base_GHCziIOziFD_zdwwriteRawBufferPtr_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x46236a) in function base_GHCziIOziFD_zdwfdWrite_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb8 (address 0x462750) in function base_GHCziIOziFD_zdwzdcwriteNonBlocking_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x462a50) in function base_GHCziIOziFD_zdfBufferedIOFDzuzdswriteBuf1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x462bb8) in function base_GHCziIOziFD_zdfBufferedIOFD15_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4630b0) in function base_GHCziIOziFD_zdfIODeviceFD16_info
BOLT-WARNING: unable to disassemble instruction at offset 0x78 (address 0x463268) in function base_GHCziIOziFD_zdwzdctell_info
BOLT-WARNING: unable to disassemble instruction at offset 0x43 (address 0x463313) in function base_GHCziIOziFD_zdfIODeviceFD13_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5d (address 0x46345d) in function base_GHCziIOziFD_zdwzdcseek_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x463628) in function base_GHCziIOziFD_zdfIODeviceFD17_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x463730) in function base_GHCziIOziFD_zdwsetSizze_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb0 (address 0x4638f8) in function base_GHCziIOziFD_zdwzdcfillReadBuffer0_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x463a62) in function base_GHCziIOziFD_zdfBufferedIOFD7_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x463cc0) in function base_GHCziIOziFD_zdwzdcflushWriteBuffer0_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x463db0) in function base_GHCziIOziFD_zdfBufferedIOFD1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x463ef0) in function base_GHCziIOziFD_zdfIODeviceFD21_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x463f90) in function base_GHCziIOziFD_zdfIODeviceFD25_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x4642a2) in function base_GHCziIOziFD_zdwzdcready_info
BOLT-WARNING: unable to disassemble instruction at offset 0x45 (address 0x4643ed) in function base_GHCziIOziFD_zdfIODeviceFD27_info
BOLT-WARNING: unable to disassemble instruction at offset 0x92 (address 0x46457a) in function base_GHCziIOziFD_zdwzdcdup2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x46462a) in function base_GHCziIOziFD_zdfIODeviceFD1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x72 (address 0x464812) in function base_GHCziIOziFD_zdwzdcdup_info
BOLT-WARNING: function base_GHCziIOziFD_zdfIODeviceFD3_info has an object detected in a padding region at address 0x464933
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x464a30) in function base_GHCziIOziFD_zdfIODeviceFD6_info
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x464be0) in function base_GHCziIOziFD_zdfIODeviceFD20_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x464d88) in function base_GHCziIOziFD_zdwclose_info
BOLT-WARNING: unable to disassemble instruction at offset 0x43 (address 0x464e03) in function base_GHCziIOziFD_zdfIODeviceFD26_info
BOLT-WARNING: unable to disassemble instruction at offset 0x68 (address 0x464f00) in function base_GHCziIOziFD_zdwzdcclose_info
BOLT-WARNING: unable to disassemble instruction at offset 0x43 (address 0x464fbb) in function base_GHCziIOziFD_zdfIODeviceFD22_info
BOLT-WARNING: function base_GHCziIOziFD_zdwzdcfillReadBuffer_slow has an object detected in a padding region at address 0x465008
BOLT-WARNING: unable to disassemble instruction at offset 0x68 (address 0x465178) in function base_GHCziIOziFD_zdwzdcfillReadBuffer_info
BOLT-WARNING: unable to disassemble instruction at offset 0x4a (address 0x46528a) in function base_GHCziIOziFD_zdfBufferedIOFD11_info
BOLT-WARNING: unable to disassemble instruction at offset 0x70 (address 0x4659a0) in function base_GHCziIOziHandleziText_hPutStr8_info
BOLT-WARNING: unable to disassemble instruction at offset 0x130 (address 0x4680b8) in function base_GHCziIOziHandleziText_zdwwriteBlocks_info
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x46b55d) in function base_GHCziIOziHandleziText_hPutStr5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x90 (address 0x46b728) in function base_GHCziIOziHandleziText_hPutStr3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x46bae0) in function base_GHCziIOziHandleziText_hPutStr2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x46be80) in function base_GHCziEventziControl_controlEventFd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x46bf10) in function base_GHCziEventziControl_controlReadFd_info
BOLT-WARNING: unable to disassemble instruction at offset 0xa0 (address 0x46c080) in function base_GHCziEventziControl_closeControl1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x46c350) in function base_GHCziEventziControl_newControl1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x6d (address 0x46ca75) in function base_GHCziEventziControl_readControlMessage4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x81 (address 0x46cc31) in function base_GHCziEventziControl_zdwreadControlMessage_info
BOLT-WARNING: unable to disassemble instruction at offset 0x1b8 (address 0x46d418) in function base_GHCziEventziEPoll_new10_info
BOLT-WARNING: unable to disassemble instruction at offset 0xa0 (address 0x46dec8) in function base_GHCziEventziEPoll_new9_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x46e080) in function base_GHCziEventziEPoll_new5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x46e2f8) in function base_GHCziEventziEPoll_new4_info
BOLT-WARNING: unable to disassemble instruction at offset 0xb2 (address 0x46e3f2) in function base_GHCziEventziEPoll_zdwzdj_info
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x46e5c8) in function base_GHCziEventziEPoll_new1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x62 (address 0x46e6b2) in function base_GHCziEventziIntTable_zdwgrow_info
BOLT-WARNING: function base_GHCziEventziIntTable_zdwinsertWith_info has an object detected in a padding region at address 0x46eb30
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x46ef88) in function base_GHCziEventziManager_fdEvents_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x46f0c8) in function base_GHCziEventziManager_cleanup1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x46f7e8) in function base_GHCziEventziManager_zdwxs_info
BOLT-WARNING: function base_GHCziEventziManager_new5_info has an object detected in a padding region at address 0x46f560
BOLT-WARNING: function base_GHCziEventziManager_release2_info has an object detected in a padding region at address 0x46f418
BOLT-WARNING: unable to disassemble instruction at offset 0x132 (address 0x46fb3a) in function base_GHCziEventziManager_new2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x70 (address 0x470198) in function base_GHCziEventziManager_closeFdzu4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x470248) in function base_GHCziEventziManager_zdweventsOf_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4703a8) in function base_GHCziEventziManager_closeFdzu3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x68 (address 0x471698) in function base_GHCziEventziManager_loop5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x471fa8) in function base_GHCziEventziManager_loop3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x472338) in function base_GHCziEventziManager_loop2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4723a0) in function base_GHCziEventziManager_loop6_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4727d8) in function base_GHCziEventziManager_loop1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x472db8) in function base_GHCziEventziManager_zdwcloseFdzu_info
BOLT-WARNING: unable to disassemble instruction at offset 0x5a (address 0x474002) in function base_GHCziEventziManager_unregisterFd2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x4745d8) in function base_GHCziEventziPSQ_adjustzuzdsmerge_info
BOLT-WARNING: unable to disassemble instruction at offset 0x42 (address 0x4759f2) in function base_GHCziEventziPSQ_zdwatMost_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x475d70) in function base_GHCziEventziPoll_zdfStorablePollFd2_info
BOLT-WARNING: unable to disassemble instruction at offset 0x52 (address 0x475e32) in function base_GHCziEventziPoll_zdfStorablePollFd6_info
BOLT-WARNING: unable to disassemble instruction at offset 0x52 (address 0x475f22) in function base_GHCziEventziPoll_zdfStorablePollFd4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x475ff0) in function base_GHCziEventziPoll_zdfStorablePollFd1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x45 (address 0x4760b5) in function base_GHCziEventziPoll_zdfStorablePollFd5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x45 (address 0x4761ad) in function base_GHCziEventziPoll_zdfStorablePollFd3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x4762b8) in function base_GHCziEventziPoll_new3_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x476ca0) in function base_GHCziEventziPoll_new5_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4781f8) in function base_GHCziEventziPoll_new4_info
BOLT-WARNING: unable to disassemble instruction at offset 0x48 (address 0x4782e8) in function base_GHCziEventziPoll_new1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x75 (address 0x47957d) in function base_GHCziEventziArray_zdwlvl_info
BOLT-WARNING: unable to disassemble instruction at offset 0x88 (address 0x479660) in function base_GHCziEventziArray_zdwunsafeWritezq_info
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x479d18) in function base_GHCziEventziArray_removeAt1_info
BOLT-WARNING: unable to disassemble instruction at offset 0xda (address 0x47a70a) in function base_GHCziEventziArray_zdwsnoc_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x47ac78) in function integerzmgmp_GHCziIntegerziType_integerToInt_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x47ad90) in function integerzmgmp_GHCziIntegerziType_czzeroBigNat_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x47ae78) in function integerzmgmp_GHCziIntegerziType_oneBigNat_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x47af60) in function integerzmgmp_GHCziIntegerziType_zzeroBigNat_info
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x47b090) in function integerzmgmp_GHCziIntegerziType_wordToInteger_info
BOLT-WARNING: function integerzmgmp_GHCziIntegerziType_BNzh_con_info has an object detected in a padding region at address 0x47b1a8
BOLT-WARNING: function ghczmprim_GHCziCString_unpackCStringzh_info has an object detected in a padding region at address 0x47b338
BOLT-WARNING: function ghczmprim_GHCziCString_unpackAppendCStringzh_info has an object detected in a padding region at address 0x47b588
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x47b880) in function ghczmprim_GHCziClasses_zeze_info
BOLT-WARNING: unable to disassemble instruction at offset 0x20 (address 0x47b8d0) in function ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x47ba90) in function ghczmprim_GHCziClasses_zdfEqZMZNzuzdszdczsze1_info
BOLT-WARNING: unable to disassemble instruction at offset 0x38 (address 0x48fd20) in function stg_catchzh
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4901a8) in function stg_sel_0_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490218) in function stg_sel_1_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490288) in function stg_sel_2_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4902f8) in function stg_sel_3_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490368) in function stg_sel_4_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4903d8) in function stg_sel_5_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490448) in function stg_sel_6_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4904b8) in function stg_sel_7_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490528) in function stg_sel_8_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490598) in function stg_sel_9_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490608) in function stg_sel_10_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490678) in function stg_sel_11_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4906e8) in function stg_sel_12_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490758) in function stg_sel_13_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x4907c8) in function stg_sel_14_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x490838) in function stg_sel_15_upd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4908a0) in function stg_sel_0_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490900) in function stg_sel_1_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490960) in function stg_sel_2_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4909c0) in function stg_sel_3_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490a20) in function stg_sel_4_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490a80) in function stg_sel_5_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490ae0) in function stg_sel_6_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490b40) in function stg_sel_7_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490ba0) in function stg_sel_8_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490c00) in function stg_sel_9_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490c60) in function stg_sel_10_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490cc0) in function stg_sel_11_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490d20) in function stg_sel_12_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490d80) in function stg_sel_13_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490de0) in function stg_sel_14_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x490e40) in function stg_sel_15_noupd_info
BOLT-WARNING: unable to disassemble instruction at offset 0x2e (address 0x4912ae) in function stg_gc_prim
BOLT-WARNING: unable to disassemble instruction at offset 0x20 (address 0x4912d8) in function stg_gc_prim_p
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x491320) in function stg_gc_prim_pp
BOLT-WARNING: unable to disassemble instruction at offset 0x3a (address 0x49137a) in function stg_gc_prim_n
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x491518) in function stg_gc_pp
BOLT-WARNING: unable to disassemble instruction at offset 0x28 (address 0x491558) in function stg_gc_ppp
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x4915a8) in function stg_gc_pppp
BOLT-WARNING: unable to disassemble instruction at offset 0xaa (address 0x491b1a) in function stg_newAlignedPinnedByteArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0x40 (address 0x491bd0) in function stg_resizzeMutableByteArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb2 (address 0x491cca) in function stg_newArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xd6 (address 0x49220e) in function stg_cloneArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xd6 (address 0x49231e) in function stg_cloneMutableArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xd6 (address 0x49242e) in function stg_freezzeArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xd6 (address 0x49253e) in function stg_thawArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0x92 (address 0x492712) in function stg_newSmallArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb6 (address 0x4928c6) in function stg_cloneSmallArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb6 (address 0x4929b6) in function stg_cloneSmallMutableArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb6 (address 0x492aa6) in function stg_freezzeSmallArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb6 (address 0x492b96) in function stg_thawSmallArrayzh
BOLT-WARNING: unable to disassemble instruction at offset 0x80 (address 0x492db8) in function stg_atomicModifyMutVarzh
BOLT-WARNING: unable to disassemble instruction at offset 0x60 (address 0x492e60) in function stg_mkWeakzh
BOLT-WARNING: unable to disassemble instruction at offset 0xd0 (address 0x492f90) in function stg_addCFinalizzerToWeakzh
BOLT-WARNING: unable to disassemble instruction at offset 0xb2 (address 0x493362) in function stg_forkOnzh
BOLT-WARNING: unable to disassemble instruction at offset 0xa0 (address 0x493820) in function stg_atomicallyzh
BOLT-WARNING: unable to disassemble instruction at offset 0x58 (address 0x4938e8) in function stg_catchSTMzh
BOLT-WARNING: unable to disassemble instruction at offset 0x90 (address 0x4939b0) in function stg_catchRetryzh
BOLT-WARNING: unable to disassemble instruction at offset 0x7e (address 0x49466e) in function stg_makeStableNamezh
BOLT-WARNING: unable to disassemble instruction at offset 0x70 (address 0x494740) in function stg_newBCOzh
BOLT-ERROR: cannot find BB containing branch destination.
=======================================
BOLT is unable to proceed because it couldn't properly understand this function.
If you are running the most recent version of BOLT, you may want to report this and paste this dump.
Please check that there is no sensitive contents being shared in this dump.

Offending function: base_ControlziExceptionziBase_zdfShowNonTermination1_info

Function contents (
  0000: 488D45F0 4C39F872 1A48C745 F0C06D40  |H.E.L9.r.H.E..m@|
  0010: 004C89F3 488975F8 4883C5F0 F6C30775  |.L..H.u.H......u|
  0020: 27FF23BB C0C34B00 41FF65F8 0F1F4000  |'.#...K.A.e...@.|
  0030: 482C0B00 00000000 01000000 00000000  |H,..............|
  0040: 1E000000 01000000 488B7508 41BE80C3  |........H.u.A...|
  0050: 4B004883 C510E9DD 0D0000             |K.H........|
)

Binary Function "base_ControlziExceptionziBase_zdfShowNonTermination1_info"  {
  Number      : 33
  State       : disassembled
  Address     : 0x406d78
  Size        : 0x5b
  MaxSize     : 0x80
  Offset      : 0x6d78
  Section     : .text
  Orc Section : .local.text.base_ControlziExceptionziBase_zdfShowNonTermination1_info
  LSDA        : 0x0
  IsSimple    : 1
  IsSplit     : 0
  BB Count    : 6
}
DWARF CFI Instructions:
    <empty>
End of Function "base_ControlziExceptionziBase_zdfShowNonTermination1_info"

ERROR: disassembly failed - inconsistent branch found.
=======================================

I get basically identical errors when compiled with the LLVM backend (with ghc --make -fllvm...).

Let me know if I can help debug.

Automated build as docker image?

Can BOLT provide docker image for pre-built binary?

I was trying build LLVM with BOLT patch, but I am getting out of memory error on compilation, and it took ages.

[Question] AArch64 LongJmpPass stub is still out of range after modified

AArch64 LongJmpPass stub is still out of range after modified

I used llvm-bolt to optimize mysql one ARM64 server, but the llvm-bolt can't be finished, it runs in LongJmpPass functions all the time.

I used gdb to debug llvm-bolt and found that llvm::bolt::LongJmpPass::needsStub always return true on some instructions(the target symbol is a stub symbol); if the instruction's symbol is a stub symbol, it means that the instruction has been modified. If a modified instruction's jump range between the instruction and the stub still is out of range, I guess the stub's insertion point is tool long from the current instruction.

Is there any code in LongJmpPass to make sure the new stub's insertion point enough close to the current instruction(make sure the current instruct could jump to the new stub)? Does some LongJmpPass function change the stub's location or the is stub's address is error(the stub's address it to large printed in gdb)?

needsStub always retuns true on some modified instructions. Is the BinaryBasicBlock to big or is there some other bug?

llvm-bolt error on Intel Compiler compiled code.

=======================================
llvm-bolt: WARNING: reading perf data directly is unsupported, please use -aggregate-only or perf2bolt.
!!! Proceed on your own risk. !!!
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is: 00cc5e0f49e66954aa66374dc9cbf9f1ef64507d
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
BOLT-WARNING: sizes differ for function __intel_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-WARNING: sizes differ for function __intel_new_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-WARNING: unable to disassemble instruction at offset 0x6c8 (address 0x5115f8) in function __intel_avx_rep_memcpy
BOLT-WARNING: unable to disassemble instruction at offset 0x165 (address 0x512855) in function __intel_new_memcpy(*2)
BOLT-ERROR: cannot find BB containing branch destination.

BOLT is unable to proceed because it couldn't properly understand this function.
If you are running the most recent version of BOLT, you may want to report this and paste this dump.
Please check that there is no sensitive contents being shared in this dump.

Unfortunately i cannot share the contents of dump at this time.

CMake configuration requires LLVM AArch64 target

The CMake configuration of LLVM with BOLT fails in case only the X86 target is built:

# ... while following the standard BOLT build instructions ...
cmake ../llvm -DLLVM_TARGETS_TO_BUILD=X86

fails with

CMake Error at cmake/modules/AddLLVM.cmake:559 (add_dependencies):
  The dependency target "AArch64CommonTableGen" of target
  "LLVMBOLTTargetAArch64" does not exist.
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:607 (llvm_add_library)
  tools/llvm-bolt/src/Target/AArch64/CMakeLists.txt:1 (add_llvm_library)

A simple if-statement in CMake script is probably enough to fix this. I'm not familiar enough with LLVM's CMake scripts to quickly fix this though.

Thanks.

Assertion `validateCFG() && "invalid CFG"'

BOLT fails with the following assertion:

llvm/tools/llvm-bolt/src/BinaryFunction.cpp:2950: void llvm::bolt::BinaryFunction::postProcessBranches(): Assertion `validateCFG() && "invalid CFG"' failed.

BOLT-WARNING: CFG invalid in XYZ @ .LBB011397
Binary Function XYZ {
  Number      : 11399
  State       : CFG constructed
  Address     : 0x780d48
  Size        : 0x1b
  MaxSize     : 0x1b
  Offset      : 0x380d48
  Section     : .text
  Orc Section : .local.text.XYZ
  LSDA        : 0x0
  IsSimple    : 1
  IsSplit     : 0
  BB Count    : 5
  Hash        : 710a6fe00cd59893
  BB Layout   : .LBB011397, .LFT68390, .LFT68391, FUNCat0x780d5c, FUNCat0x780d5d
}
.LBB011397 (3 instructions, align : 1)
  Entry Point
  CFI State : 0
    00000000: 	movl	%fs:-0x350, %eax
    00000008: 	cmpl	%eax, %edi
    0000000a: 	jne	.Ltmp97591 # Offset: 10
  Successors: FUNCat0x780d5c, .LFT68390
  CFI State: 0

.LFT68390 (2 instructions, align : 1)
  CFI State : 0
  Predecessors: .LBB011397
    0000000c: 	cmpq	%rdx, (%rsi)
    0000000f: 	jne	.Ltmp97592 # Offset: 15
  Successors: FUNCat0x780d5d, .LFT68391
  CFI State: 0

.LFT68391 (1 instructions, align : 1)
  CFI State : 0
  Predecessors: .LFT68390
    00000011: 	movq	%rcx, (%rsi) # Offset: 17
  Successors: FUNCat0x780d5c
  CFI State: 0

FUNCat0x780d5c (1 instructions, align : 1)
  Entry Point
  CFI State : 0
  Predecessors: .LBB011397, .LFT68391
    00000014: 	retq # Offset: 20
  CFI State: 0

FUNCat0x780d5d (2 instructions, align : 1)
  Entry Point
  CFI State : 0
  Predecessors: .LFT68390
    00000015: 	movl	$0xffffffff, %eax
    0000001a: 	retq # Offset: 26
  CFI State: 0

DWARF CFI Instructions:
    <empty>
End of Function "XYZ"

Error reading bolt data input file: line 1, column 43: expected single char for mispred bit

Intel compiler + gcc 4.8.5.
Now that #23 has been fixed, i see this:

PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     270c5a1e626f1b4f158599ab044340721e063450
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
BOLT-WARNING: sizes differ for function __intel_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-WARNING: sizes differ for function __intel_new_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function _ZL28read_encoded_value_with_basehmPKhPm/eh_personality.o/1(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x6c8 (address 0x51d0b8) in function __intel_avx_rep_memcpy
BOLT-WARNING: unable to disassemble instruction at offset 0x165 (address 0x51e315) in function __intel_new_memcpy(*2)
PERF2BOLT: Waiting for perf tasks collection to finish...
PERF2BOLT: Parsing perf-script tasks output
PERF2BOLT: Input binary is associated with 1 PID(s)
PERF2BOLT: Waiting for perf events collection to finish...
PERF2BOLT: Aggregating branch events...
Error reading bolt data input file: line 1, column 43: expected single char for mispred bit
Found: 0x7f2c9cf100fe
PERF2BOLT: Failed to parse samples
PERF2BOLT: Wrote 0 objects and 0 memory objects to perf.fdata

Is my perf.data broken?

[Feature Request] Web assembly support

To my knowledge there is no binary layout optimization tool for .wasm. It would be great if we can have one.

Though I don't know if it's doable with BOLT or if it's the scope of BOLT. Please close this issue if it's not the case.

Missing info on assumptions/limitations

The tool consumes post-link binaries. In general, even finding instruction boundaries on x86 isn't exactly solvable, let alone deciding basic block boundaries, safety of reordering, etc. Thus, the tool obviously makes a lot of assumptions about input, or, in other words, has limitations w.r.t which programs can be correctly transformed.

The EuroLLVM'2016 presentation on BOLT has a brief enumeration of (some?) limitations, so evidently the issues were realized, but unfortunately neither the README nor the initial Facebook article make no mention of them.

It would be nice to have a description of the class of programs to which BOLT may be applied safely.

Also, if BOLT implementation has built-in safeguards for deciding "can't touch this code", it would be nice to know how they operate, too.

PMU Hardware doesn't support sampling/overflow-interrupts

I got this error on our host when doing the perf profiling when "-j" is enabled. looks its needed to do branch optimization

if i remove "-j", the perf data fed into BOLT will lead to the following error from BOLT:
llvm-bolt: ../tools/llvm-bolt/src/BinaryFunction.cpp:1726: bool llvm::bolt::BinaryFunction::buildCFG(): Assertion ToBB && "cannot find BB containing TO branch"' failed.`

any workaround?

support for multiple text sections

If I have multiple text sections, I saw the following error:

perf2bolt: /usr/local/google/home/dehao/bolt/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1383: void llvm::bolt::RewriteInstance::discoverFileObjects(): Assertion `Section && "section for functions must be registered."' failed.

Any ideas how to workaround the issue?

Build error with CMAKE_BUILD_TYPE=Release on GCC 8.1.1

Hello.
I have build errors with GCC 8.1.1 and CMAKE_BUILD_TYPE=Release

Here is log:

[2266/2432] Linking CXX executable bin/llvm-bolt
FAILED: bin/llvm-bolt 
: && /usr/bin/c++  -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -DNDEBUG  -Wl,-allow-shlib-undefined    -Wl,-rpath-link,/home/zamazan4ik/OpenSource/bolt/build_release/./lib  -Wl,-O3 -Wl,--gc-sections tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/llvm-bolt.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryContext.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryData.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryFunction.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryFunctionProfile.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryPassManager.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinarySection.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BoltDiff.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/CacheMetrics.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/DataAggregator.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/DataReader.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/DebugData.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/DWARFRewriter.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/Exceptions.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/JumpTable.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/MCPlusBuilder.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/ProfileReader.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/ProfileWriter.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/Relocation.cpp.o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/RewriteInstance.cpp.o  -o bin/llvm-bolt  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Disassembler.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmParser.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMDesc.a lib/libLLVMARMDisassembler.a lib/libLLVMARMInfo.a lib/libLLVMARMUtils.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmParser.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMBPFDesc.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFInfo.a lib/libLLVMHexagonCodeGen.a lib/libLLVMHexagonAsmParser.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonDisassembler.a lib/libLLVMHexagonInfo.a lib/libLLVMLanaiCodeGen.a lib/libLLVMLanaiAsmParser.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiDisassembler.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmParser.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMipsDesc.a lib/libLLVMMipsDisassembler.a lib/libLLVMMipsInfo.a lib/libLLVMMSP430CodeGen.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMMSP430Desc.a lib/libLLVMMSP430Info.a lib/libLLVMNVPTXCodeGen.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMNVPTXDesc.a lib/libLLVMNVPTXInfo.a lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCDisassembler.a lib/libLLVMPowerPCInfo.a lib/libLLVMSparcCodeGen.a lib/libLLVMSparcAsmParser.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcDesc.a lib/libLLVMSparcDisassembler.a lib/libLLVMSparcInfo.a lib/libLLVMSystemZCodeGen.a lib/libLLVMSystemZAsmParser.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZDisassembler.a lib/libLLVMSystemZInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Desc.a lib/libLLVMX86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMX86Utils.a lib/libLLVMXCoreCodeGen.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMXCoreDesc.a lib/libLLVMXCoreDisassembler.a lib/libLLVMXCoreInfo.a lib/libLLVMBOLTPasses.a lib/libLLVMBOLTTargetAArch64.a lib/libLLVMBOLTTargetX86.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMMC.a lib/libLLVMMCDisassembler.a lib/libLLVMMCParser.a lib/libLLVMObject.a lib/libLLVMOrcJIT.a lib/libLLVMSupport.a -lpthread lib/libLLVMAArch64Desc.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMARMUtils.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonInfo.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMInstrumentation.a lib/libLLVMLinker.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a lib/libLLVMGlobalISel.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMAsmPrinter.a lib/libLLVMSelectionDAG.a lib/libLLVMCodeGen.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMBitWriter.a lib/libLLVMMCDisassembler.a lib/libLLVMTransformUtils.a lib/libLLVMExecutionEngine.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMProfileData.a lib/libLLVMRuntimeDyld.a lib/libLLVMObject.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMSupport.a -lz -lrt -ldl -lpthread -lm lib/libLLVMDemangle.a && :
lib/libLLVMBOLTTargetAArch64.a(AArch64MCPlusBuilder.cpp.o): In function `(anonymous namespace)::AArch64MCPlusBuilder::reverseBranchCondition(llvm::MCInst&, llvm::MCSymbol const*, llvm::MCContext*) const':
AArch64MCPlusBuilder.cpp:(.text._ZNK12_GLOBAL__N_120AArch64MCPlusBuilder22reverseBranchConditionERN4llvm6MCInstEPKNS1_8MCSymbolEPNS1_9MCContextE+0x332): undefined reference to `llvm::MCInst::dump() const'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1

How to reproduce:

  1. Checkout llvm-bolt according to instruction from README.md
  2. cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm
  3. ninja
  4. Wait for link error.

My OS: Fedora 28

Without specifying release mode llvm-bolt compiles successfully. Did I miss something or it's a bug?

perf2bolt crashes with “Assertion `JTOffsetCandidates.size() > 2 && "expected more than 2 jump table entries"' failed.”

Hi,

I'm trying to build MySQL with BOLT; I've made an optimized build with -Wl,--emit-relocs and profiled it on some example load. However, perf2bolt crashes:

atum17:~/mysql/obj> perf2bolt -p ~/nmu/BOLT/build/perf.data -o perf.fdata -ignore-build-id ./bin/mysqld 
PERF2BOLT: Starting data aggregation job for /srv/sesse/nmu/BOLT/build/perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is:     88f1fd41cb48ca5c9b03a067820e68175304b37f
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x3800000, offset 0x3800000
BOLT-INFO: enabling relocation mode
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected
perf2bolt: /srv/sesse/nmu/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:871: llvm::bolt::IndirectBranchType llvm::bolt::BinaryFunction::processIndirectBranch(llvm::MCInst&, unsigned int, uint64_t): Assertion `JTOffsetCandidates.size() > 2 && "expected more than 2 jump table entries"' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x00005561bfb4f582 (perf2bolt+0x2374582)
#1 0x00005561bfb4f615 (perf2bolt+0x2374615)
#2 0x00005561bfb4daba (perf2bolt+0x2372aba)
#3 0x00005561bfb4eef7 (perf2bolt+0x2373ef7)
#4 0x00007fac9f32af50 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11f50)
#5 0x00007fac9de10e7b gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x34e7b)
#6 0x00007fac9de12231 abort (/lib/x86_64-linux-gnu/libc.so.6+0x36231)
#7 0x00007fac9de099da (/lib/x86_64-linux-gnu/libc.so.6+0x2d9da)
#8 0x00007fac9de09a52 (/lib/x86_64-linux-gnu/libc.so.6+0x2da52)
#9 0x00005561bdbe0f3e (perf2bolt+0x405f3e)
#10 0x00005561bdbe3791 (perf2bolt+0x408791)
#11 0x00005561bdcff34c (perf2bolt+0x52434c)
#12 0x00005561bdcf414a (perf2bolt+0x51914a)
#13 0x00005561bdcf44a9 (perf2bolt+0x5194a9)
#14 0x00005561bdb9e35e (perf2bolt+0x3c335e)
#15 0x00007fac9ddfda87 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21a87)
#16 0x00005561bdb9cfea (perf2bolt+0x3c1fea)
Stack dump:
0.	Program arguments: perf2bolt -p /srv/sesse/nmu/BOLT/build/perf.data -o perf.fdata -ignore-build-id ./bin/mysqld 

BOLT-WARNING: unable to disassemble instruction at offset 0x6c8 (address 0x50a7c8) in function __intel_avx_rep_memcpy

When compiling using Intel Compiler, by default some functions will be replaced by the Intel counterparts.
BOLT does not like it and no-relocs mode is enforced.

BOLT-WARNING: sizes differ for function __intel_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-WARNING: sizes differ for function __intel_new_memcpy. FDE : 6055; symbol table : 6064. Using max size.
BOLT-WARNING: sizes differ for function __intel_memset. FDE : 3035; symbol table : 4576. Using max size.
BOLT-WARNING: sizes differ for function __intel_new_memset. FDE : 3035; symbol table : 4576. Using max size.
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function _ZL28read_encoded_value_with_basehmPKhPm/eh_personality.o/1(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x6c8 (address 0x50a7c8) in function __intel_avx_rep_memcpy
BOLT-WARNING: unable to disassemble instruction at offset 0xb20 (address 0x50c3e0) in function __intel_avx_rep_memset
BOLT-WARNING: unable to disassemble instruction at offset 0x165 (address 0x50ca65) in function __intel_new_memcpy(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x50 (address 0x50e100) in function __intel_new_memset(*2)

ninja build failed

I proceed with the Installation step,and I got the following error in the final stap.

$ ninja
[11/310] Linking CXX shared library lib/libLTO.so.7svn
FAILED: lib/libLTO.so.7svn
: && /usr/bin/c++ -fPIC -fPIC -fvisibility-inlines-hidden -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual
-dtor -Wno-comment -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/root/build/./lib   -Wl,--version-script,/root/build/tools/lto/LTO.exports -shared -Wl,-soname,libLTO.so.7 -o lib/libLTO.so.7svn tools/lto/CMakeFiles/LTO.dir/LTO
Disassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMAArch64CodeGen.a lib/libLLVMAArch64AsmParser.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Disassembl
er.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUCodeGen.a lib/libLLVMAMDGPUAsmParser.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUDisassembler.a lib/libLLVMAMDGPUInfo.a lib/libL
LVMAMDGPUUtils.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmParser.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMDesc.a lib/libLLVMARMDisassembler.a lib/libLLVMARMInfo.a lib/libLLVMARMUtils.a lib/libLLVMBPFCodeGen.a lib/libLLVMBPFAsmPa
rser.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMBPFDesc.a lib/libLLVMBPFDisassembler.a lib/libLLVMBPFInfo.a lib/libLLVMHexagonCodeGen.a lib/libLLVMHexagonAsmParser.a lib/libLLVMHexagonDesc.a lib/libLLVMHexagonDisassembler.a lib/libLL
VMHexagonInfo.a lib/libLLVMLanaiCodeGen.a lib/libLLVMLanaiAsmParser.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiDisassembler.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmParser.a li
b/libLLVMMipsAsmPrinter.a lib/libLLVMMipsDesc.a lib/libLLVMMipsDisassembler.a lib/libLLVMMipsInfo.a lib/libLLVMMSP430CodeGen.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMMSP430Desc.a lib/libLLVMMSP430Info.a lib/libLLVMNVPTXCodeGen.a
 lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMNVPTXDesc.a lib/libLLVMNVPTXInfo.a lib/libLLVMPowerPCCodeGen.a lib/libLLVMPowerPCAsmParser.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCDisassembler.a lib/lib
LLVMPowerPCInfo.a lib/libLLVMSparcCodeGen.a lib/libLLVMSparcAsmParser.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcDesc.a lib/libLLVMSparcDisassembler.a lib/libLLVMSparcInfo.a lib/libLLVMSystemZCodeGen.a lib/libLLVMSystemZAsmPar
ser.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZDisassembler.a lib/libLLVMSystemZInfo.a lib/libLLVMX86CodeGen.a lib/libLLVMX86AsmParser.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Desc.a lib/libLLVMX
86Disassembler.a lib/libLLVMX86Info.a lib/libLLVMX86Utils.a lib/libLLVMXCoreCodeGen.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMXCoreDesc.a lib/libLLVMXCoreDisassembler.a lib/libLLVMXCoreInfo.a lib/libLLVMBitReader.a lib/libLLVMCore
.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCDisassembler.a lib/libLLVMSupport.a lib/libLLVMTarget.a lib/libLLVMAArch64Desc.a lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUD
esc.a lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUInfo.a lib/libLLVMAMDGPUUtils.a lib/libLLVMARMDesc.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a lib/libLLVMARMUtils.a lib/libLLVMBPFAsmPrinter.a lib/libLLVMHexagonDesc.a li
b/libLLVMHexagonInfo.a lib/libLLVMLanaiDesc.a lib/libLLVMLanaiAsmPrinter.a lib/libLLVMLanaiInfo.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMSP430AsmPrinter.a lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMSpa
rcAsmPrinter.a lib/libLLVMSystemZDesc.a lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a lib/libLLVMGlobalISel.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMXCoreAsmPrinter.a lib/libLLVMAsmPrinter.a lib/libL
LVMSelectionDAG.a lib/libLLVMMCDisassembler.a lib/libLLVMObjCARCOpts.a lib/libLLVMPasses.a lib/libLLVMCodeGen.a lib/libLLVMTarget.a lib/libLLVMipo.a lib/libLLVMScalarOpts.a lib/libLLVMVectorize.a lib/libLLVMBitWriter.a lib/libLLVM
Linker.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a lib/libLLVMTransformUtils.a lib/libLLVMAnalysis.a lib/libLLVMObject.a lib/libLLVMBitRea
der.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMProfileData.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMSupport.a -lrt -ldl -lpthread -lm lib/libLLVMDema
ngle.a && :
collect2: error: ld terminated with signal 9 [Killed]
[13/310] Linking CXX executable bin/bugpoint
ninja: build stopped: subcommand failed.

my environment:

ninja --version
1.8.2
uname -a
Linux myhost 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

fatal: reference is not a tree: f137ed238 ?

Running into this error when ?

git checkout -b llvm-bolt f137ed238db11440f03083b1c88b7ffc0f4af65e
fatal: reference is not a tree: f137ed238db11440f03083b1c88b7ffc0f4af65e

[ASM] Problem when BOLT on libcrypto

Hi,

I tried to apply BOLT on a binary (C++) which use the crypto library of OpenSSL (v1.1.1b).
This library generate a lot of WARNING in BOLT before to fail on relocations (No fail but still warnings with -relocs=0).

I tried to apply BOLT directly on
libcrypto.so (I use the static lib on my binary but it was for the test), it don't fail but I still have all the warnings.

Here is the output:

 % llvm-bolt libcrypto.so -o libcrypto.so.bolt
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: creating new program header table at address 0x400000, offset 0x400000
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
BOLT-WARNING: sizes differ for function aesni_set_encrypt_key/1. FDE : 1173; symbol table : 1374. Using max size.
BOLT-WARNING: sizes differ for function poly1305_blocks_avx/1. FDE : 420; symbol table : 2842. Using max size.
BOLT-WARNING: sizes differ for function poly1305_blocks_avx2/1. FDE : 420; symbol table : 2008. Using max size.
BOLT-WARNING: sizes differ for function sha1_block_data_order_shaext/1. FDE : 627; symbol table : 629. Using max size.
BOLT-WARNING: FDE [0x1af540, 0x1af61e) conflicts with function poly1305_blocks_avx/crypto/poly1305/poly1305-x86_64.o/1(*2)
BOLT-WARNING: FDE [0x1af620, 0x1afe9a) conflicts with function poly1305_blocks_avx/crypto/poly1305/poly1305-x86_64.o/1(*2)
BOLT-WARNING: FDE [0x1b0100, 0x1b01f7) conflicts with function poly1305_blocks_avx2/crypto/poly1305/poly1305-x86_64.o/1(*2)
BOLT-WARNING: FDE [0x1b0200, 0x1b0718) conflicts with function poly1305_blocks_avx2/crypto/poly1305/poly1305-x86_64.o/1(*2)
BOLT-WARNING: FDE [0x1ba007, 0x1ba65f) conflicts with function RC4
BOLT-WARNING: reference in the middle of instruction detected in function _x86_64_AES_encrypt_compact/crypto/aes/aes-x86_64.o/1(*2) at offset 0x270
BOLT-WARNING: function AES_cbc_encrypt has an object detected in a padding region at address 0x78e40
BOLT-WARNING: reference in the middle of instruction detected in function _x86_64_AES_decrypt_compact/crypto/aes/aes-x86_64.o/1(*2) at offset 0x2f0
BOLT-WARNING: function AES_cbc_encrypt has an object detected in a padding region at address 0x78640
BOLT-WARNING: reference in the middle of instruction detected in function AES_set_decrypt_key at offset 0x220
BOLT-WARNING: reference in the middle of instruction detected in function aesni_multi_cbc_decrypt/1 at offset 0xb00
BOLT-WARNING: reference in the middle of instruction detected in function aesni_multi_cbc_decrypt/1 at offset 0x3e0
BOLT-WARNING: reference in the middle of instruction detected in function aesni_multi_cbc_encrypt_avx/crypto/aes/aesni-mb-x86_64.o/1(*2) at offset 0x720
BOLT-WARNING: reference in the middle of instruction detected in function aesni_cbc_sha1_enc_avx/crypto/aes/aesni-sha1-x86_64.o/1(*2) at offset 0x1140
BOLT-WARNING: unable to disassemble instruction at offset 0x30 (address 0x7e770) in function K_XX_XX/crypto/aes/aesni-sha1-x86_64.o/1(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x1 (address 0x7edc1) in function K256/crypto/aes/aesni-sha256-x86_64.o/1(*2)
BOLT-WARNING: function aesni_set_encrypt_key/1 has an object detected in a padding region at address 0x87500
BOLT-WARNING: reference in the middle of instruction detected in function aesni_set_decrypt_key/1 at offset 0x70
BOLT-WARNING: unable to disassemble instruction at offset 0x4 (address 0x8a104) in function _bsaes_const/crypto/aes/bsaes-x86_64.o/1(*2)
BOLT-WARNING: reference in the middle of instruction detected in function _bsaes_const/crypto/aes/bsaes-x86_64.o/1(*2) at offset 0x130
BOLT-WARNING: reference in the middle of instruction detected in function _bsaes_const/crypto/aes/bsaes-x86_64.o/1(*2) at offset 0xb0
BOLT-WARNING: reference in the middle of instruction detected in function _bsaes_const/crypto/aes/bsaes-x86_64.o/1(*2) at offset 0x140
BOLT-WARNING: reference in the middle of instruction detected in function _bsaes_const/crypto/aes/bsaes-x86_64.o/1(*2) at offset 0x30
BOLT-WARNING: unable to disassemble instruction at offset 0x11 (address 0x8ab11) in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2)
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x1d0
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0xb0
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x20
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x190
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x30
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x1b0
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x40
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0xe0
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x250
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0xf0
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x260
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x290
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x130
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x170
BOLT-WARNING: reference in the middle of instruction detected in function _vpaes_consts/crypto/aes/vpaes-x86_64.o/1(*2) at offset 0x180
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function asn1_time_to_tm/1
BOLT-WARNING: function rsaz_avx2_eligible/1 has an object detected in a padding region at address 0xd26c0
BOLT-WARNING: function rsaz_512_gather4/1 has an object detected in a padding region at address 0xd4240
BOLT-WARNING: function bn_gather5/1 has an object detected in a padding region at address 0xd9340
BOLT-WARNING: reference in the middle of instruction detected in function bn_power5/1 at offset 0x6d9
BOLT-WARNING: reference in the middle of instruction detected in function bn_power5/1 at offset 0x160
BOLT-WARNING: reference in the middle of instruction detected in function bn_powerx5/crypto/bn/x86_64-mont5.o/1(*2) at offset 0xac0
BOLT-WARNING: reference in the middle of instruction detected in function bn_powerx5/crypto/bn/x86_64-mont5.o/1(*2) at offset 0x797
BOLT-WARNING: reference in the middle of instruction detected in function bn_powerx5/crypto/bn/x86_64-mont5.o/1(*2) at offset 0x160
BOLT-WARNING: reference in the middle of instruction detected in function bn_sqrx8x_internal/1 at offset 0x960
BOLT-WARNING: function Camellia_Ekeygen/1 has an object detected in a padding region at address 0xda740
BOLT-WARNING: function Camellia_Ekeygen/1 has an object detected in a padding region at address 0xda700
BOLT-WARNING: function CAST_set_key has an object detected in a padding region at address 0xdd850
BOLT-WARNING: unable to disassemble instruction at offset 0x1a (address 0x12701a) in function ecp_nistz256_precomputed/1
BOLT-WARNING: function EC_GFp_nist_method has an object detected in a padding region at address 0x126fdf
BOLT-WARNING: function aesni_gcm_encrypt/1 has an object detected in a padding region at address 0x18bac0
BOLT-WARNING: function gcm_ghash_avx/1 has an object detected in a padding region at address 0x194480
BOLT-WARNING: function gcm_ghash_avx/1 has an object detected in a padding region at address 0x194450
BOLT-WARNING: function gcm_ghash_avx/1 has an object detected in a padding region at address 0x194440
BOLT-WARNING: function poly1305_emit_base2_44/crypto/poly1305/poly1305-x86_64.o/1(*2) has an object detected in a padding region at address 0x1b20c0
BOLT-WARNING: reference in the middle of instruction detected in function poly1305_blocks_vpmadd52_4x/crypto/poly1305/poly1305-x86_64.o/1(*2) at offset 0x12
BOLT-WARNING: unable to disassemble instruction at offset 0x73 (address 0x1ba793) in function RC4_options
BOLT-WARNING: unable to disassemble instruction at offset 0x8 (address 0x1cac48) in function iotas/crypto/sha/keccak1600-x86_64.o/1(*2)
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block/1 at offset 0x7620
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block/1 at offset 0x5260
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block/1 at offset 0x3100
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block/1 at offset 0x2ac0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_shaext/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x4b60
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_shaext/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x27a0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_shaext/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x640
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_avx/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x4520
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_avx/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x2160
BOLT-WARNING: reference in the middle of instruction detected in function sha1_multi_block_avx2/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x23c0
BOLT-WARNING: unable to disassemble instruction at offset 0x33 (address 0x1d2453) in function K_XX_XX/crypto/sha/sha1-mb-x86_64.o/1(*2)
BOLT-WARNING: reference in the middle of instruction detected in function K_XX_XX/crypto/sha/sha1-mb-x86_64.o/1(*2) at offset 0x80
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order/1 at offset 0x4840
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order/1 at offset 0x2ef0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order/1 at offset 0x2160
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order/1 at offset 0x1320
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order/1 at offset 0x10a0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_shaext/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x37a0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_shaext/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x1e50
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_shaext/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x10c0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_shaext/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x280
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_ssse3/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x3520
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_ssse3/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x1bd0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_ssse3/crypto/sha/sha1-x86_64.o/1(*2) at offset 0xe40
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_avx/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x26e0
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_avx/crypto/sha/sha1-x86_64.o/1(*2) at offset 0xd90
BOLT-WARNING: reference in the middle of instruction detected in function sha1_block_data_order_avx2/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x1950
BOLT-WARNING: unable to disassemble instruction at offset 0x53 (address 0x1d6d93) in function K_XX_XX/crypto/sha/sha1-x86_64.o/1(*2)
BOLT-WARNING: reference in the middle of instruction detected in function K_XX_XX/crypto/sha/sha1-x86_64.o/1(*2) at offset 0x40
BOLT-WARNING: reference in the middle of instruction detected in function K_XX_XX/crypto/sha/sha1-x86_64.o/1(*2) at offset 0xa0
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block/1 at offset 0x7e20
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block/1 at offset 0x7600
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block/1 at offset 0x51a0
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block/1 at offset 0x30a0
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block/1 at offset 0x2800
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_shaext/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x5620
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_shaext/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x4e00
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_shaext/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x29a0
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_shaext/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x8a0
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_avx/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x4d80
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_avx/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x4560
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_avx/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x2100
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_avx2/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x2c80
BOLT-WARNING: reference in the middle of instruction detected in function sha256_multi_block_avx2/crypto/sha/sha256-mb-x86_64.o/1(*2) at offset 0x2460
BOLT-WARNING: unable to disassemble instruction at offset 0x15 (address 0x1e5515) in function K512/crypto/sha/sha512-x86_64.o/1(*2)
BOLT-WARNING: function whirlpool_block/1 has an object detected in a padding region at address 0x201fc0
BOLT-WARNING: unable to disassemble instruction at offset 0x32 (address 0x22a122) in function padlock_sha512_blocks/1
BOLT-WARNING: unable to fill CFI for function aesni_set_encrypt_key/1. Skipping.
BOLT-WARNING: unable to fill CFI for function poly1305_blocks_avx/crypto/poly1305/poly1305-x86_64.o/1(*2). Skipping.
BOLT-WARNING: unable to fill CFI for function poly1305_blocks_avx2/crypto/poly1305/poly1305-x86_64.o/1(*2). Skipping.
BOLT-INFO: 0 functions out of 6028 simple functions (0.0%) have non-empty execution profile.
BOLT-INFO: the input contains 366 (dynamic count : 0) missed opportunities for macro-fusion optimization. Use -align-macro-fusion to fix.
BOLT-INFO: removed 206 'repz' prefixes with estimated execution count of 0 times.
BOLT-INFO: UCE removed 3 blocks and 11 bytes of code.
BOLT-INFO: SCTC: patched 85 tail calls (85 forward) tail calls (0 backward) from a total of 85 while removing 1 double jumps and removing 82 basic blocks totalling 410 bytes of code. CTCs total execution count is 0 and the number of times CTCs are taken is 0.
BOLT: 6028 out of 6196 functions were overwritten.
BOLT-INFO: patched build-id (flipped last bit)

After some investigation, it looks like the problem come along with the ASM part of crypto.

Indeed, if I compile the lib with the -no-asm flag, everything is working as expected and these warnings disappears (my binary is BOLTED successfully with relocations).

Error reading BOLT data input file: line 13, column 0: malformed field

Bolt error on gcc 5.5.0 compiled hhvm.

$ perf --version
perf version 4.17.2

$ ../bolt/build/bin/perf2bolt --version
LLVM (http://llvm.org/):
LLVM version 7.0.0svn
DEBUG build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: skylake-avx512

$ ../bolt/build/bin/perf2bolt -p perf.data.gcc -o perf.fdata which hhvm
PERF2BOLT: Starting data aggregation job for perf.data.gcc
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-WARNING: build-id will not be checked because we could not read one from input binary
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x5000000, offset 0x4c00000
BOLT-INFO: enabling relocation mode
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN5folly18BucketedTimeSeriesIlNS_16LegacyStatsClockINSt6chrono8durationIlSt5ratioILl1ELl1EEEEEEE13updateBucketsENS2_10time_pointIS7_S6_EE(*2) from function _ZN4HPHPL12start_serverERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi.constprop.756/program-functions.cpp/1(*2)
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit3x6419assert_tc_saved_ripEPv from function _ZN4HPHP3jit3x6414emitCallToExitERNS_9DataBlockES3_RKNS0_11UniqueStubsE
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit3x6419assert_tc_saved_ripEPv from function _ZN4HPHP3jit3x6414emitCallToExitERNS_9DataBlockES3_RKNS0_11UniqueStubsE
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit11MethodCache20handlePrimeCacheInitILb0EEEvjPNS_6ActRecEPNS_10StringDataEPNS_5ClassES8_m from function _ZN4HPHP3jit11UniqueStubs7emitAllERNS0_9CodeCacheERNS_5Debug9DebugInfoE
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit11MethodCache20handlePrimeCacheInitILb1EEEvjPNS_6ActRecEPNS_10StringDataEPNS_5ClassES8_m from function _ZN4HPHP3jit11UniqueStubs7emitAllERNS0_9CodeCacheERNS_5Debug9DebugInfoE
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit11MethodCache14handleSlowPathILb0EEEvjPNS_6ActRecEPNS_10StringDataEPNS_5ClassES8_m from function _ZN4HPHP3jit11UniqueStubs7emitAllERNS0_9CodeCacheERNS_5Debug9DebugInfoE
BOLT-WARNING: non-standard function reference (e.g. bitmask) detected against function _ZN4HPHP3jit11MethodCache14handleSlowPathILb1EEEvjPNS_6ActRecEPNS_10StringDataEPNS_5ClassES8_m from function _ZN4HPHP3jit11UniqueStubs7emitAllERNS0_9CodeCacheERNS_5Debug9DebugInfoE
BOLT-WARNING: 1 collisions detected while hashing binary objects. Use -v=1 to see the list.
PERF2BOLT: Waiting for perf tasks collection to finish...
PERF2BOLT: Parsing perf-script tasks output
Error reading BOLT data input file: line 13, column 0: malformed field
PERF2BOLT: Failed to parse tasks
PERF2BOLT: Waiting for perf events collection to finish...
PERF2BOLT: Aggregating branch events...
PERF2BOLT: Read 37 samples and 807 LBR entries
PERF2BOLT: Traces mismatching disassembled function contents: 35 (4.5%)
PERF2BOLT: Out of range traces involving unknown regions: 549 (71.3%)
PERF2BOLT: Wrote 132 objects and 0 memory objects to perf.fdata

llvm-bolt error

I am unable to run llvm-bolt on any benchmark or even helloworld. I get the same below error for any executable and even when compiled using different versions of gcc. Am I missing anything here?

I am using gcc 5.4.0 on Ubuntu 16.04.5. My perf version is 4.13.16.

llvm-bolt ./hello -o hello.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats

BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
BOLT-INFO: using __open_nocancel as another entry to function __open64(*5)
BOLT-INFO: using __read_nocancel as another entry to function read(*3)
BOLT-INFO: using __write_nocancel as another entry to function __libc_write(*3)
BOLT-ERROR: function __restore_rt/1 is in conflict with FDE [44f6bf, 44f6c9). Skipping.
BOLT-INFO: using __close_nocancel as another entry to function close(*3)
BOLT-INFO: using __writev_nocancel as another entry to function __writev(*2)
BOLT-ERROR: function _dl_tlsdesc_undefweak is in conflict with FDE [478405, 47841e). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_rela is in conflict with FDE [47841e, 47848f). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_hold is in conflict with FDE [47848f, 478501). Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat44f6bf. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat478405. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat47841e. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat47848f. Skipping.
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function __memcmp_sse4_1

BOLT is unable to proceed because it couldn't properly understand this function.
If you are running the most recent version of BOLT, you may want to report this and paste this dump.
Please check that there is no sensitive contents being shared in this dump.

Offending function: __BOLT_FDE_FUNCat44f6bf

Function contents (
0000: 0048C7C0 0F000000 0F05 |.H........|
)

Binary Function "__BOLT_FDE_FUNCat44f6bf" {
Number : 846
State : disassembled
Address : 0x44f6bf
Size : 0xa
MaxSize : 0xa
Offset : 0x4f6bf
Section : .text
Orc Section : .local.text.__BOLT_FDE_FUNCat44f6bf
LSDA : 0x0
IsSimple : 0
IsSplit : 0
BB Count : 0
}
.LBB0414:
00000000: addb %cl, -0x39(%rax)
00000003: rorb $0x0, (%rdi)
00000006: addb %al, (%rax)
00000008: syscall
DWARF CFI Instructions:

End of Function "__BOLT_FDE_FUNCat44f6bf"

ERROR: function cannot be properly disassembled. Unable to continue in relocation mode.

Other commands and outputs are:

gcc -o hello -O2 hello.c -static -static-libgcc -fno-reorder-blocks-and-partition -Wl,-q

perf record -e cycles:u -j any,u -o perf.data -- ./hello
Hello, World![ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.015 MB perf.data (9 samples) ]

perf2bolt -p perf.data -o perf.fdata hello
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: spawning perf job to read branch events
PERF2BOLT: spawning perf job to read mem events
PERF2BOLT: spawning perf job to read process events
PERF2BOLT: spawning perf job to read task events
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
BOLT-INFO: binary build-id is: a480dcd24bdbb6bdb96f692803f777fce439334b
PERF2BOLT: spawning perf job to read buildid list
PERF2BOLT: matched build-id and file name
BOLT-INFO: using __open_nocancel as another entry to function __open64(*5)
BOLT-INFO: using __read_nocancel as another entry to function read(*3)
BOLT-INFO: using __write_nocancel as another entry to function __libc_write(*3)
BOLT-ERROR: function __restore_rt/1 is in conflict with FDE [44f6bf, 44f6c9). Skipping.
BOLT-INFO: using __close_nocancel as another entry to function close(*3)
BOLT-INFO: using __writev_nocancel as another entry to function __writev(*2)
BOLT-ERROR: function _dl_tlsdesc_undefweak is in conflict with FDE [478405, 47841e). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_rela is in conflict with FDE [47841e, 47848f). Skipping.
BOLT-ERROR: function _dl_tlsdesc_resolve_hold is in conflict with FDE [47848f, 478501). Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat44f6bf. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat478405. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat47841e. Skipping.
BOLT-ERROR: symbol seen in the middle of the function __BOLT_FDE_FUNCat47848f. Skipping.
PERF2BOLT: waiting for perf mmap events collection to finish...
PERF2BOLT: parsing perf-script mmap events output
PERF2BOLT: waiting for perf task events collection to finish...
PERF2BOLT: parsing perf-script task events output
PERF2BOLT: input binary is associated with 1 PID(s)
PERF2BOLT: waiting for perf events collection to finish...
PERF2BOLT: parse branch events...
PERF2BOLT: read 4 samples and 67 LBR entries
PERF2BOLT: 5 samples (55.6%) were ignored
PERF2BOLT-WARNING: less than 50% of all recorded samples were attributed to the input binary
PERF2BOLT: traces mismatching disassembled function contents: 0 (0.0%)
PERF2BOLT: out of range traces involving unknown regions: 4 (6.3%)
PERF2BOLT: processing branch events...
PERF2BOLT: wrote 70 objects and 0 memory objects to perf.fdata

Is BOLT designed to be capable of optimizing static binaries written in languages other than C or C++?

Quoting from the readme:

BOLT disassembles functions and reconstructs the control flow graph (CFG) before it runs optimizations. Since this is a nontrivial task, especially when indirect branches are present, we rely on certain heuristics to accomplish it. These heuristics have been tested on a code generated with Clang and GCC compilers.

From the paper:

one of the main challenges with AutoFDO is to map the profile data, collected at the binary level, back to the compiler’s intermediate representation

  1. How many of these transformation heuristics are likely to be specific to C/C++?

  2. Is the IR that BOLT reconstructs independent of the specific IR format used to compile the code in the first place?

In particular I'm interested in how much work it would take in order for BOLT to optimize libraries written in Rust, which is built atop LLVM, deliberately produces LLVM IR that resembles Clang's, and produces static executables that are intended to be transparently consumed by existing C/C++ debugging tools.

BOLT bug:DSO’s address is changed while analyze relocation and result in app's segment fault

Hello,while I use BOLT to optimize my application,I get a segment fault when I run the new binary. It turn out that an DSO‘s rel address is changed.it happens in func "RewriteInstance::analyzeRelocation"(RewriteInstance.cpp#L1945),When the rel type is R_AARCH64_LD64_GOT_LO12_NC, the SymbolAddress is non-zero, ExtractedValue is zero, Addend is zero and PCRelOffset is zero, according to the code ,it goes to the else part (RewriteInstance.cpp#L1949),the SymbolAddress is non-zero.
I change the code like this if (ExtractedValue || 0 == Addend)(RewriteInstance.cpp#L1947),the SymbolAddress is set to zero and my new generated binary works normally。

Assertion failure

I've build BOLT following the instruction, recorded a perf profile and converted it. Now I'm trying to use it in llvm-bolt llvm-bolt <executable> -o <executable>.bolt -data=perf.fdata and it fails with the following message:

llvm-bolt: /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:323: void llvm::RuntimeDyldELF::resolveX86_64Relocation(const llvm::SectionEntry&, uint64_t, uint64_t, uint32_t, int64_t, uint64_t): Assertion 'isInt<32>(RealOffset)' failed.

#0 0x00000000023c7c86 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/whep/src/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x00000000023c7d19 PrintStackTraceSignalHandler(void*) /home/whep/src/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x00000000023c61be llvm::sys::RunSignalHandlers() /home/whep/src/llvm/lib/Support/Signals.cpp:49:0 #3 0x00000000023c75fb SignalHandler(int) /home/whep/src/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007ffff7bce6d0 __restore_rt (/lib64/libpthread.so.0+0xf6d0) #5 0x00007ffff67bd277 __GI_raise (/lib64/libc.so.6+0x36277) #6 0x00007ffff67be968 __GI_abort (/lib64/libc.so.6+0x37968) #7 0x00007ffff67b6096 __assert_fail_base (/lib64/libc.so.6+0x2f096) #8 0x00007ffff67b6142 (/lib64/libc.so.6+0x2f142) #9 0x00000000030b33c7 llvm::RuntimeDyldELF::resolveX86_64Relocation(llvm::SectionEntry const&, unsigned long, unsigned long, unsigned int, long, unsigned long) /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:324:0 #10 0x00000000030b63e0 llvm::RuntimeDyldELF::resolveRelocation(llvm::SectionEntry const&, unsigned long, unsigned long, unsigned int, long, unsigned long, unsigned int) /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:976:0 #11 0x00000000030b6357 llvm::RuntimeDyldELF::resolveRelocation(llvm::RelocationEntry const&, unsigned long) /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:966:0 #12 0x000000000308f211 llvm::RuntimeDyldImpl::resolveRelocationList(llvm::SmallVector<llvm::RelocationEntry, 64u> const&, unsigned long) /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:1006:0 #13 0x000000000308fa8b llvm::RuntimeDyldImpl::resolveExternalSymbols() /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:1102:0 #14 0x000000000308a387 llvm::RuntimeDyldImpl::resolveRelocations() /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:131:0 #15 0x0000000003090216 llvm::RuntimeDyld::resolveRelocations() /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:1220:0 #16 0x0000000003090337 llvm::RuntimeDyld::finalizeWithMemoryManagerLocking() /home/whep/src/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp:1244:0 #17 0x00000000005f2033 llvm::orc::RTDyldObjectLinkingLayer::ConcreteLinkedObject<std::shared_ptr<llvm::RuntimeDyld::MemoryManager> >::finalize() /home/whep/src/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:150:0 #18 0x00000000005939a9 llvm::orc::RTDyldObjectLinkingLayer::emitAndFinalize(unsigned long) /home/whep/src/llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:350:0 #19 0x000000000057fcd2 llvm::bolt::RewriteInstance::emitFunctions() /home/whep/src/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:2958:0 #20 0x00000000005716af operator() /home/whep/src/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1006:0 #21 0x00000000005716af llvm::bolt::RewriteInstance::run()::'lambda'(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&)::operator()(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&) const (../build_llvm/bin/llvm-bolt+0x5716af) #22 0x00000000005717e2 llvm::bolt::RewriteInstance::run() /home/whep/src/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:1015:0 #23 0x0000000000411bdb main /home/whep/src/llvm/tools/llvm-bolt/src/llvm-bolt.cpp:269:0 #24 0x00007ffff67a9445 __libc_start_main (/lib64/libc.so.6+0x22445) #25 0x0000000000410895 _start (../build_llvm/bin/llvm-bolt+0x410895)

"BOLT is unable to proceed because it couldn't properly understand this function."

BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x1400000, offset 0x1000000
BOLT-INFO: enabling relocation mode
BOLT-INFO: enabling -align-macro-fusion=all since no profile was specified
BOLT-WARNING: internal call detected at 0x59cb8b in function ABC. Skipping.
BOLT-WARNING: internal call detected at 0x59cbf9 in function ABC. Skipping.
BOLT-WARNING: internal call detected at 0x59cc6c in function ABC. Skipping.
BOLT-WARNING: internal call detected at 0x59cce9 in function ABC. Skipping.
...
=======================================
BOLT is unable to proceed because it couldn't properly understand this function.
If you are running the most recent version of BOLT, you may want to report this and paste this dump.
Please check that there is no sensitive contents being shared in this dump.

Offending function: ABC

Function contents (
  0000: 554889E5 41574156 41554154 534881EC  |UH..AWAVAUATSH..|
  0010: 88000000 4989F549 89FF4C8D 6708488B  |....I..I..L.g.H.|
  0020: 4708C700 00000000 0F57C00F 2945900F  |G........W..)E..|
  0030: 2945A048 C7459800 0000104C 8B470848  |)E.H.E.....L.G.H|
  0040: 8B459048 8B4D980F 284DA048 8945B048  |.E.H.M..(M.H.E.H|
  0050: 894DB80F 294DC080 4DBB04E8 09000000  |.M..)M..M.......|
  0060: 48C7C00F 0000000F 05584883 C0004889  |H........XH...H.|
  0070: 45C0BB08 00000048 8D75B0BF 06000000 .
  ...

ERROR: function cannot be properly disassembled. Unable to continue in relocation mode.

"BOLT is unable to proceed because it couldn't properly understand this function."

BOLT-INFO: Target architecture: x86_64
BOLT-INFO: shared object or position-independent executable detected
BOLT-INFO: first alloc address is 0x0
BOLT-INFO: enabling relocation mode
BOLT-INFO: enabling -align-macro-fusion=all since no profile was specified
BOLT-WARNING: sizes differ for function GFp_aes_hw_set_encrypt_key/1. FDE : 901; symbol table : 1102. Using max size.
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function _ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h09b4
766b8554dd86E/1
BOLT-WARNING: unable to disassemble instruction at offset 0x15 (address 0xc5295) in function K512/sha512-x86_64-elf.o/1(*2)
BOLT-WARNING: unable to disassemble instruction at offset 0x1 (address 0xc7b81) in function K256/sha256-x86_64-elf.o/1(*2)
=======================================
BOLT is unable to proceed because it couldn't properly understand this function.
If you are running the most recent version of BOLT, you may want to report this and paste this dump.
Please check that there is no sensitive contents being shared in this dump.

Offending function: GFp_aes_hw_set_encrypt_key/1

Function contents (
  0000: 4883EC08 48C7C0FF FFFFFF48 85FF0F84  |H...H......H....|
  0010: 53030000 4885D20F 844A0300 000F1007  |S...H....J......|
  0020: 0F57E44C 8D155613 3500458B 52044181  |.W.L..V.5.E.R.A.|
  0030: E2000800 10488D42 1081FE00 0100000F  |.....H.B........|
  0040: 849B0100 0081FE80 0000000F 850F0300  |................|
  0050: 00BE0900 00004181 FA000000 100F848D  |......A.........|
  0060: 0000000F 1102660F 3ADFC801 E8260300  |......f.:....&..|
  0070: 00660F3A DFC802E8 14030000 660F3ADF  |.f.:........f.:.|
  0080: C804E809 03000066 0F3ADFC8 08E8FE02  |.......f.:......|
  0090: 0000660F 3ADFC810 E8F30200 00660F3A  |..f.:........f.:|
  00A0: DFC820E8 E8020000 660F3ADF C840E8DD  |.. .....f.:..@..|
  00B0: 02000066 0F3ADFC8 80E8D202 0000660F  |...f.:........f.|
  00C0: 3ADFC81B E8C70200 00660F3A DFC836E8  |:........f.:..6.|
  00D0: BC020000 0F110089 705031C0 E9860200  |........pP1.....|
  00E0: 000F1F44 0000662E 0F1F8400 00000000  |...D..f.........|
  00F0: 660F6F2D 78960E00 41BA0800 0000660F  |f.o-x...A.....f.|
  0100: 6F258A96 0E00660F 6FD0F30F 7F02EB00  |o%....f.o.......|
  0110: 660F3800 C5660F38 DDC4660F 72F40148  |f.8..f.8..f.r..H|
  0120: 8D401066 0F6FDA66 0F73FA04 660FEFDA  |[email protected]...|
  0130: 660F73FA 04660FEF DA660F73 FA04660F  |f.s..f...f.s..f.|
  0140: EFD3660F EFC2F30F 7F40F066 0F6FD041  |[email protected]|
  0150: FFCA75BC 660F6F25 44960E00 660F3800  |..u.f.o%D...f.8.|
  0160: C5660F38 DDC4660F 72F40166 0F6FDA66  |.f.8..f.r..f.o.f|
  0170: 0F73FA04 660FEFDA 660F73FA 04660FEF  |.s..f...f.s..f..|
  0180: DA660F73 FA04660F EFD3660F EFC2F30F  |.f.s..f...f.....|
  0190: 7F00660F 6FD0660F 3800C566 0F38DDC4  |..f.o.f.8..f.8..|
  01A0: 660F6FDA 660F73FA 04660FEF DA660F73  |f.o.f.s..f...f.s|
  01B0: FA04660F EFDA660F 73FA0466 0FEFD366  |..f...f.s..f...f|
  01C0: 0FEFC2F3 0F7F4010 89706031 C0E99501  |[email protected]`1....|
  01D0: 00000F1F 4000662E 0F1F8400 00000000  |[email protected].........|
  01E0: 0F105710 BE0D0000 00488D40 104181FA  |[email protected]..|
  01F0: 00000010 0F84A600 00000F11 020F1152  |...............R|
  0200: 10660F3A DFCA01E8 0B020000 660F3ADF  |.f.:........f.:.|
  0210: C801E819 02000066 0F3ADFCA 02E8EE01  |.......f.:......|
  0220: 0000660F 3ADFC802 E8030200 00660F3A  |..f.:........f.:|
  0230: DFCA04E8 D8010000 660F3ADF C804E8ED  |........f.:.....|
  0240: 01000066 0F3ADFCA 08E8C201 0000660F  |...f.:........f.|
  0250: 3ADFC808 E8D70100 00660F3A DFCA10E8  |:........f.:....|
  0260: AC010000 660F3ADF C810E8C1 01000066  |....f.:........f|
  0270: 0F3ADFCA 20E89601 0000660F 3ADFC820  |.:.. .....f.:.. |
  0280: E8AB0100 00660F3A DFCA40E8 80010000  |.....f.:..@.....|
  0290: 0F110089 70104831 C0E9C900 00006690  |....p.H1......f.|
  02A0: 660F6F2D C8940E00 660F6F25 E0940E00  |f.o-....f.o%....|
  02B0: 41BA0700 0000F30F 7F02660F 6FCAF30F  |A.........f.o...|
  02C0: 7F5210EB 0B90662E 0F1F8400 00000000  |.R....f.........|
  02D0: 660F3800 D5660F38 DDD4660F 6FD8660F  |f.8..f.8..f.o.f.|
  02E0: 73F80466 0FEFD866 0F73F804 660FEFD8  |s..f...f.s..f...|
  02F0: 660F73F8 04660FEF C3660F72 F401660F  |f.s..f...f.r..f.|
  0300: EFC2F30F 7F0041FF CA744066 0F70D0FF  |[email protected]..|
  0310: 660FEFDB 660F38DD D3660F6F D9660F73  |f...f.8..f.o.f.s|
  0320: F904660F EFD9660F 73F90466 0FEFD966  |..f...f.s..f...f|
  0330: 0F73F904 660FEFCB 660FEFD1 F30F7F50  |.s..f...f......P|
  0340: 10488D40 20660F6F CAEB8589 701031C0  |.H.@ f.o....p.1.|
  0350: EB150F1F 4000662E 0F1F8400 00000000  |[email protected].........|
  0360: 48C7C0FE FFFFFF66 0FEFC066 0FEFC966  |H......f...f...f|
  0370: 0FEFD266 0FEFDB66 0FEFE466 0FEFED48  |...f...f...f...H|
  0380: 83C408F3 C390662E 0F1F8400 00000000  |......f.........|
  0390: 0F110048 8D40100F C6E0100F 57C40FC6  |[email protected]...|
  03A0: E08C0F57 C40FC6C9 FF0F57C1 F3C36690  |...W......W...f.|
  03B0: 0F110048 8D40100F 28EA0FC6 E010660F  |...H.@..(.....f.|
  03C0: 6FDA0F57 C40FC6E0 8C660F73 FB040F57  |o..W.....f.s...W|
  03D0: C4660F70 C955660F EFD3660F EFC1660F  |.f.p.Uf...f...f.|
  03E0: 70D8FF66 0FEFD3F3 C30F1F80 00000000  |p..f............|
  03F0: 0F28D80F C6E8440F 11280FC6 DA4E0F11  |.(....D..(...N..|
  0400: 5810488D 4020EBB2 0F1F8400 00000000  |X.H.@ ..........|
  0410: 0F111048 8D40100F C6E0100F 57C40FC6  |[email protected]...|
  0420: E08C0F57 C40FC6C9 FF0F57C1 F3C36690  |...W......W...f.|
  0430: 0F110048 8D40100F C6E2100F 57D40FC6  |[email protected]...|
  0440: E28C0F57 D40FC6C9 AA0F57D1 F3C3      |...W......W...|
)

Binary Function "GFp_aes_hw_set_encrypt_key/1"  {
  Number      : 2358
  State       : disassembled
  Address     : 0xb86d0
  Size        : 0x44e
  MaxSize     : 0x450
  Offset      : 0xb86d0
  Section     : .text
  Orc Section : .local.text.GFp_aes_hw_set_encrypt_key/1
  LSDA        : 0x0
  IsSimple    : 1
  IsSplit     : 0
  BB Count    : 0
}
.LBB02356:
    00000000:   subq    $0x8, %rsp
    00000004:   movq    $-0x1, %rax
    0000000b:   testq   %rdi, %rdi
    0000000e:   je      .Ltmp10037 # Offset: 14
    00000014:   testq   %rdx, %rdx
    00000017:   je      .Ltmp10037 # Offset: 23
    0000001d:   movups  (%rdi), %xmm0
    00000020:   xorps   %xmm4, %xmm4
    00000023:   leaq    "GFp_ia32cap_P/1"(%rip), %r10
    0000002a:   movl    0x4(%r10), %r10d
    0000002e:   andl    $0x10000800, %r10d
    00000035:   leaq    0x10(%rdx), %rax
    00000039:   cmpl    $0x100, %esi
    0000003f:   je      .Ltmp10038 # Offset: 63
    00000045:   cmpl    $0x80, %esi
    0000004b:   jne     .Ltmp10039 # Offset: 75
    00000051:   movl    $0x9, %esi
    00000056:   cmpl    $0x10000000, %r10d
    0000005d:   je      .Ltmp10040 # Offset: 93
    00000063:   movups  %xmm0, (%rdx)
    00000066:   aeskeygenassist $0x1, %xmm0, %xmm1
    0000006c:   callq   .Ltmp10041 # Offset: 108
    00000071:   aeskeygenassist $0x2, %xmm0, %xmm1
    00000077:   callq   .Ltmp10042 # Offset: 119
    0000007c:   aeskeygenassist $0x4, %xmm0, %xmm1
    00000082:   callq   .Ltmp10042 # Offset: 130
    00000087:   aeskeygenassist $0x8, %xmm0, %xmm1
    0000008d:   callq   .Ltmp10042 # Offset: 141
    00000092:   aeskeygenassist $0x10, %xmm0, %xmm1
    00000098:   callq   .Ltmp10042 # Offset: 152
    0000009d:   aeskeygenassist $0x20, %xmm0, %xmm1
    000000a3:   callq   .Ltmp10042 # Offset: 163
    000000a8:   aeskeygenassist $0x40, %xmm0, %xmm1
    000000ae:   callq   .Ltmp10042 # Offset: 174
    000000b3:   aeskeygenassist $0x80, %xmm0, %xmm1
    000000b9:   callq   .Ltmp10042 # Offset: 185
    000000be:   aeskeygenassist $0x1b, %xmm0, %xmm1
    000000c4:   callq   .Ltmp10042 # Offset: 196
    000000c9:   aeskeygenassist $0x36, %xmm0, %xmm1
    000000cf:   callq   .Ltmp10042 # Offset: 207
    000000d4:   movups  %xmm0, (%rax)
    000000d7:   movl    %esi, 0x50(%rax)
    000000da:   xorl    %eax, %eax
    000000dc:   jmp     .Ltmp10037 # Offset: 220
    000000e1:   nopl    (%rax,%rax)
    000000e6:   nopw    %cs:(%rax,%rax)
.Ltmp10040:
    000000f0:   movdqa  DATAat0x1a1e40(%rip), %xmm5
    000000f8:   movl    $0x8, %r10d
    000000fe:   movdqa  DATAat0x1a1e60(%rip), %xmm4
    00000106:   movdqa  %xmm0, %xmm2
    0000010a:   movdqu  %xmm0, (%rdx)
    0000010e:   jmp     .Ltmp10043 # Offset: 270
.Ltmp10043:
    00000110:   pshufb  %xmm5, %xmm0
    00000115:   aesenclast      %xmm4, %xmm0
    0000011a:   pslld   $0x1, %xmm4
    0000011f:   leaq    0x10(%rax), %rax
    00000123:   movdqa  %xmm2, %xmm3
    00000127:   pslldq  $0x4, %xmm2
    0000012c:   pxor    %xmm2, %xmm3
    00000130:   pslldq  $0x4, %xmm2
    00000135:   pxor    %xmm2, %xmm3
    00000139:   pslldq  $0x4, %xmm2
    0000013e:   pxor    %xmm3, %xmm2
    00000142:   pxor    %xmm2, %xmm0
    00000146:   movdqu  %xmm0, -0x10(%rax)
    0000014b:   movdqa  %xmm0, %xmm2
    0000014f:   decl    %r10d
    00000152:   jne     .Ltmp10043 # Offset: 338
    00000154:   movdqa  DATAat0x1a1e70(%rip), %xmm4
    0000015c:   pshufb  %xmm5, %xmm0
    00000161:   aesenclast      %xmm4, %xmm0
    00000166:   pslld   $0x1, %xmm4
    0000016b:   movdqa  %xmm2, %xmm3
    0000016f:   pslldq  $0x4, %xmm2
    00000174:   pxor    %xmm2, %xmm3
    00000178:   pslldq  $0x4, %xmm2
    0000017d:   pxor    %xmm2, %xmm3
    00000181:   pslldq  $0x4, %xmm2
    00000186:   pxor    %xmm3, %xmm2
    0000018a:   pxor    %xmm2, %xmm0
    0000018e:   movdqu  %xmm0, (%rax)
    00000192:   movdqa  %xmm0, %xmm2
    00000196:   pshufb  %xmm5, %xmm0
    0000019b:   aesenclast      %xmm4, %xmm0
    000001a0:   movdqa  %xmm2, %xmm3
    000001a4:   pslldq  $0x4, %xmm2
    000001a9:   pxor    %xmm2, %xmm3
    000001ad:   pslldq  $0x4, %xmm2
    000001b2:   pxor    %xmm2, %xmm3
    000001b6:   pslldq  $0x4, %xmm2
    000001bb:   pxor    %xmm3, %xmm2
    000001bf:   pxor    %xmm2, %xmm0
    000001c3:   movdqu  %xmm0, 0x10(%rax)
    000001c8:   movl    %esi, 0x60(%rax)
    000001cb:   xorl    %eax, %eax
    000001cd:   jmp     .Ltmp10037 # Offset: 461
    000001d2:   nopl    (%rax)
    000001d6:   nopw    %cs:(%rax,%rax)
.Ltmp10038:
    000001e0:   movups  0x10(%rdi), %xmm2
    000001e4:   movl    $0xd, %esi
    000001e9:   leaq    0x10(%rax), %rax
    000001ed:   cmpl    $0x10000000, %r10d
    000001f4:   je      .Ltmp10044 # Offset: 500
    000001fa:   movups  %xmm0, (%rdx)
    000001fd:   movups  %xmm2, 0x10(%rdx)
    00000201:   aeskeygenassist $0x1, %xmm2, %xmm1
    00000207:   callq   .Ltmp10045 # Offset: 519
    0000020c:   aeskeygenassist $0x1, %xmm0, %xmm1
    00000212:   callq   .Ltmp10046 # Offset: 530
    00000217:   aeskeygenassist $0x2, %xmm2, %xmm1
    0000021d:   callq   .Ltmp10047 # Offset: 541
    00000222:   aeskeygenassist $0x2, %xmm0, %xmm1
    00000228:   callq   .Ltmp10046 # Offset: 552
    0000022d:   aeskeygenassist $0x4, %xmm2, %xmm1
    00000233:   callq   .Ltmp10047 # Offset: 563
    00000238:   aeskeygenassist $0x4, %xmm0, %xmm1
    0000023e:   callq   .Ltmp10046 # Offset: 574
    00000243:   aeskeygenassist $0x8, %xmm2, %xmm1
    00000249:   callq   .Ltmp10047 # Offset: 585
    0000024e:   aeskeygenassist $0x8, %xmm0, %xmm1
    00000254:   callq   .Ltmp10046 # Offset: 596
    00000259:   aeskeygenassist $0x10, %xmm2, %xmm1
    0000025f:   callq   .Ltmp10047 # Offset: 607
    00000264:   aeskeygenassist $0x10, %xmm0, %xmm1
    0000026a:   callq   .Ltmp10046 # Offset: 618
    0000026f:   aeskeygenassist $0x20, %xmm2, %xmm1
    00000275:   callq   .Ltmp10047 # Offset: 629
    0000027a:   aeskeygenassist $0x20, %xmm0, %xmm1
    00000280:   callq   .Ltmp10046 # Offset: 640
    00000285:   aeskeygenassist $0x40, %xmm2, %xmm1
    0000028b:   callq   .Ltmp10047 # Offset: 651
    00000290:   movups  %xmm0, (%rax)
    00000293:   movl    %esi, 0x10(%rax)
    00000296:   xorq    %rax, %rax
    00000299:   jmp     .Ltmp10037 # Offset: 665
    0000029e:   nop
.Ltmp10044:
    000002a0:   movdqa  DATAat0x1a1e40(%rip), %xmm5
    000002a8:   movdqa  DATAat0x1a1e60(%rip), %xmm4
    000002b0:   movl    $0x7, %r10d
    000002b6:   movdqu  %xmm0, (%rdx)
    000002ba:   movdqa  %xmm2, %xmm1
    000002be:   movdqu  %xmm2, 0x10(%rdx)
    000002c3:   jmp     .Ltmp10048 # Offset: 707
    000002c5:   nop
    000002c6:   nopw    %cs:(%rax,%rax)
.Ltmp10048:
    000002d0:   pshufb  %xmm5, %xmm2
    000002d5:   aesenclast      %xmm4, %xmm2
    000002da:   movdqa  %xmm0, %xmm3
    000002de:   pslldq  $0x4, %xmm0
    000002e3:   pxor    %xmm0, %xmm3
    000002e7:   pslldq  $0x4, %xmm0
    000002ec:   pxor    %xmm0, %xmm3
    000002f0:   pslldq  $0x4, %xmm0
    000002f5:   pxor    %xmm3, %xmm0
    000002f9:   pslld   $0x1, %xmm4
    000002fe:   pxor    %xmm2, %xmm0
    00000302:   movdqu  %xmm0, (%rax)
    00000306:   decl    %r10d
    00000309:   je      .Ltmp10049 # Offset: 777
    0000030b:   pshufd  $0xff, %xmm0, %xmm2
    00000310:   pxor    %xmm3, %xmm3
    00000314:   aesenclast      %xmm3, %xmm2
    00000319:   movdqa  %xmm1, %xmm3
    0000031d:   pslldq  $0x4, %xmm1
    00000322:   pxor    %xmm1, %xmm3
    00000326:   pslldq  $0x4, %xmm1
    0000032b:   pxor    %xmm1, %xmm3
    0000032f:   pslldq  $0x4, %xmm1
    00000334:   pxor    %xmm3, %xmm1
    00000338:   pxor    %xmm1, %xmm2
    0000033c:   movdqu  %xmm2, 0x10(%rax)
    00000341:   leaq    0x20(%rax), %rax
    00000345:   movdqa  %xmm2, %xmm1
    00000349:   jmp     .Ltmp10048 # Offset: 841
.Ltmp10049:
    0000034b:   movl    %esi, 0x10(%rax)
    0000034e:   xorl    %eax, %eax
    00000350:   jmp     .Ltmp10037 # Offset: 848
    00000352:   nopl    (%rax)
    00000356:   nopw    %cs:(%rax,%rax)
.Ltmp10039:
    00000360:   movq    $-0x2, %rax
.Ltmp10037:
    00000367:   pxor    %xmm0, %xmm0
    0000036b:   pxor    %xmm1, %xmm1
    0000036f:   pxor    %xmm2, %xmm2
    00000373:   pxor    %xmm3, %xmm3
    00000377:   pxor    %xmm4, %xmm4
    0000037b:   pxor    %xmm5, %xmm5
    0000037f:   addq    $0x8, %rsp
    00000383:   rep             retq # Offset: 899
    00000385:   nop
    00000386:   nopw    %cs:(%rax,%rax)
.Ltmp10042:
    00000390:   movups  %xmm0, (%rax)
    00000393:   leaq    0x10(%rax), %rax
.Ltmp10041:
    00000397:   shufps  $0x10, %xmm0, %xmm4
    0000039b:   xorps   %xmm4, %xmm0
    0000039e:   shufps  $0x8c, %xmm0, %xmm4
    000003a2:   xorps   %xmm4, %xmm0
    000003a5:   shufps  $0xff, %xmm1, %xmm1
    000003a9:   xorps   %xmm1, %xmm0
    000003ac:   rep             retq # Offset: 940
    000003ae:   nop
    000003b0:   movups  %xmm0, (%rax)
    000003b3:   leaq    0x10(%rax), %rax
    000003b7:   movaps  %xmm2, %xmm5
.Ltmp10050:
    000003ba:   shufps  $0x10, %xmm0, %xmm4
    000003be:   movdqa  %xmm2, %xmm3
    000003c2:   xorps   %xmm4, %xmm0
    000003c5:   shufps  $0x8c, %xmm0, %xmm4
    000003c9:   pslldq  $0x4, %xmm3
    000003ce:   xorps   %xmm4, %xmm0
    000003d1:   pshufd  $0x55, %xmm1, %xmm1
    000003d6:   pxor    %xmm3, %xmm2
    000003da:   pxor    %xmm1, %xmm0
    000003de:   pshufd  $0xff, %xmm0, %xmm3
    000003e3:   pxor    %xmm3, %xmm2
    000003e7:   rep             retq # Offset: 999
    000003e9:   nopl    (%rax)
    000003f0:   movaps  %xmm0, %xmm3
    000003f3:   shufps  $0x44, %xmm0, %xmm5
    000003f7:   movups  %xmm5, (%rax)
    000003fa:   shufps  $0x4e, %xmm2, %xmm3
    000003fe:   movups  %xmm3, 0x10(%rax)
    00000402:   leaq    0x20(%rax), %rax
    00000406:   jmp     .Ltmp10050 # Offset: 1030
    00000408:   nopl    (%rax,%rax)
.Ltmp10047:
    00000410:   movups  %xmm2, (%rax)
    00000413:   leaq    0x10(%rax), %rax
.Ltmp10045:
    00000417:   shufps  $0x10, %xmm0, %xmm4
    0000041b:   xorps   %xmm4, %xmm0
    0000041e:   shufps  $0x8c, %xmm0, %xmm4
    00000422:   xorps   %xmm4, %xmm0
    00000425:   shufps  $0xff, %xmm1, %xmm1
    00000429:   xorps   %xmm1, %xmm0
    0000042c:   rep             retq # Offset: 1068
    0000042e:   nop
.Ltmp10046:
    00000430:   movups  %xmm0, (%rax)
    00000433:   leaq    0x10(%rax), %rax
    00000437:   shufps  $0x10, %xmm2, %xmm4
    0000043b:   xorps   %xmm4, %xmm2
    0000043e:   shufps  $0x8c, %xmm2, %xmm4
    00000442:   xorps   %xmm4, %xmm2
    00000445:   shufps  $0xaa, %xmm1, %xmm1
    00000449:   xorps   %xmm1, %xmm2
    0000044c:   rep             retq # Offset: 1100
DWARF CFI Instructions:
    <empty>
End of Function "GFp_aes_hw_set_encrypt_key/1"

ERROR: unable to fill CFI.
=======================================```

LLVM ERROR: Undefined temporary symbol

A binary compiled on Intel Compiler with -ffreestanding to get rid of __intel memcpy replacement.

build/bin/llvm-bolt ./prog -o prog.bolt -data=./perf.fdata -report-stale -reorder-blocks=cache+ -reorder-functions=hfsort+ -split-functions=3 -split-all-cold -split-eh -dyno-stats

BOLT-INFO: Target architecture: x86_64
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x800000, offset 0x400000
BOLT-INFO: enabling relocation mode
BOLT-INFO: forcing -jump-tables=move as PIC jump table was detected in function _ZL28read_encoded_value_with_basehmPKhPm/eh_personality.o/1(*2)
BOLT-INFO: Functions with stale profile:
(...)
BOLT-INFO: 41 functions out of 2700 simple functions (1.5%) have non-empty execution profile.
BOLT-INFO: 15 non-simple function(s) have profile.
BOLT-INFO: 7 (17.1% of all profiled) functions have invalid (possibly stale) profile. Use -report-stale to see the list.
BOLT-INFO: profile for 1 objects was ignored
BOLT-WARNING: 72 functions will trap on entry (use -v=1 to see the list).
BOLT-INFO: the input contains 148 (dynamic count : 393) missed opportunities for macro-fusion optimization. Will fix instances on a hot path.
BOLT-INFO: removed 77 'repz' prefixes with estimated execution count of 0 times.
BOLT-INFO: basic block reordering modified layout of 16 (0.55%) functions
BOLT-INFO: UCE removed 0 blocks and 0 bytes of code.
BOLT-INFO: running hfsort+ for 41 functions
BOLT-INFO: program-wide dynostats after all optimizations before SCTC and FOP:

            51231450 : executed forward branches
            20845197 : taken forward branches
           321857469 : executed backward branches
           285240617 : taken backward branches
            16320904 : executed unconditional branches
               68038 : all function calls
               17180 : indirect calls
               13934 : PLT calls
          9582799018 : executed instructions
          3083100318 : executed load instructions
          1919618209 : executed store instructions
                 148 : taken jump table branches
           389409823 : total branches
           322406718 : taken branches
            67003105 : non-taken conditional branches
           306085814 : taken conditional branches
           373088919 : all conditional branches

            37180730 : executed forward branches (-27.4%)
                   0 : taken forward branches (-100.0%)
           335908189 : executed backward branches (+4.4%)
           299291394 : taken backward branches (+4.9%)
                 194 : executed unconditional branches (-100.0%)
               68038 : all function calls (=)
               17180 : indirect calls (=)
               13934 : PLT calls (=)
          9566476249 : executed instructions (-0.2%)
          3083100318 : executed load instructions (=)
          1919618209 : executed store instructions (=)
                 148 : taken jump table branches (=)
           373089113 : total branches (-4.2%)
           299291588 : taken branches (-7.2%)
            73797525 : non-taken conditional branches (+10.1%)
           299291394 : taken conditional branches (-2.2%)
           373088919 : all conditional branches (=)

BOLT-INFO: SCTC: patched 37 tail calls (37 forward) tail calls (0 backward) from a total of 37 while removing 0 double jumps and removing 35 basic blocks totalling 175 bytes of code. CTCs total execution count is 114 and the number of times CTCs are taken is 98.
LLVM ERROR: Undefined temporary symbol

PIC/PIE/Shared objects support.

What is the status of PIC/PIE support? Is it going to be supported at some point or there are no plans?

My use case is that some of my performance critical code are implemented as native C code in otherwise java application via JNI.

Do you foresee for it to be feasible to optimise layout of shared objects?

Dubious section file offset increases?

Tried a simple binary, noticed in the transformed binary, section [24]->[25], file offset increases by 4M, thus greatly increases the transformed binary size.

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .interp           PROGBITS        0000000000400238 000238 00001c 00   A  0   0  1
  [ 2] .note.ABI-tag     NOTE            0000000000400254 000254 000020 00   A  0   0  4
  [ 3] .hash             HASH            0000000000400278 000278 000024 04   A  5   0  8
  [ 4] .gnu.hash         GNU_HASH        00000000004002a0 0002a0 00001c 00   A  5   0  8
  [ 5] .dynsym           DYNSYM          00000000004002c0 0002c0 000060 18   A  6   1  8
  [ 6] .dynstr           STRTAB          0000000000400320 000320 00003f 00   A  0   0  1
  [ 7] .gnu.version      VERSYM          0000000000400360 000360 000008 02   A  5   0  2
  [ 8] .gnu.version_r    VERNEED         0000000000400368 000368 000020 00   A  6   1  8
  [ 9] .rela.dyn         RELA            0000000000400388 000388 000030 18   A  5   0  8
  [10] .rela.plt         RELA            00000000004003b8 0003b8 000018 18  AI  5  22  8
  [11] .init             PROGBITS        00000000004003d0 0003d0 000017 00  AX  0   0  4
  [12] .plt              PROGBITS        00000000004003f0 0003f0 000020 10  AX  0   0 16
  [13] .bolt.org.text    PROGBITS        0000000000400410 000410 000202 00  AX  0   0 16
  [14] .fini             PROGBITS        0000000000400614 000614 000009 00  AX  0   0  4
  [15] .rodata           PROGBITS        0000000000400620 000620 000008 00   A  0   0  4
  [16] .bolt.org.eh_frame_hdr PROGBITS        0000000000400628 000628 00003c 00   A  0   0  4
  [17] .bolt.org.eh_frame PROGBITS        0000000000400668 000668 000110 00   A  0   0  8
  [18] .init_array       INIT_ARRAY      0000000000600e00 000e00 000008 08  WA  0   0  8
  [19] .fini_array       FINI_ARRAY      0000000000600e08 000e08 000008 08  WA  0   0  8
  [20] .dynamic          DYNAMIC         0000000000600e10 000e10 0001e0 10  WA  6   0  8
  [21] .got              PROGBITS        0000000000600ff0 000ff0 000010 08  WA  0   0  8
  [22] .got.plt          PROGBITS        0000000000601000 001000 000020 08  WA  0   0  8
  [23] .data             PROGBITS        0000000000601020 001020 000010 00  WA  0   0  8
  [24] .tm_clone_table   PROGBITS        0000000000601030 001030 000000 00  WA  0   0  8
  [25] .bss              NOBITS          0000000000601030 4002c0 000008 00  WA  0   0  1
  [26] .text             PROGBITS        0000000000a00000 600000 00020b 00  AX  0   0 64
  [27] .eh_frame         PROGBITS        0000000000bfff50 7fff50 0001e0 00   A  0   0  8
  [28] .eh_frame_hdr     PROGBITS        0000000000c00130 800130 00003c 00   A  0   0  1
  [29] .comment          PROGBITS        0000000000000000 80016c 0000c1 01  MS  0   0  1
  [30] .symtab           SYMTAB          0000000000000000 800230 000600 18     31  45  8
  [31] .strtab           STRTAB          0000000000000000 800830 0001f9 00      0   0  1
  [32] .shstrtab         STRTAB          0000000000000000 800a29 000199 00      0   0  1
  [33] .note.bolt_info   NOTE            0000000000000000 800bc2 00009c 00      0   0  1

BOLT crashes on HHVM (3.28.0-dev) and PHP (7.*) compiled with GCC 8.1.1

$ bin/perf2bolt -p perf.data -o perf.fdata hhvm
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is: 0065b8a9bc97be3aef481fa91e906921710ad80c
PERF2BOLT-WARNING: build-id matched a different file name. Using "hhvm-3.28.0-dev" for profile parsing.
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x4e00000, offset 0x4a00000
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
perf2bolt: /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:870: llvm::bolt::IndirectBranchType llvm::bolt::BinaryFunction::processIndirectBranch(llvm::MCInst&, unsigned int, uint64_t): Assertion `JTOffsetCandidates.size() > 2 && "expected more than 2 jump table entries"' failed.
#0 0x00000000023ad32c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:398:22
#1 0x00000000023ad3bf PrintStackTraceSignalHandler(void*) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:462:1
#2 0x00000000023ab85e llvm::sys::RunSignalHandlers() /home/dmitry/BOLT/llvm/lib/Support/Signals.cpp:49:19
#3 0x00000000023acca3 SignalHandler(int) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:252:1
#4 0x00007f3de490afc0 __restore_rt (/lib64/libpthread.so.0+0x11fc0)
#5 0x00007f3de33e2f2b __GI_raise (/lib64/libc.so.6+0x36f2b)
#6 0x00007f3de33cd561 __GI_abort (/lib64/libc.so.6+0x21561)
#7 0x00007f3de33cd431 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21431)
#8 0x00007f3de33db692 (/lib64/libc.so.6+0x2f692)
#9 0x000000000045431b llvm::bolt::BinaryFunction::processIndirectBranch(llvm::MCInst&, unsigned int, unsigned long) /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:869:5
#10 0x0000000000456aee llvm::bolt::BinaryFunction::disassemble(llvm::ArrayRef) /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:1318:46
#11 0x000000000056fbb1 llvm::bolt::RewriteInstance::disassembleFunctions() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:2471:27
#12 0x0000000000564a80 operator() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:960:21
#13 0x0000000000564a80 llvm::bolt::RewriteInstance::run()::'lambda'(std::set<unsigned long, std::less, std::allocator > const&)::operator()(std::set<unsigned long, std::less, std::allocator > const&) const (bin/perf2bolt+0x564a80)
#14 0x0000000000564ddf llvm::bolt::RewriteInstance::run() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:996:21
#15 0x0000000000412306 main /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/llvm-bolt.cpp:269:61

$ bin/perf2bolt -p perf.data -o perf.fdata php-cgi
PERF2BOLT: Starting data aggregation job for perf.data
PERF2BOLT: Spawning perf-script job to read branch events
PERF2BOLT: Spawning perf-script job to read mem events
PERF2BOLT: Spawning perf-script job to read tasks
BOLT-INFO: Target architecture: x86_64
BOLT-INFO: binary build-id is: 39c6dd4f405658de3fb0528edce84c9ae753ebf7
PERF2BOLT: matched build-id and file name
BOLT-INFO: first alloc address is 0x400000
BOLT-INFO: creating new program header table at address 0x1600000, offset 0x1200000
BOLT-INFO: disabling -align-macro-fusion in non-relocation mode
perf2bolt: /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/Target/X86/X86MCPlusBuilder.cpp:1035: virtual bool {anonymous}::X86MCPlusBuilder::evaluateX86MemoryOperand(const llvm::MCInst&, unsigned int*, int64_t*, unsigned int*, int64_t*, unsigned int*, const llvm::MCExpr**) const: Assertion `DispImm && "DispImm needs to be set"' failed.
#0 0x00000000023ad32c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:398:22
#1 0x00000000023ad3bf PrintStackTraceSignalHandler(void*) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:462:1
#2 0x00000000023ab85e llvm::sys::RunSignalHandlers() /home/dmitry/BOLT/llvm/lib/Support/Signals.cpp:49:19
#3 0x00000000023acca3 SignalHandler(int) /home/dmitry/BOLT/llvm/lib/Support/Unix/Signals.inc:252:1
#4 0x00007fc936dc1fc0 __restore_rt (/lib64/libpthread.so.0+0x11fc0)
#5 0x00007fc935899f2b __GI_raise (/lib64/libc.so.6+0x36f2b)
#6 0x00007fc935884561 __GI_abort (/lib64/libc.so.6+0x21561)
#7 0x00007fc935884431 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21431)
#8 0x00007fc935892692 (/lib64/libc.so.6+0x2f692)
#9 0x00000000019f17a1 (anonymous namespace)::X86MCPlusBuilder::evaluateX86MemoryOperand(llvm::MCInst const&, unsigned int*, long*, unsigned int*, long*, unsigned int*, llvm::MCExpr const**) const /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/Target/X86/X86MCPlusBuilder.cpp:1036:29
#10 0x00000000019fb4b0 std::pair<llvm::bolt::IndirectBranchType, llvm::MCInst*> (anonymous namespace)::X86MCPlusBuilder::analyzePICJumpTable<std::reverse_iteratorllvm::bolt::MCPlusBuilder::InstructionIterator >(std::reverse_iteratorllvm::bolt::MCPlusBuilder::InstructionIterator, std::reverse_iteratorllvm::bolt::MCPlusBuilder::InstructionIterator, unsigned short, unsigned short) const /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/Target/X86/X86MCPlusBuilder.cpp:2313:13
#11 0x00000000019f79b8 (anonymous namespace)::X86MCPlusBuilder::analyzeIndirectBranch(llvm::MCInst&, llvm::bolt::MCPlusBuilder::InstructionIterator, llvm::bolt::MCPlusBuilder::InstructionIterator, unsigned int, llvm::MCInst*&, unsigned int&, unsigned int&, long&, llvm::MCExpr const*&, llvm::MCInst*&) const /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/Target/X86/X86MCPlusBuilder.cpp:2406:79
#12 0x000000000045344b llvm::bolt::BinaryFunction::processIndirectBranch(llvm::MCInst&, unsigned int, unsigned long) /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:695:44
#13 0x0000000000456aee llvm::bolt::BinaryFunction::disassemble(llvm::ArrayRef) /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/BinaryFunction.cpp:1318:46
#14 0x000000000056fbb1 llvm::bolt::RewriteInstance::disassembleFunctions() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:2471:27
#15 0x0000000000564a80 operator() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:960:21
#16 0x0000000000564a80 llvm::bolt::RewriteInstance::run()::'lambda'(std::set<unsigned long, std::less, std::allocator > const&)::operator()(std::set<unsigned long, std::less, std::allocator > const&) const (bin/perf2bolt+0x564a80)
#17 0x0000000000564ddf llvm::bolt::RewriteInstance::run() /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/RewriteInstance.cpp:996:21
#18 0x0000000000412306 main /home/dmitry/BOLT/llvm/tools/llvm-bolt/src/llvm-bolt.cpp:269:61

HHVM and PHP were built using GCC 8.1.1 on Linux 4.16.15, CPU: i5-2520M

cmake error on Arch Linux

Hi,

Greeting from me!

My OS is Arch Linux, and cmake version is 3.14.1. Running "cmake -G Ninja ../llvm -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DCMAKE_BUILD_TYPE=Release" will generate following error:

# cmake -G Ninja ../llvm -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DCMAKE_BUILD_TYPE=Release
CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0051 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/root/project/build/CMakeFiles/CMakeOutput.log".

Could you help to check it? Thanks very much in advance!

Best Regards
Nan Xiao

[C++] Use of tcmalloc leads to assertion failure

Hi,
I have a binary which use tcmalloc (from gperftools). tcmalloc creates some new sections for himself (google_malloc and malloc_hook) with AX flags.

When I apply BOLT on this binary, it leads to an assertion when meets the __stop_google_malloc symbol on

llvm::bolt::RewriteInstance::discoverFileObjects(): Assertion `Section && "section for functions must be registered."' failed.

If I force tcmalloc not to create this section, I don't have the assertion anymore.

I assume this have some links with #6, but as the issue moved a lot from the original subject, I preferred open a new one.

Here is an extract of a readelf -e of libtcmalloc.a around the concerned sections:

  [...]
  [481] .gnu.lto_.symtab. PROGBITS         0000000000000000  000560d6
       0000000000000d72  0000000000000000   E       0     0     1
  [482] .gnu.lto_.opts    PROGBITS         0000000000000000  00056e48
       00000000000000bd  0000000000000000   E       0     0     1
  [483] .rodata           PROGBITS         0000000000000000  00056f20
       00000000000008a9  0000000000000000   A       0     0     32
  [484] malloc_hook       PROGBITS         0000000000000000  000577ca
       0000000000000211  0000000000000000  AX       0     0     2
  [485] .relamalloc_hook  RELA             0000000000000000  000a1010
       0000000000000228  0000000000000018   I      802   484     8
  [486] .gcc_except_table PROGBITS         0000000000000000  000579db
       000000000000003b  0000000000000000   A       0     0     1
  [487] .text._ZN4base6su PROGBITS         0000000000000000  00057a16
       0000000000000024  0000000000000000 AXG       0     0     1
  [488] .text._ZN4base6su PROGBITS         0000000000000000  00057a3a
       000000000000001c  0000000000000000 AXG       0     0     1
  [489] .text._ZN4base6su PROGBITS         0000000000000000  00057a56
       0000000000000023  0000000000000000 AXG       0     0     1
  [490] .rela.text._ZN4ba RELA             0000000000000000  000a1238
       0000000000000018  0000000000000018  IG      802   489     8
  [491] .text._ZN4base6su PROGBITS         0000000000000000  00057a79
       000000000000002f  0000000000000000 AXG       0     0     1
  [492] .rela.text._ZN4ba RELA             0000000000000000  000a1250
       0000000000000018  0000000000000018  IG      802   491     8
  [493] .text._ZN4base6su PROGBITS         0000000000000000  00057aa8
       0000000000000011  0000000000000000 AXG       0     0     1
  [...]
  [991] .text._ZN8tcmallo PROGBITS         0000000000000000  000d26a2
       000000000000002f  0000000000000000 AXG       0     0     2
  [992] .rela.text._ZN8tc RELA             0000000000000000  0014c168
       0000000000000018  0000000000000018  IG      1513   991     8
  [993] .text._ZN8tcmallo PROGBITS         0000000000000000  000d26d2
       000000000000002c  0000000000000000 AXG       0     0     2
  [994] .rela.text._ZN8tc RELA             0000000000000000  0014c180
       0000000000000018  0000000000000018  IG      1513   993     8
  [995] google_malloc     PROGBITS         0000000000000000  000d2700
       00000000000043f5  0000000000000000  AX       0     0     64
  [996] .relagoogle_mallo RELA             0000000000000000  0014c198
       0000000000002088  0000000000000018   I      1513   995     8
  [997] .gcc_except_table PROGBITS         0000000000000000  000d6af8
       000000000000014c  0000000000000000   A       0     0     4
  [998] .rela.gcc_except_ RELA             0000000000000000  0014e220
       0000000000000018  0000000000000018   I      1513   997     8
  [999] .text._ZN13TCMall PROGBITS         0000000000000000  000d6c44
       000000000000001f  0000000000000000 AXG       0     0     2
  [1000] .rela.text._ZN13T RELA             0000000000000000  0014e238
       0000000000000018  0000000000000018  IG      1513   999     8
  [...]

and is an extract of the final binary:

  [...]
  [13] .init             PROGBITS         00000000004314f8  000314f8
       000000000000001f  0000000000000000  AX       0     0     4
  [14] .plt              PROGBITS         0000000000431520  00031520
       0000000000000810  0000000000000010  AX       0     0     16
  [15] .text             PROGBITS         0000000000432000  00032000
       00000000018c80f0  0000000000000000  AX       0     0     4096
  [16] google_malloc     PROGBITS         0000000001cfa100  018fa100
       00000000000043f5  0000000000000000  AX       0     0     64
  [17] malloc_hook       PROGBITS         0000000001cfe4f6  018fe4f6
       00000000000005a1  0000000000000000  AX       0     0     2
  [18] .fini             PROGBITS         0000000001cfea98  018fea98
       0000000000000009  0000000000000000  AX       0     0     4
  [19] .rodata           PROGBITS         0000000001cfeac0  018feac0
       0000000000466e0b  0000000000000000   A       0     0     64
  [20] .gcc_except_table PROGBITS         00000000021658cc  01d658cc
       00000000000ed9f6  0000000000000000   A       0     0     4
  [21] .eh_frame         X86_64_UNWIND    00000000022532c8  01e532c8
       0000000000603fac  0000000000000000   A       0     0     8
  [22] .eh_frame_hdr     X86_64_UNWIND    0000000002857274  02457274
       00000000001619cc  0000000000000000   A       0     0     4
  [...]

Build errors on CentOS 7.4 with gcc 4.8.5

When building BOLT with the instructions provided in the README, I'm getting the following compiler error:

[10/295] Building CXX object tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o
FAILED: tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o 
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/llvm-bolt/src -I../tools/llvm-bolt/src -I/usr/include/libxml2 -Iinclude -I../include -fPIC -fvisibility-inlines-hidden -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -DNDEBUG    -fno-exceptions -fno-rtti -MD -MT tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o -MF tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o.d -o tools/llvm-bolt/src/CMakeFiles/llvm-bolt.dir/BinaryBasicBlock.cpp.o -c ../tools/llvm-bolt/src/BinaryBasicBlock.cpp
../tools/llvm-bolt/src/BinaryBasicBlock.cpp: In member function ‘void llvm::bolt::BinaryBasicBlock::removePredecessor(llvm::bolt::BinaryBasicBlock*)’:
../tools/llvm-bolt/src/BinaryBasicBlock.cpp:304:8: warning: variable ‘Erased’ set but not used [-Wunused-but-set-variable]
   bool Erased{false};
        ^
In file included from ../tools/llvm-bolt/src/BinaryBasicBlock.cpp:12:0:
../tools/llvm-bolt/src/BinaryBasicBlock.h: In instantiation of ‘llvm::bolt::BinaryBasicBlock::iterator llvm::bolt::BinaryBasicBlock::replaceInstruction(llvm::bolt::BinaryBasicBlock::iterator, Itr, Itr) [with Itr = __gnu_cxx::__normal_iterator<const llvm::MCInst*, std::vector<llvm::MCInst> >; llvm::bolt::BinaryBasicBlock::iterator = __gnu_cxx::__normal_iterator<llvm::MCInst*, std::vector<llvm::MCInst> >]’:
../tools/llvm-bolt/src/BinaryBasicBlock.h:715:73:   required from here
../tools/llvm-bolt/src/BinaryBasicBlock.h:710:66: error: could not convert ‘((llvm::bolt::BinaryBasicBlock*)this)->llvm::bolt::BinaryBasicBlock::Instructions.std::vector<_Tp, _Alloc>::insert<__gnu_cxx::__normal_iterator<const llvm::MCInst*, std::vector<llvm::MCInst> >, void>(((llvm::bolt::BinaryBasicBlock*)this)->llvm::bolt::BinaryBasicBlock::Instructions.std::vector<_Tp, _Alloc>::erase<llvm::MCInst, std::allocator<llvm::MCInst> >(II), Begin, End)’ from ‘void’ to ‘llvm::bolt::BinaryBasicBlock::iterator {aka __gnu_cxx::__normal_iterator<llvm::MCInst*, std::vector<llvm::MCInst> >}’
     return Instructions.insert(Instructions.erase(II), Begin, End);
                                                                  ^

I know that the compiler version is pretty old but that unfortunately comes with the system. In case you don't support this compiler, is there any workaround?

BOLT bug with -inline-small-functios causes rbp to not be 16 byte aligned

This bug has happened in a couple of binaries where we see a segfault because an aligned vector insn like movaps, movdqa is accessing a non-aligned address offset of rbp. This always happens with -inline-small-functions. On further investigation, I noticed this code sequence in the middle of a function:

0000000003071980 <some_func>:
3071980: 55 push %rbp
3071981: 48 89 e5 mov %rsp,%rbp
3071984: 41 57 push %r15
3071986: 41 56 push %r14
3071988: 41 55 push %r13
307198a: 41 54 push %r12
307198c: 53 push %rbx
307198d: 48 81 ec b8 00 00 00 sub $0xb8,%rsp
...
307199d: 48 89 fb mov %rdi,%rbx
30719a0: 4c 8d ad 20 ff ff ff lea -0xe0(%rbp),%r13
30719a7: 4c 89 ef mov %r13,%rdi
30719aa: 4c 89 c6 mov %r8,%rsi
30719ad: e8 6e 54 fd ff callq 3046e20
30719b2: 4c 89 ef mov %r13,%rdi
30719b5: 55 push %rbp
30719b6: 48 89 e5 mov %rsp,%rbp
30719b9: be 38 1e f3 01 mov $0x1f31e38,%esi
30719be: ba 48 1e f3 01 mov $0x1f31e48,%edx
30719c3: e8 38 53 fe ff callq 3056d00
30719c8: 5d pop %rbp

Notice the insn in 30791b5 and 30719c8. There is no need to spill rbp in the caller as it is callee-saved. This points to not cleaning up the code after inlining a function. This is corrupting rbp as it is not 16 byte aligned and the function at 3056d00 is using movaps to access 0xd0(%rbp) and segfaulting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.