[llvm] [BOLT][Instrumentation] Initial instrumentation support for RISCV64 (PR #133882)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 18:37:59 PDT 2025


WangJee wrote:

> > Sorry, I didn't see this message yesterday and missed joining in. @maksfb I spent some time trying to use his code and found some problen. I fount that it couldn't pass the test in bolt/test/runtime/RISCV/basic-instrumentation.s.
> > > 1 __do_global_dtors_aux/1 8 1 __do_global_dtors_aux/1 a 0 1
> > > 1 __do_global_dtors_aux/1 16 1 __do_global_dtors_aux/1 18 0 1
> > > 1 __do_global_dtors_aux/1 20 1 __do_global_dtors_aux/1 22 0 1
> > > 1 __do_global_dtors_aux/1 20 0 [unknown] 0 0 1
> > > 0 [unknown] 0 1 _start 0 0 1
> > > 0 [unknown] 0 1 load_gp/1 0 0 1
> > > 0 [unknown] 0 1 __do_global_dtors_aux/1 0 0 1
> > > 0 [unknown] 0 1 frame_dummy/1 0 0 1
> > > 0 [unknown] 0 1 main 0 0 1
> > > 0 [unknown] 0 1 f 0 0 1
> > 
> > 
> > but the correct on is that:
> > > 1 _start 0 1 load_gp/1 0 0 1
> > > 1 _start 1c 1 __libc_start_main at PLT 0 0 1
> > > 1 __do_global_dtors_aux/1 8 1 __do_global_dtors_aux/1 a 0 1
> > > 1 __do_global_dtors_aux/1 16 1 __do_global_dtors_aux/1 18 0 1
> > > 1 __do_global_dtors_aux/1 20 1 __do_global_dtors_aux/1 22 0 1
> > > 1 __do_global_dtors_aux/1 22 1 deregister_tm_clones/1 0 0 1
> > > 1 frame_dummy/1 0 1 register_tm_clones/1 0 0 1
> > > 1 main 4 1 f 0 0 1
> > > 1 __do_global_dtors_aux/1 20 0 [unknown] 0 0 1
> > > 0 [unknown] 0 1 _start 0 0 1
> > > 0 [unknown] 0 1 __do_global_dtors_aux/1 0 0 1
> > > 0 [unknown] 0 1 frame_dummy/1 0 0 1
> > > 0 [unknown] 0 1 main 0 0 1
> > 
> > 
> > and here is my [basic-instr.exe](https://github.com/dinyy/llvm_test/blob/main/basic-instr.exe) . Could you fix this problem? @WangJee
> 
> I have fix this problem , and submit PR [here](https://github.com/llvm/llvm-project/pull/136231). @WangJee @maksfb

@dinyy  I'm sorry I just saw your message, thank you very much for the fix

https://github.com/llvm/llvm-project/pull/133882


More information about the llvm-commits mailing list