diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-10 11:43:08 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-10 11:43:08 +0200 |
commit | ec1bb60bbff0386c3ec25360e7a8c72f467a6ff1 (patch) | |
tree | 893c04336763acd84d575fd713773b882e8bc8a6 /kernel/trace/trace_selftest.c | |
parent | 5373fdbdc1dba69aa956098650f71b731d471885 (diff) | |
parent | 37f5d732f34fa099676b2c52b8a57bab01a011de (diff) | |
download | op-kernel-dev-ec1bb60bbff0386c3ec25360e7a8c72f467a6ff1.zip op-kernel-dev-ec1bb60bbff0386c3ec25360e7a8c72f467a6ff1.tar.gz |
Merge branch 'tracing/sysprof' into auto-ftrace-next
Diffstat (limited to 'kernel/trace/trace_selftest.c')
-rw-r--r-- | kernel/trace/trace_selftest.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 18c5423..0911b7e 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -538,3 +538,26 @@ trace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr return ret; } #endif /* CONFIG_CONTEXT_SWITCH_TRACER */ + +#ifdef CONFIG_SYSPROF_TRACER +int +trace_selftest_startup_sysprof(struct tracer *trace, struct trace_array *tr) +{ + unsigned long count; + int ret; + + /* start the tracing */ + tr->ctrl = 1; + trace->init(tr); + /* Sleep for a 1/10 of a second */ + msleep(100); + /* stop the tracing. */ + tr->ctrl = 0; + trace->ctrl_update(tr); + /* check the trace buffer */ + ret = trace_test_buffer(tr, &count); + trace->reset(tr); + + return ret; +} +#endif /* CONFIG_SYSPROF_TRACER */ |