Skip to content

Commit

Permalink
lttng: timing calibration feature
Browse files Browse the repository at this point in the history
This calibration feature is fairly limited for now, but provides an
example of how this can be performed.

Signed-off-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
compudj authored and gregkh committed Nov 29, 2011
1 parent 6c19da3 commit da66e4e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions drivers/staging/lttng/lttng-calibrate.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* lttng-calibrate.c
*
* Copyright 2011 (c) - Mathieu Desnoyers <[email protected]>
*
* 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;
}

0 comments on commit da66e4e

Please sign in to comment.