[Top] [All Lists]

Re: [PATCH 7/9] tracing: MIPS: Reduce the overhead of dynamic Function T

To: David Daney <>
Subject: Re: [PATCH 7/9] tracing: MIPS: Reduce the overhead of dynamic Function Tracer
From: Wu Zhangjin <>
Date: Sat, 15 May 2010 10:43:45 +0800
Cc: Ralf Baechle <>, linux-mips <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:organization:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=P1t16NfSr3m9qVPNkge7u9xpADoUVVU9x+0qi5Ffb8M=; b=dfzRhi1bnK3Es9vRmxH6S7La4jOJBXi4gHqcN7TYl8HmIeGMV9vYrPNY0Ror2OFMZX x92Dvj+8pJSvtTZXZqwuIDxwYZAtiVKm88rLCxT4cFxdxahYb+9okM6ZHfg5Ud5Ssgyi bbTIbKmeUmWificEC3yT7m7KsVC6M/0WhK/2o=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=vuDs1pB+hugFZ/X10GSrgSDi35p7/7avDThtbUEsMc3+3ophsyX67hWTmHAf8oPp+s H6xX2Z0CItNebmC5B9mSjWmW6qxj9rqHkpFezvqP3evqOBvgh1A/12/dfC2TJRE8YVVj DWOps9ajH3wcnpUBi1uJq9a0FhJw2H3Q15yrg=
In-reply-to: <>
Organization: DSLab, Lanzhou University, China
Original-recipient: rfc822;
References: <> <> <>
On Fri, 2010-05-14 at 10:15 -0700, David Daney wrote:
> On 05/14/2010 04:08 AM, Wu Zhangjin wrote:
> > From: Wu Zhangjin<>
> >
> > With the help of uasm, this patch encodes the instructions of dynamic
> > Function Tracer in ftrace_dyn_arch_init() when initializing it.
> >
> [...]
> > +#include<asm/uasm.h>
> >
> All of uasm is _cpuinit, I haven't checked everything, but are you sure 
> you aren't calling if from non-_cpuinit code?

The calling tree looks like this:

start_kernel()  // __init
  --> ftrace_init()  // __init
        --> ftrace_dyn_arch_init() // __init
              --> ftrace_dyn_arch_init_insns() // inline
                    --> uasm_*/UASM_*

Nobody else will call uasm_*/UASM_* in this patch, I have checked the
uasm usage in arch/mips/kernel/traps.c. Seems the usam functions are
also called in the __init *set_except_vector(). so, it will also be safe
in this patch, is it?

Thanks & Regards,
        Wu Zhangjin

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