diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2011-11-28 07:42:20 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-29 10:05:06 +0900 |
commit | da66e4e541b21b326a26a36de42f400975da60ac (patch) | |
tree | 2600319a168b28c59c109055517f4850d0868031 | |
parent | 6c19da3578bc0ae0d3a65560b7ac7963a35ea79c (diff) | |
download | op-kernel-dev-da66e4e541b21b326a26a36de42f400975da60ac.zip op-kernel-dev-da66e4e541b21b326a26a36de42f400975da60ac.tar.gz |
lttng: timing calibration feature
This calibration feature is fairly limited for now, but provides an
example of how this can be performed.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/lttng/lttng-calibrate.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/staging/lttng/lttng-calibrate.c b/drivers/staging/lttng/lttng-calibrate.c new file mode 100644 index 0000000..07e3c5b --- /dev/null +++ b/drivers/staging/lttng/lttng-calibrate.c @@ -0,0 +1,30 @@ +/* + * lttng-calibrate.c + * + * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> + * + * LTTng probe calibration. + * + * Dual LGPL v2.1/GPL v2 license. + */ + +#include "ltt-debugfs-abi.h" +#include "ltt-events.h" + +noinline +void lttng_calibrate_kretprobe(void) +{ + asm volatile (""); +} + +int lttng_calibrate(struct lttng_kernel_calibrate *calibrate) +{ + switch (calibrate->type) { + case LTTNG_KERNEL_CALIBRATE_KRETPROBE: + lttng_calibrate_kretprobe(); + break; + default: + return -EINVAL; + } + return 0; +} |