]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lttng: timing calibration feature
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 28 Nov 2011 12:42:20 +0000 (07:42 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 29 Nov 2011 01:05:06 +0000 (10:05 +0900)
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>
drivers/staging/lttng/lttng-calibrate.c [new file with mode: 0644]

diff --git a/drivers/staging/lttng/lttng-calibrate.c b/drivers/staging/lttng/lttng-calibrate.c
new file mode 100644 (file)
index 0000000..07e3c5b
--- /dev/null
@@ -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;
+}