[LLVMdev] Re moving the instrumented instructions at runtime

陳韋任 chenwj at iis.sinica.edu.tw
Mon Nov 14 01:36:19 PST 2011


> 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/




More information about the llvm-dev mailing list