Skip to contentSkip to conversation

tracing: Remove obsolete sched_switch selftest

PATCH In review Joel Fernandes 2 participants 2 messages Oct 3, 2017 – Oct 4, 2017 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Remove obsolete sched_switch selftest

Since commit 87d80de2800d087ea833cb79bc13f85ff34ed49f ("tracing: Remove obsolete sched_switch tracer"), the sched_switch selftest is no longer used. This patch removes the same.

---
This is a resend of the same patch:
https://patchwork.kernel.org/patch/9945269/

 kernel/trace/trace.h          |  2 --
 kernel/trace/trace_selftest.c | 32 --------------------------------
 2 files changed, 34 deletions(-)
kernel/trace/trace.h +0 -2
index fb5d54d0d1b3..14778bfecec8 100644
@@ -736,8 +736,6 @@ extern int trace_selftest_startup_wakeup(struct tracer *trace,
 					 struct trace_array *tr);
 extern int trace_selftest_startup_nop(struct tracer *trace,
 					 struct trace_array *tr);
-extern int trace_selftest_startup_sched_switch(struct tracer *trace,
-					       struct trace_array *tr);
 extern int trace_selftest_startup_branch(struct tracer *trace,
 					 struct trace_array *tr);
 /*
kernel/trace/trace_selftest.c +0 -32
index b17ec642793b..364f78abdf47 100644
@@ -1150,38 +1150,6 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr)
 }
 #endif /* CONFIG_SCHED_TRACER */
 
-#ifdef CONFIG_CONTEXT_SWITCH_TRACER
-int
-trace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr)
-{
-	unsigned long count;
-	int ret;
-
-	/* start the tracing */
-	ret = tracer_init(trace, tr);
-	if (ret) {
-		warn_failed_init_tracer(trace, ret);
-		return ret;
-	}
-
-	/* Sleep for a 1/10 of a second */
-	msleep(100);
-	/* stop the tracing. */
-	tracing_stop();
-	/* check the trace buffer */
-	ret = trace_test_buffer(&tr->trace_buffer, &count);
-	trace->reset(tr);
-	tracing_start();
-
-	if (!ret && !count) {
-		printk(KERN_CONT ".. no entries found ..");
-		ret = -1;
-	}
-
-	return ret;
-}
-#endif /* CONFIG_CONTEXT_SWITCH_TRACER */
-
 #ifdef CONFIG_BRANCH_TRACER
 int
 trace_selftest_startup_branch(struct tracer *trace, struct trace_array *tr)
Signature · 1 line
2.14.2.822.g60be5d43e6-goog
maintainer
#1 lore raw
Quoted 8 lines · On Mon, 2 Oct 2017 18:03:37 -0700 Joel Fernandes <[email protected]> wrote:

Since commit 87d80de2800d087ea833cb79bc13f85ff34ed49f ("tracing: Remove obsolete sched_switch tracer"), the sched_switch selftest is no longer used. This patch removes the same.

---

BTW, I already applied this, I was just waiting for an rc to be released that passes my tests ;-)

-- Steve