Re:TraceTool: Open source C++ execution trace framework
by roblabla on Saturday September 17, 2016 @11:32AM
(#12520900)
Looks cool. However, looking at the github, it looks like the code needs to be instrumented manually.
I've been looking for a tool that would automatically instrument functions at compile-time to inject code (for logging or otherwise) when entering and leaving functions. This would help debugging various infinite loops or figure out what call is blocking, etc... easier.
Re:TraceTool: Open source C++ execution trace framework
by Joky on Saturday September 17, 2016 @12:03PM
(#12521039)
Xray is currently being implemented in LLVM: it will allow exactly this. The code is instrumented at compile-time by leaving at the beginning of the function just the minimum amount of extra space (nop) so that at runtime a selected list of function can be instrumented arbitrarily. It means that even for a long-lived process, you can turn on/off various instrumentations while still having ~0 cost when instrumentation is off.
I've been looking for a tool that would automatically instrument functions at compile-time to inject code (for logging or otherwise) when entering and leaving functions. This would help debugging various infinite loops or figure out what call is blocking, etc... easier.
Anyone knows of a tool that would allow this ?