BOLT icon indicating copy to clipboard operation
BOLT copied to clipboard

Support Linux kernel modules

Open DreamTeamWangbowen opened this issue 3 years ago • 5 comments

[root@localhost home]# ./wbw/llvm-project-main/build/bin/llvm-bolt kvm-intel.ko -o kvm-intel.ko.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort -split-functions=3 -split-all-cold -icf=1 -use-gnu-stack BOLT-INFO: shared object or position-independent executable detected BOLT-INFO: Target architecture: x86_64 BOLT-INFO: BOLT version: llvm-bolt: /home/wbw/llvm-project-main/bolt/lib/Rewrite/RewriteInstance.cpp:494: void llvm::bolt::RewriteInstance::discoverStorage(): Assertion `NextAvailableAddress && NextAvailableOffset && "no PT_LOAD pheader seen"' failed. #0 0x0000000000cdc87f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0 #1 0x0000000000cda41e SignalHandler(int) Signals.cpp:0:0 #2 0x00007f59ad9abce0 __restore_rt (/lib64/libpthread.so.0+0x12ce0) #3 0x00007f59ac6baa4f raise (/lib64/libc.so.6+0x4ea4f) #4 0x00007f59ac68ddb5 abort (/lib64/libc.so.6+0x21db5) #5 0x00007f59ac68dc89 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21c89) #6 0x00007f59ac6b33a6 (/lib64/libc.so.6+0x473a6) #7 0x0000000000ad9fa0 llvm::bolt::RewriteInstance::discoverStorage() (./wbw/llvm-project-main/build/bin/llvm-bolt+0xad9fa0) #8 0x0000000000b14535 llvm::bolt::RewriteInstance::run() (./wbw/llvm-project-main/build/bin/llvm-bolt+0xb14535) #9 0x000000000040c6b0 main (./wbw/llvm-project-main/build/bin/llvm-bolt+0x40c6b0) #10 0x00007f59ac6a6ca3 __libc_start_main (/lib64/libc.so.6+0x3aca3) #11 0x000000000046e8de _start (./wbw/llvm-project-main/build/bin/llvm-bolt+0x46e8de) PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump: 0. Program arguments: ./wbw/llvm-project-main/build/bin/llvm-bolt kvm-intel.ko -o kvm-intel.ko.bolt -data=perf.fdata -reorder-blocks=cache+ -reorder-functions=hfsort -split-functions=3 -split-all-cold -icf=1 -use-gnu-stack Aborted (core dumped)

DreamTeamWangbowen avatar Mar 03 '22 12:03 DreamTeamWangbowen

@nico @drodriguez @zpao @d0k hi guys,please help me.

DreamTeamWangbowen avatar Mar 03 '22 12:03 DreamTeamWangbowen

Hello. Is this an ELF binary? Can you provide a repro?

ayermolo avatar Mar 03 '22 15:03 ayermolo

This is linux kernel's module. And bolt support linux kernel module optimization?

DreamTeamWangbowen avatar Mar 04 '22 02:03 DreamTeamWangbowen

This is linux kernel's module. And bolt support linux kernel module optimization?

I guess you're the first to report trying to process a kernel module with BOLT :) No, we don't support it yet. BOLT expects a PT_LOAD program header as shown in the assertion that failed.

How large is kvm-intel.ko kernel module text section? Do you have a way to measure performance impact of optimizing the module?

aaupov avatar Mar 20 '22 12:03 aaupov

This is linux kernel's module. And bolt support linux kernel module optimization?

I guess you're the first to report trying to process a kernel module with BOLT :) No, we don't support it yet. BOLT expects a PT_LOAD program header as shown in the assertion that failed.

How large is kvm-intel.ko kernel module text section? Do you have a way to measure performance impact of optimizing the module?

I see, thanks for your answer :)

DreamTeamWangbowen avatar Mar 23 '22 02:03 DreamTeamWangbowen