"Jun Koi" <junkoi2004@gmail.com> writes:
> [...]
> I found this idea interesting. However, what do you think if the
> machine is SMP, or kernel is preemptive capable?
> [...]
> I cannot figure out how to correlate "enter" and "exit" function
> events in SMP or preemptive case.
In systemtap, a .return probe can refer to parameters of the
*corresponding* .call (function entry) event. The parameters are
saved in an auxiliary lookup table, indexed by thread-id and nesting
level. SMP or preemption should not cause any problem.