[LLVMdev] Re moving the instrumented instructions at runtime

yb999 yuanbozju at gmail.com
Mon Nov 14 10:18:37 PST 2011


Hello Wei-Ren,

Thank you for your reply and suggestion. I mean that I use these
instrumented instructions at the beginning of the program executions to
collect some information. And after that, to reduce the overhead, we hope to
remove these instrumented instructions at runtime. I want to know whether
LLVM can modify the binary codes at runtime.

Bo



Chen Wei-Ren (陳韋任) wrote:
> 
>> Assume I instrument some instructions by using some transformation
>> passes.
>> At runtime, I just need those instrumented instructions at the beginning,
>> and I would like to remove instrumented instructions at runtime to reduce
>> overhead. 
> 
>   At the beginning of what? You mean at the time of program starup? Then
> after detecting/collecting whatever you want, you would like to remove
> those instrumented instructions?
> 
>   I think you insert those instrumented instructions in LLVM IR, then
> leave LLVM to generate the host binary, right? If so, I think it's hard
> to remove those instrumented instructions.
> 
>   However, you can switch on/off instrument by, say, skipping those
> instrumented instructions at runtime. I mean you can patch a "jump addr"
> to by pass those instrumented instructions at runtime.
> 
> HTH,
> chenwj 
> 
> -- 
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj/
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 

-- 
View this message in context: http://old.nabble.com/Removing-the-instrumented-instructions-at-runtime-tp32838185p32842349.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.





More information about the llvm-dev mailing list