From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
Wenji Huang <wenji.huang@oracle.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 4/6] tracing: fix the return value of trace selftest
Date: Tue, 17 Feb 2009 13:20:52 -0500 [thread overview]
Message-ID: <20090217182125.734313782@goodmis.org> (raw)
In-Reply-To: 20090217182048.233060814@goodmis.org
[-- Attachment #1: 0004-tracing-fix-the-return-value-of-trace-selftest.patch --]
[-- Type: text/plain, Size: 1383 bytes --]
From: Wenji Huang <wenji.huang@oracle.com>
This patch is to fix the return value of trace_selftest_startup_sysprof
and trace_selftest_startup_branch on failure.
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace_selftest.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 0c9aa14..c72e749 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -622,7 +622,7 @@ trace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr)
ret = tracer_init(trace, tr);
if (ret) {
warn_failed_init_tracer(trace, ret);
- return 0;
+ return ret;
}
/* Sleep for a 1/10 of a second */
@@ -634,6 +634,11 @@ trace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr)
trace->reset(tr);
tracing_start();
+ if (!ret && !count) {
+ printk(KERN_CONT ".. no entries found ..");
+ ret = -1;
+ }
+
return ret;
}
#endif /* CONFIG_SYSPROF_TRACER */
@@ -661,6 +666,11 @@ trace_selftest_startup_branch(struct tracer *trace, struct trace_array *tr)
trace->reset(tr);
tracing_start();
+ if (!ret && !count) {
+ printk(KERN_CONT ".. no entries found ..");
+ ret = -1;
+ }
+
return ret;
}
#endif /* CONFIG_BRANCH_TRACER */
--
1.5.6.5
--
next prev parent reply other threads:[~2009-02-17 18:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 18:20 [PATCH 0/6] [git pull] updates for tip/tracing/ftrace Steven Rostedt
2009-02-17 18:20 ` [PATCH 1/6] ftrace: clean up coding style Steven Rostedt
2009-02-17 18:20 ` [PATCH 2/6] ftrace: rename _hook to _probe Steven Rostedt
2009-02-17 18:20 ` [PATCH 3/6] tracing: use the more proper parameter Steven Rostedt
2009-02-17 18:20 ` Steven Rostedt [this message]
2009-02-17 18:20 ` [PATCH 5/6] tracing: fix typing mistake in hint message and comments Steven Rostedt
2009-02-17 18:20 ` [PATCH 6/6] ftrace: show unlimited when traceon or traceoff has no counter Steven Rostedt
2009-02-18 1:29 ` Steven Rostedt
2009-02-18 0:09 ` [PATCH 0/6] [git pull] updates for tip/tracing/ftrace Ingo Molnar
2009-02-18 8:40 ` Ingo Molnar
2009-02-18 8:57 ` Ingo Molnar
2009-02-18 9:30 ` Ingo Molnar
2009-02-18 17:06 ` Steven Rostedt
2009-02-18 18:19 ` Ingo Molnar
2009-02-18 14:20 ` Frederic Weisbecker
2009-02-18 16:35 ` Frederic Weisbecker
2009-02-19 8:17 ` Ingo Molnar
2009-02-19 9:16 ` Ingo Molnar
2009-02-19 11:15 ` 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=20090217182125.734313782@goodmis.org \
--to=rostedt@goodmis.org \
--cc=acme@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=lclaudio@uudg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
--cc=wenji.huang@oracle.com \
/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