Out-of-lining spinlocks
Posted Aug 12, 2004 15:10 UTC (Thu) by
jmshh (guest, #8257)
In reply to:
Out-of-lining spinlocks by rjw
Parent article:
Out-of-lining spinlocks
The issue is better solved by the profiling tools, but for
most architectures they don't know how to identify the caller. The missing
item is the return address.
There are two solutions:
- Compile the code with using a frame pointer (FP) for each routine.
For most architectures (especially register starved ones like x86) the
code will be significantly larger and slower.
-
Analyze the code statically and for every possible PC calculate an offset
from SP where the return address is found. This requires a dissassembler
in the tool.
(
Log in to post comments)