From da66e4e541b21b326a26a36de42f400975da60ac Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 28 Nov 2011 07:42:20 -0500 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lttng/lttng-calibrate.c | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 drivers/staging/lttng/lttng-calibrate.c diff --git a/drivers/staging/lttng/lttng-calibrate.c b/drivers/staging/lttng/lttng-calibrate.c new file mode 100644 index 00000000000..07e3c5b3415 --- /dev/null +++ b/drivers/staging/lttng/lttng-calibrate.c @@ -0,0 +1,30 @@ +/* + * lttng-calibrate.c + * + * Copyright 2011 (c) - Mathieu Desnoyers + * + * 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; +} -- 2.39.5