Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758367AbYAJXDV (ORCPT ); Thu, 10 Jan 2008 18:03:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752021AbYAJXDO (ORCPT ); Thu, 10 Jan 2008 18:03:14 -0500 Received: from ms-smtp-05.nyroc.rr.com ([24.24.2.59]:63738 "EHLO ms-smtp-05.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750802AbYAJXDN (ORCPT ); Thu, 10 Jan 2008 18:03:13 -0500 Date: Thu, 10 Jan 2008 18:02:29 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Jan Kiszka cc: LKML , Ingo Molnar , Linus Torvalds , Andrew Morton , Peter Zijlstra , Christoph Hellwig , Mathieu Desnoyers , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Tim Bird , Sam Ravnborg , "Frank Ch. Eigler" , Steven Rostedt , Philippe Gerum Subject: Re: [RFC PATCH 01/22 -v2] Add basic support for gcc profiler instrumentation In-Reply-To: <478661B9.7050406@siemens.com> Message-ID: References: <20080109232914.676624725@goodmis.org> <20080109233042.386384204@goodmis.org> <478661B9.7050406@siemens.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1440 Lines: 59 On Thu, 10 Jan 2008, Jan Kiszka wrote: > > =================================================================== > > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > > +++ linux-compile-i386.git/arch/x86/kernel/mcount-wrapper.S 2008-01-09 14:10:07.000000000 -0500 > > @@ -0,0 +1,25 @@ > > +/* > > + * linux/arch/x86/mcount-wrapper.S > > + * > > + * Copyright (C) 2004 Ingo Molnar > > + */ > > + > > +.globl mcount > > +mcount: > > + cmpl $0, mcount_enabled > > + jz out > > + > > + push %ebp > > + mov %esp, %ebp > > What is the benefit of having a call frame in this trampoline? We used > to carry this in the i386 mcount tracer for Adeos/I-pipe too (it was > derived from the -rt code), but I just successfully tested a removal > patch. Also glibc [1] doesn't include it. OK, I just tried this out on i386, and it works fine. > > > + pushl %eax > > + pushl %ecx > > + pushl %edx > > + > > + call __mcount > > I think this indirection should be avoided, just like the 64-bit version > and glibc do. I also did this too. > > > + > > + popl %edx > > + popl %ecx > > + popl %eax > > + popl %ebp > > +out: > > + ret > I'll go try the updates on x86_64 now. Thanks for the tips! -- Steve -- 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/