opt problem

Hi,

When I use the opt --insert-block-profiling command, there is " opt: Unknown command line argument '-insert-block-profiling'."

When I use the opt -insert-edge-profiling t1.bc -o t1profile.bc, there is an error "Invalid MODULE_CODE_FUNCTION record" .

Does anyone know how to solve the problem? Thanks very much!

Best,

Jianing

Hi Jianing Zhao,

When I use the opt --insert-block-profiling command, there is " opt: Unknown command line argument '-insert-block-profiling'."

yes, it doesn't exist any more.

When I use the opt -insert-edge-profiling t1.bc -o t1profile.bc, there is an error "Invalid MODULE_CODE_FUNCTION record" .

The profiling infrastructure is in bad shape and needs someone to work on it.

Ciao, Duncan.

Hi,

Does anyone know which version of LLVM support "opt --insert-block-profiling command"? Thanks!

Jianing Zhao

Does anyone know which version of LLVM support "opt --insert-block-profiling command"? Thanks!

  You might try it by yourself. You can download LLVM x86 binary from the
website, which makes the testing easier.

Regards,
chenwj

If memory serves, it was still working till LLVM 2.5.

As for the error, I was getting the same error on my MAC and I traced the problem to different versions of llvm-ld, lli(both with LLVM 2.9) and clang(version 3.1). My clang was being picked up from the default apple /usr/bin; whereas the other tools were being picked from my previous 2.9 installation. I know, very stupid of me not to fix the PATH variable properly!

Anyway, once the PATH was fixed to use all the clang, lli, llvm-ld etc from the 3.0 installation directory, the error was gone.. So, that is that.. Hope that helps you as well..

As for the profiling, the LLVM profiling is total mess like Duncan says.. I am also working on some profiling projects again.. Surprisingly profiling worked all right in old versions of LLVM, prior to 2.5 I suppose.. Now, even the profile.pl script is totally out of sync with the opt &B llvm-prof commands... I am trying to fix it.. If I get some good results, I will update the group..

Cheers,
Alok