LWN.net Logo

Out-of-lining spinlocks

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:

  1. 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.
  2. 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)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds