linux-mips
[Top] [All Lists]

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

To: wuzhangjin@gmail.com
Subject: Re: [PATCH 7/9] tracing: MIPS: Reduce the overhead of dynamic Function Tracer
From: David Daney <david.s.daney@gmail.com>
Date: Sun, 16 May 2010 10:04:07 -0700
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=PEWxaZuUAZ8WN/WxW39Gp8gGqcvRKmv+jolhKtIBQF8=; b=Fy84+dS0hF/QYQzjxld3w5OdMDYGL+OW/QQcNSyY3VMRB8MhCdZ8BdPiq0NirZi75u k7dHB0YAZ/CNMK3BwzREVIRGytcYdOcpGa7gLB+cmc49uASDOb4njLaNL2YgMpyRD8e6 jcHWJXMHxRUGHT3qzHVF/z1xNKlZt7PjLiZgw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=qU59JdE9UMz3aTbX5Iuji9jAFh/pyHd7w9T31+f4ZaL5QNTqVAxm42P3B8ZakERoTi bgv3EYb+CC7kUrqHdh/se1SPbR37eb3LLTIiYEfT7+WqKG3EF2dp/X9YMfsyX8d/1rlu B2rs+WC6GWqQjHSJN7C6iMiHALjfUrjZor8hY=
In-reply-to: <1273891425.8552.12.camel@localhost>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cover.1273834561.git.wuzhangjin@gmail.com> <6b4495690164114ff7353c86f6b53b979fca2756.1273834562.git.wuzhangjin@gmail.com> <4BED8524.8010805@gmail.com> <1273891425.8552.12.camel@localhost>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Thunderbird/3.0.4
On 05/14/2010 07:43 PM, Wu Zhangjin wrote:
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<wuzhangjin@gmail.com>

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?


Yes, that seems good to me. I just wanted to make sure that this wasn't being called from non-init code.

David Daney



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