* [PATCH 0/3] [GIT PULL] tracing: various fixes
@ 2009-11-17 17:12 Steven Rostedt
2009-11-17 17:12 ` [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used Steven Rostedt
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Steven Rostedt @ 2009-11-17 17:12 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
Ingo,
This is based on top of tip/tracing/core.
Please pull the latest tip/tracing/core-1 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core-1
Lai Jiangshan (1):
tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
Steven Rostedt (2):
ring-buffer: Move access to commit_page up into function used
tracing: Only print objcopy version warning once from recordmcount
----
Makefile | 1 +
kernel/trace/ftrace.c | 2 +-
kernel/trace/ring_buffer.c | 9 +++------
scripts/recordmcount.pl | 12 ++++++++++--
4 files changed, 15 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
@ 2009-11-17 17:12 ` Steven Rostedt
2009-11-17 17:12 ` [PATCH 2/3] [PATCH 2/3] tracing: Prevent build warning: ftrace_graph_buf defined but not used Steven Rostedt
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2009-11-17 17:12 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
[-- Attachment #1: 0001-ring-buffer-Move-access-to-commit_page-up-into-funct.patch --]
[-- Type: text/plain, Size: 2045 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
With the change of the way we process commits. Where a commit only happens
at the outer most level, and that we don't need to worry about
a commit ending after the rb_start_commit() has been called, the code
use to grab the commit page before the tail page to prevent a possible
race. But this race no longer exists with the rb_start_commit()
rb_end_commit() interface.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 3ffa502..4b8293f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1785,9 +1785,9 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
static struct ring_buffer_event *
rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
unsigned long length, unsigned long tail,
- struct buffer_page *commit_page,
struct buffer_page *tail_page, u64 *ts)
{
+ struct buffer_page *commit_page = cpu_buffer->commit_page;
struct ring_buffer *buffer = cpu_buffer->buffer;
struct buffer_page *next_page;
int ret;
@@ -1890,13 +1890,10 @@ static struct ring_buffer_event *
__rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
unsigned type, unsigned long length, u64 *ts)
{
- struct buffer_page *tail_page, *commit_page;
+ struct buffer_page *tail_page;
struct ring_buffer_event *event;
unsigned long tail, write;
- commit_page = cpu_buffer->commit_page;
- /* we just need to protect against interrupts */
- barrier();
tail_page = cpu_buffer->tail_page;
write = local_add_return(length, &tail_page->write);
@@ -1907,7 +1904,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
/* See if we shot pass the end of this buffer page */
if (write > BUF_PAGE_SIZE)
return rb_move_tail(cpu_buffer, length, tail,
- commit_page, tail_page, ts);
+ tail_page, ts);
/* We reserved something on the buffer */
--
1.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] [PATCH 2/3] tracing: Prevent build warning: ftrace_graph_buf defined but not used
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
2009-11-17 17:12 ` [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used Steven Rostedt
@ 2009-11-17 17:12 ` Steven Rostedt
2009-11-17 17:12 ` [PATCH 3/3] [PATCH 3/3] tracing: Only print objcopy version warning once from recordmcount Steven Rostedt
2009-11-17 17:19 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar
3 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2009-11-17 17:12 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Lai Jiangshan
[-- Attachment #1: 0002-tracing-Prevent-build-warning-ftrace_graph_buf-defin.patch --]
[-- Type: text/plain, Size: 1211 bytes --]
From: Lai Jiangshan <laijs@cn.fujitsu.com>
Prevent build warning when CONFIG_FUNCTION_GRAPH_TRACER is not set.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4AF24381.5060307@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1ed514f..7f9b51e 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2274,7 +2274,6 @@ void ftrace_set_notrace(unsigned char *buf, int len, int reset)
#define FTRACE_FILTER_SIZE COMMAND_LINE_SIZE
static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
-static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
static int __init set_ftrace_notrace(char *str)
{
@@ -2291,6 +2290,7 @@ static int __init set_ftrace_filter(char *str)
__setup("ftrace_filter=", set_ftrace_filter);
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
static int __init set_graph_function(char *str)
{
strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);
--
1.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] [PATCH 3/3] tracing: Only print objcopy version warning once from recordmcount
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
2009-11-17 17:12 ` [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used Steven Rostedt
2009-11-17 17:12 ` [PATCH 2/3] [PATCH 2/3] tracing: Prevent build warning: ftrace_graph_buf defined but not used Steven Rostedt
@ 2009-11-17 17:12 ` Steven Rostedt
2009-11-17 17:19 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar
3 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2009-11-17 17:12 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker, Sam Ravnborg
[-- Attachment #1: 0003-tracing-Only-print-objcopy-version-warning-once-from.patch --]
[-- Type: text/plain, Size: 2605 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
If the user has an older version of objcopy, that can not handle
converting local symbols to global and vice versa, then some
functions will not be part of the dynamic function tracer. The current
code in recordmcount.pl will print a warning in this case. Unfortunately,
there exists lots of files that may have this issue with older objcopys
and this will cause a warning for every file compiled with this
issue.
This patch solves this overwhelming output by creating a
.tmp_quiet_recordmcount file on the first instance the warning is
encountered. The warning will not print if this file exists.
The temp file is deleted at the beginning of the compile to ensure that
the warning will happen once again on new compiles (because the issue
is still present).
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
Makefile | 1 +
scripts/recordmcount.pl | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9425d1d..1c949ac 100644
--- a/Makefile
+++ b/Makefile
@@ -379,6 +379,7 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
PHONY += scripts_basic
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
+ $(Q)rm -f .tmp_quiet_recordmcount
# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index a4e2435..f0d1445 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -162,6 +162,11 @@ my $alignment; # The .align value to use for $mcount_section
my $section_type; # Section header plus possible alignment command
my $can_use_local = 0; # If we can use local function references
+# Shut up recordmcount if user has older objcopy
+my $quiet_recordmcount = ".tmp_quiet_recordmcount";
+my $print_warning = 1;
+$print_warning = 0 if ( -f $quiet_recordmcount);
+
##
# check_objcopy - whether objcopy supports --globalize-symbols
#
@@ -179,10 +184,13 @@ sub check_objcopy
}
close (IN);
- if (!$can_use_local) {
+ if (!$can_use_local && $print_warning) {
print STDERR "WARNING: could not find objcopy version or version " .
"is less than 2.17.\n" .
- "\tLocal function references is disabled.\n";
+ "\tLocal function references are disabled.\n";
+ open (QUIET, ">$quiet_recordmcount");
+ printf QUIET "Disables the warning from recordmcount.pl\n";
+ close QUIET;
}
}
--
1.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] [GIT PULL] tracing: various fixes
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
` (2 preceding siblings ...)
2009-11-17 17:12 ` [PATCH 3/3] [PATCH 3/3] tracing: Only print objcopy version warning once from recordmcount Steven Rostedt
@ 2009-11-17 17:19 ` Ingo Molnar
3 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2009-11-17 17:19 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Frederic Weisbecker
* Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Ingo,
>
> This is based on top of tip/tracing/core.
>
> Please pull the latest tip/tracing/core-1 tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/core-1
>
>
> Lai Jiangshan (1):
> tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
>
> Steven Rostedt (2):
> ring-buffer: Move access to commit_page up into function used
> tracing: Only print objcopy version warning once from recordmcount
>
> ----
> Makefile | 1 +
> kernel/trace/ftrace.c | 2 +-
> kernel/trace/ring_buffer.c | 9 +++------
> scripts/recordmcount.pl | 12 ++++++++++--
> 4 files changed, 15 insertions(+), 9 deletions(-)
Pulled into tip:tracing/core, thanks Steve!
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 0/3] [GIT PULL] tracing: various fixes
@ 2010-05-06 23:04 Steven Rostedt
2010-05-07 6:34 ` Ingo Molnar
0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2010-05-06 23:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, Frederic Weisbecker
Ingo,
Please pull the latest tip/tracing/core tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core
Li Zefan (1):
tracing: Make the documentation clear on trace_event boot option
Steven Rostedt (1):
tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header
Thiago Farina (1):
tracing: Fix "integer as NULL pointer" warning.
----
Documentation/trace/events.txt | 3 +-
include/linux/tracepoint.h | 114 +++++++++++++++++++++-------------------
include/trace/define_trace.h | 5 ++
include/trace/events/napi.h | 10 +++-
kernel/trace/trace_output.c | 2 +-
5 files changed, 75 insertions(+), 59 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] [GIT PULL] tracing: various fixes
2010-05-06 23:04 Steven Rostedt
@ 2010-05-07 6:34 ` Ingo Molnar
0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2010-05-07 6:34 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-kernel, Andrew Morton, Frederic Weisbecker
* Steven Rostedt <rostedt@goodmis.org> wrote:
> Ingo,
>
> Please pull the latest tip/tracing/core tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/core
>
>
> Li Zefan (1):
> tracing: Make the documentation clear on trace_event boot option
>
> Steven Rostedt (1):
> tracing: Fix tracepoint.h DECLARE_TRACE() to allow more than one header
>
> Thiago Farina (1):
> tracing: Fix "integer as NULL pointer" warning.
>
> ----
> Documentation/trace/events.txt | 3 +-
> include/linux/tracepoint.h | 114 +++++++++++++++++++++-------------------
> include/trace/define_trace.h | 5 ++
> include/trace/events/napi.h | 10 +++-
> kernel/trace/trace_output.c | 2 +-
> 5 files changed, 75 insertions(+), 59 deletions(-)
Pulled, thanks Steve!
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-07 6:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 17:12 [PATCH 0/3] [GIT PULL] tracing: various fixes Steven Rostedt
2009-11-17 17:12 ` [PATCH 1/3] [PATCH 1/3] ring-buffer: Move access to commit_page up into function used Steven Rostedt
2009-11-17 17:12 ` [PATCH 2/3] [PATCH 2/3] tracing: Prevent build warning: ftrace_graph_buf defined but not used Steven Rostedt
2009-11-17 17:12 ` [PATCH 3/3] [PATCH 3/3] tracing: Only print objcopy version warning once from recordmcount Steven Rostedt
2009-11-17 17:19 ` [PATCH 0/3] [GIT PULL] tracing: various fixes Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2010-05-06 23:04 Steven Rostedt
2010-05-07 6:34 ` Ingo Molnar
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.