page = list_entry(data->trace_pages.next, struct page, lru);
entries = page_address(page);
+ check_pages(data);
if (head_page(data) != entries)
goto failed;
int ret;
int save_ftrace_enabled = ftrace_enabled;
int save_tracer_enabled = tracer_enabled;
+ char *func_name;
/* The ftrace test PASSED */
printk(KERN_CONT "PASSED\n");
return ret;
}
+ /*
+ * Some archs *cough*PowerPC*cough* add charachters to the
+ * start of the function names. We simply put a '*' to
+ * accomodate them.
+ */
+ func_name = "*" STR(DYN_FTRACE_TEST_NAME);
+
/* filter only on our function */
- ftrace_set_filter(STR(DYN_FTRACE_TEST_NAME),
- sizeof(STR(DYN_FTRACE_TEST_NAME)), 1);
+ ftrace_set_filter(func_name, strlen(func_name), 1);
/* enable tracing */
tr->ctrl = 1;
#ifdef CONFIG_SCHED_TRACER
static int trace_wakeup_test_thread(void *data)
{
- struct completion *x = data;
-
/* Make this a RT thread, doesn't need to be too high */
+ struct sched_param param = { .sched_priority = 5 };
+ struct completion *x = data;
- rt_mutex_setprio(current, MAX_RT_PRIO - 5);
+ sched_setscheduler(current, SCHED_FIFO, ¶m);
/* Make it know we have a new prio */
complete(x);