4 ms·
Llvm-Dev RFC: XRay – A Function Call Tracing System
- thrownaway2424 11y agoThis is one of the most high-impact tools Google has. Although it is difficult to use and the data it produces hard to analyze, it can tell you things that no other tool can. My favorite mode is dead code coverage mode. At startup all the trace hooks are enabled. At first function entry the hook is logged and then disabled (overwritten with a run of nop). A function that hasn't logged by the time the program exits may be dead code.
- halosghost 11y agoI sincerely hope this is not just available for C++ but also for C. The RFC makes it seem like it is a little Cxx-focused, but having this tooling on C would be terrific!
- fsaintjacques 11y agoYou can somewhat do it with GCC, but it requires a linker script: http://mainisusuallyafunction.blogspot.ca/2011/11/self-modifying-code-for-debug-tracing.html http://mainisusuallyafunction.blogspot.ca/2011/11/self-modif...
- DannyBee 11y agoIt's just nop-sleds. They are fairly common :)
- j_s 11y agoI would like to build something like this for the .NET runtime. There are a few commercial post-build weaving options, I think. Looking forward to the day flame graphs are easy for .NET.