Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Support Linux kernel modules #280

Open
DreamTeamWangbowen opened this issue Mar 3, 2022 · 5 comments
Open

Support Linux kernel modules #280

DreamTeamWangbowen opened this issue Mar 3, 2022 · 5 comments

Comments

@DreamTeamWangbowen
Copy link

[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
Copy link
Author

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

@ayermolo
Copy link
Contributor

ayermolo commented Mar 3, 2022

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

@DreamTeamWangbowen
Copy link
Author

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

@aaupov
Copy link
Contributor

aaupov commented Mar 20, 2022

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 aaupov changed the title core dumped Support Linux kernel modules Mar 20, 2022
@DreamTeamWangbowen
Copy link
Author

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 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants