public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 03/12 -next] tracing: Fix selftest function recursion accounting
Date: Wed, 23 Jan 2013 15:30:05 -0500	[thread overview]
Message-ID: <20130123203433.708031234@goodmis.org> (raw)
In-Reply-To: 20130123203002.957226869@goodmis.org

[-- Attachment #1: 0003-tracing-Fix-selftest-function-recursion-accounting.patch --]
[-- Type: text/plain, Size: 1560 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The test that checks function recursion does things differently
if the arch does not support all ftrace features. But that really
doesn't make a difference with how the test runs, and either way
the count variable should be 2 at the end.

Currently the test wrongly fails for archs that don't support all
the ftrace features.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace_selftest.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 6c62d58..adb008a 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -452,7 +452,6 @@ trace_selftest_function_recursion(void)
 	char *func_name;
 	int len;
 	int ret;
-	int cnt;
 
 	/* The previous test PASSED */
 	pr_cont("PASSED\n");
@@ -510,19 +509,10 @@ trace_selftest_function_recursion(void)
 
 	unregister_ftrace_function(&test_recsafe_probe);
 
-	/*
-	 * If arch supports all ftrace features, and no other task
-	 * was on the list, we should be fine.
-	 */
-	if (!ftrace_nr_registered_ops() && !FTRACE_FORCE_LIST_FUNC)
-		cnt = 2; /* Should have recursed */
-	else
-		cnt = 1;
-
 	ret = -1;
-	if (trace_selftest_recursion_cnt != cnt) {
-		pr_cont("*callback not called expected %d times (%d)* ",
-			cnt, trace_selftest_recursion_cnt);
+	if (trace_selftest_recursion_cnt != 2) {
+		pr_cont("*callback not called expected 2 times (%d)* ",
+			trace_selftest_recursion_cnt);
 		goto out;
 	}
 
-- 
1.7.10.4



  parent reply	other threads:[~2013-01-23 20:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 20:30 [PATCH 00/12 -next] [for linux-next] ftrace: Recursion protection and speed up Steven Rostedt
2013-01-23 20:30 ` [PATCH 01/12 -next] tracing: Remove trace.h header from trace_clock.c Steven Rostedt
2013-01-23 20:30 ` [PATCH 02/12 -next] tracing: Fix race with max_tr and changing tracers Steven Rostedt
2013-01-23 20:30 ` Steven Rostedt [this message]
2013-01-23 20:30 ` [PATCH 04/12 -next] ftrace: Fix global function tracers that are not recursion safe Steven Rostedt
2013-01-23 20:30 ` [PATCH 05/12 -next] ftrace: Fix function tracing recursion self test Steven Rostedt
2013-01-23 20:30 ` [PATCH 06/12 -next] ftrace: Optimize the function tracer list loop Steven Rostedt
2013-01-23 20:30 ` [PATCH 07/12 -next] ftrace: Add context level recursion bit checking Steven Rostedt
2013-01-23 20:30 ` [PATCH 08/12 -next] tracing: Make the trace recursion bits into enums Steven Rostedt
2013-01-23 20:30 ` [PATCH 09/12 -next] tracing: Avoid unnecessary multiple recursion checks Steven Rostedt
2013-01-23 20:30 ` [PATCH 10/12 -next] ftrace: Use only the preempt version of function tracing Steven Rostedt
2013-01-23 20:30 ` [PATCH 11/12 -next] ring-buffer: User context bit recursion checking Steven Rostedt
2013-01-23 20:30 ` [PATCH 12/12 -next] ring-buffer: Remove trace.h from ring_buffer.c Steven Rostedt

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=20130123203433.708031234@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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