|
From: Josef W. <Jos...@gm...> - 2002-11-20 15:20:22
|
On Wednesday 20 November 2002 13:23, Nicholas Nethercote wrote: > ... > Another way to extend basic blocks is to inline direct calls in the sam= e > way, eg: > > [code] > JMP-c 0xX > > becomes > > [code] > [code for block at 0xX] > > Problem with that is that it screws up function-entry detection for ski= ns > -- currently to detect function entry they can call > VG_(get_fnname_if_entry)() at the start of a basic block to determine i= f > it's the first basic block in a function. With this optimisation they'= d > have to do it for every x86 instruction, urgh. Is this really a problem? I thought VG_(get_fnname_if_entry)() is to be called at instrumentation t= ime? And BB chaining should be done *after* skin intrumentation? If a skin is "self-contained" in the instrumentations it's doing, there s= hould=20 be no problem at all with this fancy BB chaining, trace cache etc. Example: In my calltree-patch, I add a helper function when I detect a CALL UInstr= =2E Thus, the skin instrumentation has to modify the UInstr of a BB *before* = any=20 chaining is done.=20 But afterwards, the UInstr's of the BB contain the call to my helper, tog= ether=20 with the jump target as argument. There's no problem with getting rid of = the=20 CALL UInstr. itself for BB chaining. Josef |