From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 5/8] ftrace: Remove FTRACE_FL_CONVERTED flag
Date: Sat, 30 Apr 2011 11:30:45 -0400 [thread overview]
Message-ID: <20110430153211.446711323@goodmis.org> (raw)
In-Reply-To: <20110430153040.354378898@goodmis.org>
[-- Attachment #1: 0005-ftrace-Remove-FTRACE_FL_CONVERTED-flag.patch --]
[-- Type: text/plain, Size: 1830 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
Since we disable all function tracer processing if we detect
that a modification of a instruction had failed, we do not need
to track that the record has failed. No more ftrace processing
is allowed, and the FTRACE_FL_CONVERTED flag is pointless.
The FTRACE_FL_CONVERTED flag was used to denote records that were
successfully converted from mcount calls into nops. But if a single
record fails, all of ftrace is disabled.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/ftrace.h | 1 -
kernel/trace/ftrace.c | 12 ++++--------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 2a195ff..3204744 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -150,7 +150,6 @@ enum {
FTRACE_FL_FILTER = (1 << 1),
FTRACE_FL_ENABLED = (1 << 2),
FTRACE_FL_NOTRACE = (1 << 3),
- FTRACE_FL_CONVERTED = (1 << 4),
};
struct dyn_ftrace {
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index eb19fae..9abaaf4 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1087,12 +1087,8 @@ static void ftrace_replace_code(int enable)
return;
do_for_each_ftrace_rec(pg, rec) {
- /*
- * Skip over free records, records that have
- * failed and not converted.
- */
- if (rec->flags & FTRACE_FL_FREE ||
- !(rec->flags & FTRACE_FL_CONVERTED))
+ /* Skip over free records */
+ if (rec->flags & FTRACE_FL_FREE)
continue;
failed = __ftrace_replace_code(rec, enable);
@@ -1280,10 +1276,10 @@ static int ftrace_update_code(struct module *mod)
*/
if (!ftrace_code_disable(mod, p)) {
ftrace_free_rec(p);
- continue;
+ /* Game over */
+ break;
}
- p->flags |= FTRACE_FL_CONVERTED;
ftrace_update_cnt++;
/*
--
1.7.2.3
next prev parent reply other threads:[~2011-04-30 15:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 15:30 [PATCH 0/8] [GIT PULL][2.6.40] ftrace: cleanups Steven Rostedt
2011-04-30 15:30 ` [PATCH 1/8] ftrace: Make FTRACE_WARN_ON() work in if condition Steven Rostedt
2011-04-30 15:30 ` [PATCH 2/8] ftrace: Remove unnecessary disabling of irqs Steven Rostedt
2011-04-30 15:30 ` [PATCH 3/8] ftrace: Remove failures file Steven Rostedt
2011-04-30 15:30 ` [PATCH 4/8] ftrace: Remove FTRACE_FL_FAILED flag Steven Rostedt
2011-04-30 15:30 ` Steven Rostedt [this message]
2011-04-30 15:30 ` [PATCH 6/8] ftrace: Move record update for normal and modules into a separate function Steven Rostedt
2011-04-30 15:30 ` [PATCH 7/8] ftrace: Consolidate updating of ftrace_trace_function Steven Rostedt
2011-04-30 15:30 ` [PATCH 8/8] ftrace: Consolidate the function match routines for normal and mods Steven Rostedt
2011-05-01 17:36 ` [PATCH 0/8] [GIT PULL][2.6.40] ftrace: cleanups Ingo Molnar
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=20110430153211.446711323@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--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
all inboxes | Powered by JetHome®