From: Wu Zhangjin <wuzhangjin@gmail.com>
To: rostedt@goodmis.org
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ralf Baechle <ralf@linux-mips.org>,
Richard Sandiford <rdsandiford@googlemail.com>,
Nicholas Mc Guire <der.herr@hofr.at>,
David Daney <ddaney@caviumnetworks.com>,
Adam Nemet <anemet@caviumnetworks.com>,
Patrik Kluba <kpajko79@gmail.com>
Subject: Re: [PATCH -v6 07/13] tracing: add dynamic function tracer support for MIPS
Date: Tue, 27 Oct 2009 00:35:10 +0800 [thread overview]
Message-ID: <1256574910.5642.228.camel@falcon> (raw)
In-Reply-To: <1256573175.26028.310.camel@gandalf.stny.rr.com>
Hi,
[...]
> > +
> > +NESTED(ftrace_caller, PT_SIZE, ra)
> > + .globl _mcount
> > +_mcount:
> > + j ftrace_stub
> > + nop
> > + lw t0, function_trace_stop
> > + bnez t0, ftrace_stub
> > + nop
> > +
> > + MCOUNT_SAVE_REGS
> > +
> > + MCOUNT_SET_ARGS
> > + .globl ftrace_call
> > +ftrace_call:
> > + nop /* a placeholder for the call to a real tracing function */
> > + nop /* Do not touch me, I'm in the dealy slot of "jal func" */
>
> Indent the second nop ;-)
>
Yup, later in -v7.
> > + $mcount_regex = "^\\s*([0-9a-fA-F]+): R_MIPS_HI16\\s+_mcount\$";
> > + $objdump .= " -Melf-trad".$endian."mips ";
> > +
> > + if ($endian eq "big") {
> > + $endian = " -EB ";
> > + $ld .= " -melf".$bits."btsmip";
> > + } else {
> > + $endian = " -EL ";
> > + $ld .= " -melf".$bits."ltsmip";
> > + }
> > +
> > + $cc .= " -mno-abicalls -fno-pic -mabi=" . $bits . $endian;
> > + $ld .= $endian;
> > +
> > + if ($bits == 64) {
> > + $function_regex =
> > + "^([0-9a-fA-F]+)\\s+<(.|[^\$]L.*?|\$[^L].*?|[^\$][^L].*?)>:";
> > + $type = ".dword";
> > + }
> > +
> > } else {
> > die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
> > }
>
> So if I convert mips to do what ppc does, we can remove the long jump
> thing, right?
>
If remove the long jump, we at least to change the $mcount_regex in
scripts/recordmcount.pl, the addr + 12 in arch/mips/include/asm/ftrace.h
and the _mcount & ftrace_caller in mcount.S and the ftrace_make_nop &
ftrace_make_call in arch/mips/kernel/ftrace.c back to the -v4 version.
I think this method of supporting module is not that BAD, no obvious
overhead added except the "lui...addiu..." and two more "nop"
instructions. and it's very understandable, so, just use this version?
Regards,
Wu Zhangjin
next prev parent reply other threads:[~2009-10-26 16:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 15:13 [PATCH -v6 00/13] ftrace for MIPS Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 01/13] tracing: convert trace_clock_local() as weak function Wu Zhangjin
2009-11-09 2:10 ` Frederic Weisbecker
2009-10-26 15:13 ` [PATCH -v6 02/13] tracing: add mips_timecounter_read() for MIPS Wu Zhangjin
2009-11-09 4:15 ` Wu Zhangjin
2009-11-09 4:15 ` Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 03/13] tracing: add MIPS specific trace_clock_local() Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 04/13] tracing: add static function tracer support for MIPS Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 05/13] tracing: enable HAVE_FUNCTION_TRACE_MCOUNT_TEST " Wu Zhangjin
2009-10-26 15:41 ` Sergei Shtylyov
2009-10-26 15:57 ` Steven Rostedt
2009-10-26 15:57 ` Steven Rostedt
2009-10-26 16:16 ` Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 06/13] tracing: add an endian argument to scripts/recordmcount.pl Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 07/13] tracing: add dynamic function tracer support for MIPS Wu Zhangjin
2009-10-26 16:06 ` Steven Rostedt
2009-10-26 16:35 ` Wu Zhangjin [this message]
2009-10-26 16:45 ` Steven Rostedt
2009-10-26 17:35 ` Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 08/13] tracing: add IRQENTRY_EXIT section " Wu Zhangjin
2009-11-09 2:26 ` Frederic Weisbecker
2009-11-09 3:31 ` Wu Zhangjin
2009-11-09 3:31 ` Wu Zhangjin
2009-11-09 11:36 ` Frederic Weisbecker
2009-11-09 12:46 ` Steven Rostedt
2009-11-09 12:48 ` Steven Rostedt
2009-11-09 4:16 ` Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 09/13] tracing: Add __arch_notrace for arch specific requirement Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 10/13] tracing: not trace the timecounter_read* in kernel/time/clocksource.c Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 11/13] tracing: not trace mips_timecounter_read() for MIPS Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 12/13] tracing: add function graph tracer support " Wu Zhangjin
2009-10-26 15:13 ` [PATCH -v6 13/13] tracing: add dynamic function graph tracer " Wu Zhangjin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256574910.5642.228.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=anemet@caviumnetworks.com \
--cc=ddaney@caviumnetworks.com \
--cc=der.herr@hofr.at \
--cc=fweisbec@gmail.com \
--cc=kpajko79@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rdsandiford@googlemail.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).