Cleanup: Move all source files to src/
[lttng-modules.git] / src / lttng-calibrate.c
diff --git a/src/lttng-calibrate.c b/src/lttng-calibrate.c
new file mode 100644 (file)
index 0000000..3886319
--- /dev/null
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * lttng-calibrate.c
+ *
+ * LTTng probe calibration.
+ *
+ * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#include <lttng/abi.h>
+#include <lttng/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;
+}
This page took 0.022982 seconds and 4 git commands to generate.