Messages in this thread | | | From | Keith Owens <> | Subject | Re: [PATCH] Un-inline spinlocks on ppc64 | Date | Mon, 10 May 2004 11:34:42 +1000 |
| |
On Mon, 10 May 2004 10:11:33 +1000, Paul Mackerras <paulus@samba.org> wrote: >The one problem with out-of-line spinlock routines is that lock >contention will show up in profiles in the spin_lock etc. routines >rather than in the callers, as it does with inline spinlocks. I have >added a CONFIG_INLINE_SPINLOCKS config option for people that want to >do profiling. In the longer term, Anton is talking about teaching the >profiling code to attribute samples in the spin lock routines to the >routine's caller.
If it is any help, SGI patched the ia64 perfmon code to cope with a 2.4 version of the out of line spinlock patch. The ia64 code uses a non-standard calling sequence to work around a bug in gcc prior to 3.4, r28 is the return address for the out of line code.
pfm_record_sample() { ... #ifdef CONFIG_SMP extern char ia64_spinlock_contention[], ia64_spinlock_contention_end[]; #endif ... h->ip = regs ? regs->cr_iip | ((regs->cr_ipsr >> 41) & 0x3): 0x0UL; #ifdef CONFIG_SMP if (h->ip >= (unsigned long)ia64_spinlock_contention && h->ip < (unsigned long)ia64_spinlock_contention_end) h->ip = regs->r28; #endif ... }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |