From: Steven Rostedt <srostedt@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: mingo@elte.hu, acme@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2]: sparc64: Add ftrace support.
Date: Wed, 14 May 2008 17:58:13 -0400 [thread overview]
Message-ID: <482B6075.4030904@redhat.com> (raw)
In-Reply-To: <20080514.142932.95610533.davem@davemloft.net>
David Miller wrote:
> From: Steven Rostedt <srostedt@redhat.com>
> Date: Wed, 14 May 2008 09:32:18 -0400
>
>> If you add the following in arch/sparc64/kernel/Makefile
>>
>> ifdef CONFIG_DYNAMIC_FTRACE
>> obj-y += ftrace.o
>> # Do not trace the ftrace code itself
>> ORIG_CFLAGS := $(KBUILD_CFLAGS)
>> KBUILD_CFLAGS = $(if $(filter-out ftrace, $(basename $(notdir $@))), \
>> $(ORIG_CFLAGS), \
>> $(subst -pg,,$(ORIG_CFLAGS)))
>> endif
>>
>> Then you wont need the "notrace" annotations on the functions.
>
> That frankly looks like crap compared to the simple "notrace"
> annotations in the *.c file.
>
> This Makefile turd is in fact seemingly multiplying in various
> places in the ftrace tree, please reverse this trend.
I wish it wasn't so ugly. The Makefile scripts allow you to add more
CFLAGS to specific files but does not have a way to remove generic
flags. If there was a better way then I would love to do it.
The problem is that adding "notrace" on ever function that needs it,
also becomes quite messy. Especially when you have files where all
functions in the file needs a notrace and there is 40 or so small
functions that this applies to.
To add flags to file foo.c one simply needs to do
CFLAGS_foo.o = -newflags
It would be nice to have something like
CFLAGS_REMOVE_foo.o = -pg
Perhaps that is possible to do. Then the above "Makefile turd" wont be
so crappy.
-- Steve
next prev parent reply other threads:[~2008-05-14 21:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 5:06 [PATCH 2/2]: sparc64: Add ftrace support David Miller
2008-05-14 13:32 ` Steven Rostedt
2008-05-14 21:29 ` David Miller
2008-05-14 21:58 ` Steven Rostedt [this message]
2008-05-14 22:24 ` David Miller
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=482B6075.4030904@redhat.com \
--to=srostedt@redhat.com \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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