|
From: Josef W. <Jos...@gm...> - 2005-07-22 15:55:26
|
Hi, while looking to port callgrind, I noticed that vex works on much larger code blocks than Valgrind 2.x before, which are feeded to the instrumentation. Especially, it seems that IRBB's now chain over jumps and calls, and can have multiple conditional exits. Is this correct? It is now a little bit more complex for me to detect calls, as these are not obvious (via any jmpkind hint or similar) in the middle of a IRBB. I suppose that currently I have to rely on debug information to distinguish jumps from calls. Would it be possible to add a jmpkind hint to vex for inner-IRBB calls/jumps? As my internal data structures work on the old basic blocks (e.g. they assume that a BB only covers one function), I am not sure if I should split an IRBB internal into the old basic blocks. Any tips, anticipated problems with this idea? Another thing: I like to separate functional modules while doing the above rewrite. The function tracking module would consist of an instrumentation pass, a few helper functions, shadow call stack data structures, and allowing to register callbacks on function enter/exit. I can image that it would be worth integrating this into core valgrind as optional post-tool-instrumentation. E.g., as the shadow call stacks are valgrind-internal, backtraces output for errors can never be corrupt (and things like tail recursion optimizations stay visible as calls). Another module using this would give more elaborated execution context objects (including thread id, call chain ...). Thanks, Josef PS: In vex source, there is an empty docs directory. Are there any internal docs for VEX available? If yes, can I get a copy in private mail, please? |