Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761805AbYHIBap (ORCPT ); Fri, 8 Aug 2008 21:30:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753395AbYHIBag (ORCPT ); Fri, 8 Aug 2008 21:30:36 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:33827 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752786AbYHIBag (ORCPT ); Fri, 8 Aug 2008 21:30:36 -0400 Date: Fri, 8 Aug 2008 21:30:33 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Andi Kleen cc: Mathieu Desnoyers , LKML , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Andrew Morton , Linus Torvalds , David Miller , Roland McGrath , Ulrich Drepper , Rusty Russell , Jeremy Fitzhardinge , Gregory Haskins , Arnaldo Carvalho de Melo , "Luis Claudio R. Goncalves" , Clark Williams Subject: Re: [PATCH 0/5] ftrace: to kill a daemon In-Reply-To: <20080809011955.GE9038@one.firstfloor.org> Message-ID: References: <20080808172259.GB8244@Krystal> <20080808174607.GG8244@Krystal> <20080808182104.GA11376@Krystal> <20080808190506.GD11376@Krystal> <87tzdv2g05.fsf@basil.nowhere.org> <20080809011955.GE9038@one.firstfloor.org> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) 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: 1783 Lines: 67 On Sat, 9 Aug 2008, Andi Kleen wrote: > > I wish we had a true 5 byte nop. The alternative is a jmp 0, which is > > measurable. This is replacing mcount from a kernel compile with the -pg > > Scary usage. How much is the difference? > > BTW a good way to get most of that back would be to not use frame > pointers if you have them enabled ;-) Unfortunately recently > the "select FRAME_POINTER"s keep creeping all over so far too many kernels > suffer from this slow mode now :-/ Funny, CONFIG_FTRACE happens to select that. Now the question is, would mcount work without it? i386: ENTRY(mcount) pushl %eax pushl %ecx pushl %edx movl 0xc(%esp), %eax movl 0x4(%ebp), %edx <-- we record the parent ip here subl $MCOUNT_INSN_SIZE, %eax call *ftrace_trace_function popl %edx popl %ecx popl %eax ret x86_64: ENTRY(mcount) subq $0x38, %rsp movq %rax, (%rsp) movq %rcx, 8(%rsp) movq %rdx, 16(%rsp) movq %rsi, 24(%rsp) movq %rdi, 32(%rsp) movq %r8, 40(%rsp) movq %r9, 48(%rsp) movq 0x38(%rsp), %rdi movq 8(%rbp), %rsi <-- we record the parent pointer here subq $MCOUNT_INSN_SIZE, %rdi call *ftrace_trace_function movq 48(%rsp), %r9 movq 40(%rsp), %r8 movq 32(%rsp), %rdi movq 24(%rsp), %rsi movq 16(%rsp), %rdx movq 8(%rsp), %rcx movq (%rsp), %rax addq $0x38, %rsp retq -- 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/