* [PATCH 1/6] tracing: fix event_subsystem ref counting
[not found] <20111206014110.079874115@goodmis.org>
@ 2011-12-06 1:41 ` Steven Rostedt
2011-12-06 1:41 ` [PATCH 3/6] ftrace: Remove force undef config value left for testing Steven Rostedt
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2011-12-06 1:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, stable, Ilya Dryomov
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
From: Ilya Dryomov <idryomov@gmail.com>
Fix a bug introduced by e9dbfae5, which prevents event_subsystem from
ever being released.
Ref_count was added to keep track of subsystem users, not for counting
events. Subsystem is created with ref_count = 1, so there is no need to
increment it for every event, we have nr_events for that. Fix this by
touching ref_count only when we actually have a new user -
subsystem_open().
Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Link: http://lkml.kernel.org/r/1320052062-7846-1-git-send-email-idryomov@gmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_events.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 581876f..c212a7f 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1078,7 +1078,6 @@ event_subsystem_dir(const char *name, struct dentry *d_events)
/* First see if we did not already create this dir */
list_for_each_entry(system, &event_subsystems, list) {
if (strcmp(system->name, name) == 0) {
- __get_system(system);
system->nr_events++;
return system->entry;
}
--
1.7.7.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/6] ftrace: Remove force undef config value left for testing
[not found] <20111206014110.079874115@goodmis.org>
2011-12-06 1:41 ` [PATCH 1/6] tracing: fix event_subsystem ref counting Steven Rostedt
@ 2011-12-06 1:41 ` Steven Rostedt
2011-12-06 1:41 ` [PATCH 4/6] jump_label: jump_label_inc may return before the code is patched Steven Rostedt
2011-12-06 1:41 ` [PATCH 5/6] perf: Fix parsing of __print_flags() in TP_printk() Steven Rostedt
3 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2011-12-06 1:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, stable, Rabin Vincent
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
A forced undef of a config value was used for testing and was
accidently left in during the final commit. This causes x86 to
run slower than needed while running function tracing as well
as causes the function graph selftest to fail when DYNMAIC_FTRACE
is not set. This is because the code in MCOUNT expects the ftrace
code to be processed with the config value set that happened to
be forced not set.
The forced config option was left in by:
commit 6331c28c962561aee59e5a493b7556a4bb585957
ftrace: Fix dynamic selftest failure on some archs
Link: http://lkml.kernel.org/r/20111102150255.GA6973@debian
Cc: stable@vger.kernel.org
Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 900b409..1276b3c 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -152,7 +152,6 @@ void clear_ftrace_function(void)
ftrace_pid_function = ftrace_stub;
}
-#undef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
#ifndef CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST
/*
* For those archs that do not test ftrace_trace_stop in their
--
1.7.7.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/6] jump_label: jump_label_inc may return before the code is patched
[not found] <20111206014110.079874115@goodmis.org>
2011-12-06 1:41 ` [PATCH 1/6] tracing: fix event_subsystem ref counting Steven Rostedt
2011-12-06 1:41 ` [PATCH 3/6] ftrace: Remove force undef config value left for testing Steven Rostedt
@ 2011-12-06 1:41 ` Steven Rostedt
2011-12-06 1:41 ` [PATCH 5/6] perf: Fix parsing of __print_flags() in TP_printk() Steven Rostedt
3 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2011-12-06 1:41 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Andrew Morton, stable, Peter Zijlstra, Jason Baron,
Gleb Natapov
[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]
From: Gleb Natapov <gleb@redhat.com>
If cpu A calls jump_label_inc() just after atomic_add_return() is
called by cpu B, atomic_inc_not_zero() will return value greater then
zero and jump_label_inc() will return to a caller before jump_label_update()
finishes its job on cpu B.
Link: http://lkml.kernel.org/r/20111018175551.GH17571@redhat.com
Cc: stable@vger.kernel.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/jump_label.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index bbdfe2a..66ff710 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -66,8 +66,9 @@ void jump_label_inc(struct jump_label_key *key)
return;
jump_label_lock();
- if (atomic_add_return(1, &key->enabled) == 1)
+ if (atomic_read(&key->enabled) == 0)
jump_label_update(key, JUMP_LABEL_ENABLE);
+ atomic_inc(&key->enabled);
jump_label_unlock();
}
--
1.7.7.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 5/6] perf: Fix parsing of __print_flags() in TP_printk()
[not found] <20111206014110.079874115@goodmis.org>
` (2 preceding siblings ...)
2011-12-06 1:41 ` [PATCH 4/6] jump_label: jump_label_inc may return before the code is patched Steven Rostedt
@ 2011-12-06 1:41 ` Steven Rostedt
3 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2011-12-06 1:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Andrew Morton, stable, Andrew Vagin
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
A update is made to the sched:sched_switch event that adds some
logic to the first parameter of the __print_flags() that shows the
state of tasks. This change cause perf to fail parsing the flags.
A simple fix is needed to have the parser be able to process ops
within the argument.
Cc: stable@vger.kernel.org
Reported-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/perf/util/trace-event-parse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 0a7ed5b..6c164dc 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -1537,6 +1537,8 @@ process_flags(struct event *event, struct print_arg *arg, char **tok)
field = malloc_or_die(sizeof(*field));
type = process_arg(event, field, &token);
+ while (type == EVENT_OP)
+ type = process_op(event, field, &token);
if (test_type_token(type, token, EVENT_DELIM, ","))
goto out_free;
--
1.7.7.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-06 1:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20111206014110.079874115@goodmis.org>
2011-12-06 1:41 ` [PATCH 1/6] tracing: fix event_subsystem ref counting Steven Rostedt
2011-12-06 1:41 ` [PATCH 3/6] ftrace: Remove force undef config value left for testing Steven Rostedt
2011-12-06 1:41 ` [PATCH 4/6] jump_label: jump_label_inc may return before the code is patched Steven Rostedt
2011-12-06 1:41 ` [PATCH 5/6] perf: Fix parsing of __print_flags() in TP_printk() Steven Rostedt
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).