[Top] [All Lists]

Re: [PATCH -v4 9/9] tracing: add function graph tracer support for MIPS

To: David Daney <>
Subject: Re: [PATCH -v4 9/9] tracing: add function graph tracer support for MIPS
From: Steven Rostedt <>
Date: Wed, 21 Oct 2009 12:46:08 -0400
Cc: Wu Zhangjin <>,,, Thomas Gleixner <>, Ralf Baechle <>, Nicholas Mc Guire <>
In-reply-to: <>
Organization: Kihon Technologies Inc.
Original-recipient: rfc822;
References: <> <> <> <> <> <> <> <> <> <> <>
On Wed, 2009-10-21 at 09:37 -0700, David Daney wrote:

> There is no deterministic way to identify MIPS function prologs.  This 
> is especially true for leaf functions, but also for functions with 
> multiple return sites.
> For certain GCC versions there may be a set of command line options that 
> would give good results, but in general it is not possible.  Attempts at 
> fast backtrace generation using code inspection are not reliable and 
> will invariably result in faults and panics when they fail.

Thanks for the update.

We can easily protect against panics, since we do fault protection
within the code (although currently it will panic on fault, but we can
fix that ;-). We can limit the search to a couple of 100 instructions,
as well as fail on first panic.

But are you sure that when compiled with -pg, that GCC does not give a
reliable prologue. Things are different when GCC is compiled with -pg,
it may indeed always have something that we can flag.

We could also add other tests, like the subtraction of the stack too.

-- Steve

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