linux-mips
[Top] [All Lists]

Re: MIPS Function Tracer question

To: David Daney <ddaney.cavm@gmail.com>
Subject: Re: MIPS Function Tracer question
From: Steven Rostedt <rostedt@goodmis.org>
Date: Mon, 03 Dec 2012 09:40:48 -0500
Cc: Alan Cooper <alcooperx@gmail.com>, ralf@linux-mips.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
In-reply-to: <50B7E91C.6070403@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <CAOGqxeUOrVFoqsmUV19h5tXsD6pw5creXP9aN1C-V7K3WL2EXA@mail.gmail.com> <50B7E91C.6070403@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 2012-11-29 at 15:00 -0800, David Daney wrote:
> On 11/29/2012 01:04 PM, Alan Cooper wrote:
> > I've been doing some testing of the MIPS Function Tracer functionality
> > on the 3.3 kernel. I was surprised to find that the option to generate
> > frame pointers was required for tracing.
> 
> It is not really required for MIPS function tracing, but the Kconfigs 
> for some reason set it.
> 

The issue is with x86. Gcc wont compile if you have -pg and
-fomit-frame-pointer on x86. I originally forced function tracing to
select FRAME_POINTER, but because now on x86 with -mfentry, -pg no
longer requires frame pointers being set, I just let -pg complain one
way or the other. I believe that gcc by default will not add frame
pointers. Thus adding function tracing just prevents
-fomit-frame-pointer from being set, and if -pg requires frame pointers
it will automatically enable them otherwise they should not be enabled.

-- Steve

> >  When I don't enable
> > FRAME_POINTER along with FUNCTION_TRACER, the kernel hangs on boot. I
> > also noticed that a checkin to the 3.4 kernel
> > (b732d439cb43336cd6d7e804ecb2c81193ef63b0) no longer forces on
> > FRAME_POINTER when FUNCTION_TRACER is selected. I was wondering how it
> > works in 3.4 and beyond, so I built a Malta kernel from the latest
> > MIPS tree with FUNCTION_TRACING enabled and tested it with QEMU. The
> > kernel hung the same way. I can think of 2 reasons for this:
> > 1. Function tracing is broken for MIPS in 3.4 and beyond.
> > 2. The 4.5.3 GNU C compiler I'm using is generating different code for
> > function tracing.
> 



<Prev in Thread] Current Thread [Next in Thread>