* [PATCH 1/1] ftrace: adding other non-leaving .text sections
@ 2008-11-26 2:29 Liming Wang
2008-11-26 2:49 ` Ingo Molnar
2008-11-26 3:03 ` Steven Rostedt
0 siblings, 2 replies; 8+ messages in thread
From: Liming Wang @ 2008-11-26 2:29 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar; +Cc: linux-kernel, Liming Wang
Please review this patch, and I don't know whether new sections will conflict
with sched tracer or others.
This patch is against Steven tree's tip/devel latest commit.
Impact: improve recordmcount.pl
Besides .text section, there are three .text sections that won't
be freed after kernel booting. They are: .sched.text, .spinlock.text
and .kprobes.text, which contain functions we can trace. But the last
section ".kprobes.text" is particular, which has been marked as "notrace",
we ignore it. Thus we add other two sections.
Signed-off-by: Liming Wang <liming.wang@windriver.com>
---
scripts/recordmcount.pl | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 0197e2f..0b1dc9f 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -112,6 +112,8 @@ my ($arch, $bits, $objdump, $objcopy, $cc,
# Acceptable sections to record.
my %text_sections = (
".text" => 1,
+ ".sched.text" => 1,
+ ".spinlock.text" => 1,
);
$objdump = "objdump" if ((length $objdump) == 0);
--
1.6.0.3
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 2:29 [PATCH 1/1] ftrace: adding other non-leaving .text sections Liming Wang
@ 2008-11-26 2:49 ` Ingo Molnar
2008-11-26 3:03 ` Steven Rostedt
1 sibling, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2008-11-26 2:49 UTC (permalink / raw)
To: Liming Wang; +Cc: Steven Rostedt, linux-kernel
* Liming Wang <liming.wang@windriver.com> wrote:
> Please review this patch, and I don't know whether new sections will conflict
> with sched tracer or others.
> This patch is against Steven tree's tip/devel latest commit.
>
> Impact: improve recordmcount.pl
>
> Besides .text section, there are three .text sections that won't
> be freed after kernel booting. They are: .sched.text, .spinlock.text
> and .kprobes.text, which contain functions we can trace. But the last
> section ".kprobes.text" is particular, which has been marked as "notrace",
> we ignore it. Thus we add other two sections.
>
> Signed-off-by: Liming Wang <liming.wang@windriver.com>
> ---
> scripts/recordmcount.pl | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 0197e2f..0b1dc9f 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -112,6 +112,8 @@ my ($arch, $bits, $objdump, $objcopy, $cc,
> # Acceptable sections to record.
> my %text_sections = (
> ".text" => 1,
> + ".sched.text" => 1,
> + ".spinlock.text" => 1,
> );
make sense - applied to tip/tracing/ftrace, thanks!
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 2:29 [PATCH 1/1] ftrace: adding other non-leaving .text sections Liming Wang
2008-11-26 2:49 ` Ingo Molnar
@ 2008-11-26 3:03 ` Steven Rostedt
2008-11-26 3:04 ` Paul Mundt
1 sibling, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2008-11-26 3:03 UTC (permalink / raw)
To: Liming Wang; +Cc: Ingo Molnar, linux-kernel
On Wed, 26 Nov 2008, Liming Wang wrote:
> Please review this patch, and I don't know whether new sections will conflict
> with sched tracer or others.
> This patch is against Steven tree's tip/devel latest commit.
>
> Impact: improve recordmcount.pl
>
> Besides .text section, there are three .text sections that won't
> be freed after kernel booting. They are: .sched.text, .spinlock.text
> and .kprobes.text, which contain functions we can trace. But the last
> section ".kprobes.text" is particular, which has been marked as "notrace",
> we ignore it. Thus we add other two sections.
Yep, only those sections that we know will not disappear are OK. I was
conservative with only using ".text" but I knew there were other sections
that were OK, so I used the hash array to make it easy to add others.
Thanks!
Acked-by: Steven Rostedt <srostedt@redhat.com>
-- Steve
>
> Signed-off-by: Liming Wang <liming.wang@windriver.com>
> ---
> scripts/recordmcount.pl | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 0197e2f..0b1dc9f 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -112,6 +112,8 @@ my ($arch, $bits, $objdump, $objcopy, $cc,
> # Acceptable sections to record.
> my %text_sections = (
> ".text" => 1,
> + ".sched.text" => 1,
> + ".spinlock.text" => 1,
> );
>
> $objdump = "objdump" if ((length $objdump) == 0);
> --
> 1.6.0.3
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 3:03 ` Steven Rostedt
@ 2008-11-26 3:04 ` Paul Mundt
2008-11-26 3:14 ` walimis
2008-11-26 3:20 ` Steven Rostedt
0 siblings, 2 replies; 8+ messages in thread
From: Paul Mundt @ 2008-11-26 3:04 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Liming Wang, Ingo Molnar, linux-kernel
On Tue, Nov 25, 2008 at 10:03:35PM -0500, Steven Rostedt wrote:
>
> On Wed, 26 Nov 2008, Liming Wang wrote:
>
> > Please review this patch, and I don't know whether new sections will conflict
> > with sched tracer or others.
> > This patch is against Steven tree's tip/devel latest commit.
> >
> > Impact: improve recordmcount.pl
> >
> > Besides .text section, there are three .text sections that won't
> > be freed after kernel booting. They are: .sched.text, .spinlock.text
> > and .kprobes.text, which contain functions we can trace. But the last
> > section ".kprobes.text" is particular, which has been marked as "notrace",
> > we ignore it. Thus we add other two sections.
>
> Yep, only those sections that we know will not disappear are OK. I was
> conservative with only using ".text" but I knew there were other sections
> that were OK, so I used the hash array to make it easy to add others.
>
Does your .text cover .text.head by the way?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 3:04 ` Paul Mundt
@ 2008-11-26 3:14 ` walimis
2008-11-26 3:18 ` Paul Mundt
2008-11-26 3:20 ` Steven Rostedt
1 sibling, 1 reply; 8+ messages in thread
From: walimis @ 2008-11-26 3:14 UTC (permalink / raw)
To: Paul Mundt, Steven Rostedt, Liming Wang, Ingo Molnar,
linux-kernel
On Wed, Nov 26, 2008 at 12:04:46PM +0900, Paul Mundt wrote:
>On Tue, Nov 25, 2008 at 10:03:35PM -0500, Steven Rostedt wrote:
>>
>> On Wed, 26 Nov 2008, Liming Wang wrote:
>>
>> > Please review this patch, and I don't know whether new sections will conflict
>> > with sched tracer or others.
>> > This patch is against Steven tree's tip/devel latest commit.
>> >
>> > Impact: improve recordmcount.pl
>> >
>> > Besides .text section, there are three .text sections that won't
>> > be freed after kernel booting. They are: .sched.text, .spinlock.text
>> > and .kprobes.text, which contain functions we can trace. But the last
>> > section ".kprobes.text" is particular, which has been marked as "notrace",
>> > we ignore it. Thus we add other two sections.
>>
>> Yep, only those sections that we know will not disappear are OK. I was
>> conservative with only using ".text" but I knew there were other sections
>> that were OK, so I used the hash array to make it easy to add others.
>>
>Does your .text cover .text.head by the way?
No, and not needed. Because .text.head is of booting code, to which
function tracer can't trace.
walimis
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 3:14 ` walimis
@ 2008-11-26 3:18 ` Paul Mundt
2008-11-26 3:24 ` walimis
0 siblings, 1 reply; 8+ messages in thread
From: Paul Mundt @ 2008-11-26 3:18 UTC (permalink / raw)
To: walimis; +Cc: Steven Rostedt, Liming Wang, Ingo Molnar, linux-kernel
On Wed, Nov 26, 2008 at 11:14:38AM +0800, walimis wrote:
> On Wed, Nov 26, 2008 at 12:04:46PM +0900, Paul Mundt wrote:
> >On Tue, Nov 25, 2008 at 10:03:35PM -0500, Steven Rostedt wrote:
> >>
> >> On Wed, 26 Nov 2008, Liming Wang wrote:
> >>
> >> > Please review this patch, and I don't know whether new sections will conflict
> >> > with sched tracer or others.
> >> > This patch is against Steven tree's tip/devel latest commit.
> >> >
> >> > Impact: improve recordmcount.pl
> >> >
> >> > Besides .text section, there are three .text sections that won't
> >> > be freed after kernel booting. They are: .sched.text, .spinlock.text
> >> > and .kprobes.text, which contain functions we can trace. But the last
> >> > section ".kprobes.text" is particular, which has been marked as "notrace",
> >> > we ignore it. Thus we add other two sections.
> >>
> >> Yep, only those sections that we know will not disappear are OK. I was
> >> conservative with only using ".text" but I knew there were other sections
> >> that were OK, so I used the hash array to make it easy to add others.
> >>
> >Does your .text cover .text.head by the way?
> No, and not needed. Because .text.head is of booting code, to which
> function tracer can't trace.
>
In the case of CPU hotplug it can be entered at any time. I don't see why
it can't be traced from the boot CPU at least.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 3:18 ` Paul Mundt
@ 2008-11-26 3:24 ` walimis
0 siblings, 0 replies; 8+ messages in thread
From: walimis @ 2008-11-26 3:24 UTC (permalink / raw)
To: Paul Mundt, Steven Rostedt, Liming Wang, Ingo Molnar,
linux-kernel
On Wed, Nov 26, 2008 at 12:18:50PM +0900, Paul Mundt wrote:
>On Wed, Nov 26, 2008 at 11:14:38AM +0800, walimis wrote:
>> On Wed, Nov 26, 2008 at 12:04:46PM +0900, Paul Mundt wrote:
>> >On Tue, Nov 25, 2008 at 10:03:35PM -0500, Steven Rostedt wrote:
>> >>
>> >> On Wed, 26 Nov 2008, Liming Wang wrote:
>> >>
>> >> > Please review this patch, and I don't know whether new sections will conflict
>> >> > with sched tracer or others.
>> >> > This patch is against Steven tree's tip/devel latest commit.
>> >> >
>> >> > Impact: improve recordmcount.pl
>> >> >
>> >> > Besides .text section, there are three .text sections that won't
>> >> > be freed after kernel booting. They are: .sched.text, .spinlock.text
>> >> > and .kprobes.text, which contain functions we can trace. But the last
>> >> > section ".kprobes.text" is particular, which has been marked as "notrace",
>> >> > we ignore it. Thus we add other two sections.
>> >>
>> >> Yep, only those sections that we know will not disappear are OK. I was
>> >> conservative with only using ".text" but I knew there were other sections
>> >> that were OK, so I used the hash array to make it easy to add others.
>> >>
>> >Does your .text cover .text.head by the way?
>> No, and not needed. Because .text.head is of booting code, to which
>> function tracer can't trace.
>>
>In the case of CPU hotplug it can be entered at any time. I don't see why
>it can't be traced from the boot CPU at least.
OK, I see. Need more investigating on it.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] ftrace: adding other non-leaving .text sections
2008-11-26 3:04 ` Paul Mundt
2008-11-26 3:14 ` walimis
@ 2008-11-26 3:20 ` Steven Rostedt
1 sibling, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2008-11-26 3:20 UTC (permalink / raw)
To: Paul Mundt; +Cc: Liming Wang, Ingo Molnar, linux-kernel
On Wed, 26 Nov 2008, Paul Mundt wrote:
> On Tue, Nov 25, 2008 at 10:03:35PM -0500, Steven Rostedt wrote:
> >
> > On Wed, 26 Nov 2008, Liming Wang wrote:
> >
> > > Please review this patch, and I don't know whether new sections will conflict
> > > with sched tracer or others.
> > > This patch is against Steven tree's tip/devel latest commit.
> > >
> > > Impact: improve recordmcount.pl
> > >
> > > Besides .text section, there are three .text sections that won't
> > > be freed after kernel booting. They are: .sched.text, .spinlock.text
> > > and .kprobes.text, which contain functions we can trace. But the last
> > > section ".kprobes.text" is particular, which has been marked as "notrace",
> > > we ignore it. Thus we add other two sections.
> >
> > Yep, only those sections that we know will not disappear are OK. I was
> > conservative with only using ".text" but I knew there were other sections
> > that were OK, so I used the hash array to make it easy to add others.
> >
> Does your .text cover .text.head by the way?
No, you can add it if it is safe to trace, and it will not ever disappear.
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-26 3:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 2:29 [PATCH 1/1] ftrace: adding other non-leaving .text sections Liming Wang
2008-11-26 2:49 ` Ingo Molnar
2008-11-26 3:03 ` Steven Rostedt
2008-11-26 3:04 ` Paul Mundt
2008-11-26 3:14 ` walimis
2008-11-26 3:18 ` Paul Mundt
2008-11-26 3:24 ` walimis
2008-11-26 3:20 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.