* [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes
@ 2009-08-06 2:52 Steven Rostedt
2009-08-06 2:52 ` [PATCH 1/3] ring-buffer: fix check of try_to_discard result Steven Rostedt
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06 2:52 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
Frederic Weisbecker, Matt Fleming, Dave Airlie
Ingo,
Please pull the latest tip/tracing/urgent tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/urgent
Steven Rostedt (3):
ring-buffer: fix check of try_to_discard result
ring-buffer: do not disable ring buffer on oops_in_progress
tracing: do not use functions starting with .L in recordmcount.pl
----
kernel/trace/ring_buffer.c | 4 ++--
scripts/recordmcount.pl | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] ring-buffer: fix check of try_to_discard result
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
@ 2009-08-06 2:52 ` Steven Rostedt
2009-08-06 2:52 ` [PATCH 2/3] ring-buffer: do not disable ring buffer on oops_in_progress Steven Rostedt
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06 2:52 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
Frederic Weisbecker, Matt Fleming, Dave Airlie
[-- Attachment #1: 0001-ring-buffer-fix-check-of-try_to_discard-result.patch --]
[-- Type: text/plain, Size: 994 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The function ring_buffer_discard_commit inversed the code path
of the result of try_to_discard. It should skip incrementing the
entry counter if try_to_discard succeeded. But instead, it increments
the entry conder if it succeeded to discard, and does not increment
it if it fails.
The result of this bug is that filtering will make the stat counters
incorrect.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index bf27bb7..2fd1752 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1785,7 +1785,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
*/
RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing));
- if (!rb_try_to_discard(cpu_buffer, event))
+ if (rb_try_to_discard(cpu_buffer, event))
goto out;
/*
--
1.6.3.3
--
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] ring-buffer: do not disable ring buffer on oops_in_progress
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
2009-08-06 2:52 ` [PATCH 1/3] ring-buffer: fix check of try_to_discard result Steven Rostedt
@ 2009-08-06 2:52 ` Steven Rostedt
2009-08-06 2:52 ` [PATCH 3/3] tracing: do not use functions starting with .L in recordmcount.pl Steven Rostedt
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06 2:52 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
Frederic Weisbecker, Matt Fleming, Dave Airlie
[-- Attachment #1: 0002-ring-buffer-do-not-disable-ring-buffer-on-oops_in_pr.patch --]
[-- Type: text/plain, Size: 1472 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The commit:
commit e0fdace10e75dac67d906213b780ff1b1a4cc360
Author: David Miller <davem@davemloft.net>
Date: Fri Aug 1 01:11:22 2008 -0700
debug_locks: set oops_in_progress if we will log messages.
Otherwise lock debugging messages on runqueue locks can deadlock the
system due to the wakeups performed by printk().
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Will permanently set oops_in_progress on any lockdep failure.
When this triggers it will cause any read from the ring buffer to
permanently disable the ring buffer (not to mention no locking of
printk).
This patch removes the check. It keeps the print in NMI which makes
sense. This is probably OK, since the ring buffer should not cause
something to set oops_in_progress anyway.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2fd1752..2606cee 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2486,7 +2486,7 @@ static inline int rb_ok_to_lock(void)
* buffer too. A one time deal is all you get from reading
* the ring buffer from an NMI.
*/
- if (likely(!in_nmi() && !oops_in_progress))
+ if (likely(!in_nmi()))
return 1;
tracing_off_permanent();
--
1.6.3.3
--
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] tracing: do not use functions starting with .L in recordmcount.pl
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
2009-08-06 2:52 ` [PATCH 1/3] ring-buffer: fix check of try_to_discard result Steven Rostedt
2009-08-06 2:52 ` [PATCH 2/3] ring-buffer: do not disable ring buffer on oops_in_progress Steven Rostedt
@ 2009-08-06 2:52 ` Steven Rostedt
2009-08-06 4:11 ` [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Robert Richter
2009-08-06 12:21 ` Ingo Molnar
4 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06 2:52 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
Frederic Weisbecker, Matt Fleming, Dave Airlie
[-- Attachment #1: 0003-tracing-do-not-use-functions-starting-with-.L-in-rec.patch --]
[-- Type: text/plain, Size: 2769 bytes --]
From: Steven Rostedt <rostedt@goodmis.org>
On Wed, 5 Aug 2009, Ingo Molnar wrote:
> * Dave Airlie <airlied@gmail.com> wrote:
>
> > Hey,
> >
> > So I spent 3-4 hrs today (I'm stupid yes) tracking down a .o
> > breakage by blaming rawhide gcc/binutils as I was using make
> > V=1and seeing only the compiler chain running,
>
> Hm, is this that powerpc related build bug you just reported?
Well we tracked it down and it is powerpc64 specific.
Seems that in drivers/hwmon/lm93.c there's a function called:
LM93_IN_FROM_REG()
But PPC64 has function descriptors and the real function names (the ones
you see in objdump) start with a '.'. Thus this in objdump you have:
Disassembly of section .text:
0000000000000000 <.LM93_IN_FROM_REG>:
0: 7c 08 02 a6 mflr r0
4: fb 81 ff e0 std r28,-32(r1)
The function name used is .LM93_IN_FROM_REG. But gcc considers symbols
that start with ".L" as a special symbol that is used inside the assembly
stage.
The nm passed into recordmcount uses the --synthetic option which shows
the ".L" symbols (my runs outside of the build did not include the
--synthetic option, so my older patch worked). We see the function as a
local.
Now to capture all the locations that use "mcount" we need to have a
reference to link into the object file a list of mcount callers. We need a
reference that will not disappear. We try to use a global function and if
that does not work, we use a local function as a reference. But to relink
the section back into the object, we need to make it global. In this case,
we run objcopy using --globalize-symbol and --localize-symbol to convert
the symbol into a global symbol, link the mcount list, then convert it
back to a local symbol.
This works great except for this case. .L* symbols can not be converted
into a global symbol, and the mcount section referencing it will remain
unresolved.
Reported-by: Dave Airlie <airlied@gmail.com>
LKML-Reference: <alpine.DEB.2.00.0908052011590.5010@gandalf.stny.rr.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
scripts/recordmcount.pl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index d29baa2..4889c44 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -414,7 +414,10 @@ while (<IN>) {
$offset = hex $1;
} else {
# if we already have a function, and this is weak, skip it
- if (!defined($ref_func) && !defined($weak{$text})) {
+ if (!defined($ref_func) && !defined($weak{$text}) &&
+ # PPC64 can have symbols that start with .L and
+ # gcc considers these special. Don't use them!
+ $text !~ /^\.L/) {
$ref_func = $text;
$offset = hex $1;
}
--
1.6.3.3
--
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
` (2 preceding siblings ...)
2009-08-06 2:52 ` [PATCH 3/3] tracing: do not use functions starting with .L in recordmcount.pl Steven Rostedt
@ 2009-08-06 4:11 ` Robert Richter
2009-08-06 12:22 ` Ingo Molnar
2009-08-06 12:21 ` Ingo Molnar
4 siblings, 1 reply; 8+ messages in thread
From: Robert Richter @ 2009-08-06 4:11 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, Ingo Molnar, Andrew Morton, Thomas Gleixner,
Peter Zijlstra, Frederic Weisbecker, Matt Fleming, Dave Airlie
On 05.08.09 22:52:06, Steven Rostedt wrote:
>
> Ingo,
>
> Please pull the latest tip/tracing/urgent tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/urgent
Steven,
if there is the chance I would like to see this fix in -rc6 too (I
know you wanted to test it):
193df82 ring-buffer: Fix advance of reader in rb_buffer_peek()
You can cherry-pick from my oprofile/master tree or linux-next. The
bug throws warnings with oprofile under high loads and I already got
bug reports of this.
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
` (3 preceding siblings ...)
2009-08-06 4:11 ` [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Robert Richter
@ 2009-08-06 12:21 ` Ingo Molnar
4 siblings, 0 replies; 8+ messages in thread
From: Ingo Molnar @ 2009-08-06 12:21 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, Andrew Morton, Thomas Gleixner, Peter Zijlstra,
Frederic Weisbecker, Matt Fleming, Dave Airlie
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo,
>
> Please pull the latest tip/tracing/urgent tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/urgent
>
>
> Steven Rostedt (3):
> ring-buffer: fix check of try_to_discard result
> ring-buffer: do not disable ring buffer on oops_in_progress
> tracing: do not use functions starting with .L in recordmcount.pl
>
> ----
> kernel/trace/ring_buffer.c | 4 ++--
> scripts/recordmcount.pl | 5 ++++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
Pulled, thanks Steve!
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes
2009-08-06 4:11 ` [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Robert Richter
@ 2009-08-06 12:22 ` Ingo Molnar
2009-08-06 19:12 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Ingo Molnar @ 2009-08-06 12:22 UTC (permalink / raw)
To: Robert Richter
Cc: Steven Rostedt, linux-kernel, Andrew Morton, Thomas Gleixner,
Peter Zijlstra, Frederic Weisbecker, Matt Fleming, Dave Airlie
* Robert Richter <robert.richter@amd.com> wrote:
> On 05.08.09 22:52:06, Steven Rostedt wrote:
> >
> > Ingo,
> >
> > Please pull the latest tip/tracing/urgent tree, which can be found at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> > tip/tracing/urgent
>
> Steven,
>
> if there is the chance I would like to see this fix in -rc6 too (I
> know you wanted to test it):
>
> 193df82 ring-buffer: Fix advance of reader in rb_buffer_peek()
>
> You can cherry-pick from my oprofile/master tree or linux-next.
> The bug throws warnings with oprofile under high loads and I
> already got bug reports of this.
i remember having triggered something similar in tests too. I've
cherry-picked it on top of Steve's fixes, for -rc6.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes
2009-08-06 12:22 ` Ingo Molnar
@ 2009-08-06 19:12 ` Steven Rostedt
0 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06 19:12 UTC (permalink / raw)
To: Ingo Molnar
Cc: Robert Richter, linux-kernel, Andrew Morton, Thomas Gleixner,
Peter Zijlstra, Frederic Weisbecker, Matt Fleming, Dave Airlie
On Thu, 6 Aug 2009, Ingo Molnar wrote:
>
> * Robert Richter <robert.richter@amd.com> wrote:
>
> > On 05.08.09 22:52:06, Steven Rostedt wrote:
> > >
> > > Ingo,
> > >
> > > Please pull the latest tip/tracing/urgent tree, which can be found at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> > > tip/tracing/urgent
> >
> > Steven,
> >
> > if there is the chance I would like to see this fix in -rc6 too (I
> > know you wanted to test it):
> >
> > 193df82 ring-buffer: Fix advance of reader in rb_buffer_peek()
> >
> > You can cherry-pick from my oprofile/master tree or linux-next.
> > The bug throws warnings with oprofile under high loads and I
> > already got bug reports of this.
>
> i remember having triggered something similar in tests too. I've
> cherry-picked it on top of Steve's fixes, for -rc6.
Thanks Ingo,
I thought I had this one go out too, but looking at my repo, it's in my 32
queue for some reason. :-/ I must have added it to the wrong queue.
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-08-06 19:12 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
2009-08-06 2:52 ` [PATCH 1/3] ring-buffer: fix check of try_to_discard result Steven Rostedt
2009-08-06 2:52 ` [PATCH 2/3] ring-buffer: do not disable ring buffer on oops_in_progress Steven Rostedt
2009-08-06 2:52 ` [PATCH 3/3] tracing: do not use functions starting with .L in recordmcount.pl Steven Rostedt
2009-08-06 4:11 ` [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Robert Richter
2009-08-06 12:22 ` Ingo Molnar
2009-08-06 19:12 ` Steven Rostedt
2009-08-06 12:21 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox