From: Rabin Vincent <rabin@rab.in>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Frederic Weisbecker" <fweisbec@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Tim Bird" <tim.bird@am.sony.com>
Subject: Re: [PATCH 6/6] ARM: ftrace: enable function graph tracer
Date: Tue, 9 Nov 2010 19:16:45 +0530 [thread overview]
Message-ID: <20101109134644.GA3163@debian> (raw)
In-Reply-To: <AANLkTinmSn1fqKv8sCCP8d0-_0HsLrhtorXvHCovOYve@mail.gmail.com>
On Mon, Nov 08, 2010 at 10:42:57AM +0000, Catalin Marinas wrote:
> 2010/11/8 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > On Sat, Nov 06, 2010 at 07:06:28PM +0000, Catalin Marinas wrote:
> >> On Saturday, November 6, 2010, Rabin Vincent <rabin@rab.in> wrote:
> >> > --- a/kernel/trace/Kconfig
> >> > +++ b/kernel/trace/Kconfig
> >> > @@ -141,6 +141,7 @@ config FUNCTION_TRACER
> >> >
> >> > config FUNCTION_GRAPH_TRACER
> >> > bool "Kernel Function Graph Tracer"
> >> > + select FRAME_POINTER if ARM_UNWIND
> >>
> >> Would it be better to modify FRAME_POINTER definition in the ARM
> >> Kconfig so that it is enabled automatically when FUNCTION_GRAPH_TRACER
> >> is enabled?
> > I don't like that suggestion much because it hides the dependency.
> > Moreover a "default y if FUNCTION_GRAPH_TRACER" doesn't work if a
> > precondition for FRAME_POINTER isn't true. Rabin's approach at least
> > generates a warning.
>
> If a precondition for FRAME_POINTER isn't true, we should not force it
> via 'select'. We try to get rid of such warnings in the kernel.
>
> However, on ARM the FRAME_POINTER depends on !THUMB2_KERNEL but for
> Thumb-2 kernels HAVE_FUNCTION_GRAPH_TRACER is also disabled, so there
> isn't a dependency issue here. It's more like a personal preference to
> keep the changes within the arch/arm tree.
OK, new patch below.
>From ce3856933234b0976068be8bdc46340dcf31ef6f Mon Sep 17 00:00:00 2001
From: Rabin Vincent <rabin@rab.in>
Date: Sat, 6 Nov 2010 23:03:53 +0530
Subject: [PATCHv2] ARM: ftrace: enable function graph tracer
Add the options to enable the function graph tracer on ARM. Function
graph tracer support requires frame pointers, so exclude Thumb-2 and
also make sure FRAME_POINTER gets enabled when FUNCTION_GRAPH_TRACER is
used, since FUNCTION_TRACER doesn't "select FRAME_POINTER" when
ARM_UNWIND is used. Therefore, with GCC 4.4.0+, you get plain function
tracing without frame pointers, but you'll need them if you want
function graph tracing.
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
arch/arm/Kconfig | 1 +
arch/arm/Kconfig.debug | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a19a526..c5e96ff 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -14,6 +14,7 @@ config ARM
select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
+ select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL)
select HAVE_GENERIC_DMA_COHERENT
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZO
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 2fd0b99..eac62085 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -23,7 +23,7 @@ config STRICT_DEVMEM
config FRAME_POINTER
bool
depends on !THUMB2_KERNEL
- default y if !ARM_UNWIND
+ default y if !ARM_UNWIND || FUNCTION_GRAPH_TRACER
help
If you say N here, the resulting kernel will be slightly smaller and
faster. However, if neither FRAME_POINTER nor ARM_UNWIND are enabled,
--
1.7.2.3
next prev parent reply other threads:[~2010-11-09 13:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 18:25 [PATCH 1/6] ARM: ensure sched_clock() and children are notrace Rabin Vincent
2010-11-06 18:25 ` [PATCH 2/6] ARM: place C irq handlers in IRQ_ENTRY for ftrace Rabin Vincent
2010-11-06 18:25 ` [PATCH 3/6] ARM: ftrace: use gas macros to avoid code duplication Rabin Vincent
2010-11-06 18:25 ` [PATCH 4/6] ARM: ftrace: function graph tracer support Rabin Vincent
2010-11-06 18:25 ` [PATCH 5/6] ARM: ftrace: graph tracer + dynamic ftrace Rabin Vincent
2010-11-06 18:25 ` [PATCH 6/6] ARM: ftrace: enable function graph tracer Rabin Vincent
2010-11-06 19:06 ` Catalin Marinas
2010-11-08 9:18 ` Uwe Kleine-König
2010-11-08 10:42 ` Catalin Marinas
2010-11-09 13:46 ` Rabin Vincent [this message]
2010-11-09 14:22 ` Catalin Marinas
2010-11-12 18:44 ` [PATCH 1/6] ARM: ensure sched_clock() and children are notrace Rabin Vincent
2010-11-19 16:09 ` Rabin Vincent
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=20101109134644.GA3163@debian \
--to=rabin@rab.in \
--cc=catalin.marinas@arm.com \
--cc=fweisbec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tim.bird@am.sony.com \
--cc=u.kleine-koenig@pengutronix.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).