21 ms·
For those that are interested, the Linux kernel does almost the same thing (if compiled that way): https://lwn.net/Articles/264029/ https://lwn.net/Articles/26
by rwmj 15y ago
For those that are interested, the Linux kernel does almost the same thing (if compiled that way):
https://lwn.net/Articles/264029/ https://lwn.net/Articles/264029/
The mcount feature piggybacks on the profiling instruction added into every function when you use the gcc -pg option.
Edit: better link is probably this one:
http://www.mjmwired.net/kernel/Documentation/trace/ftrace.txt#1563 http://www.mjmwired.net/kernel/Documentation/trace/ftrace.tx...