| 1 | /* test-time-probe.c |
| 2 | * |
| 3 | * Test time spent in a LTTng instrumentation probe. |
| 4 | */ |
| 5 | |
| 6 | |
| 7 | #include <linux/init.h> |
| 8 | #include <linux/module.h> |
| 9 | #include <linux/ltt-core.h> |
| 10 | |
| 11 | static int ltt_test_init(void) |
| 12 | { |
| 13 | printk(KERN_ALERT "test init\n"); |
| 14 | |
| 15 | |
| 16 | |
| 17 | printf(KERN_ALERT "test end\n"); |
| 18 | |
| 19 | return -EAGAIN; /* Fail will directly unload the module */ |
| 20 | } |
| 21 | |
| 22 | static void ltt_test_exit(void) |
| 23 | { |
| 24 | printk(KERN_ALERT "test exit\n"); |
| 25 | } |
| 26 | |
| 27 | module_init(ltt_test_init) |
| 28 | module_exit(ltt_test_exit) |
| 29 | |
| 30 | MODULE_LICENSE("GPL"); |
| 31 | MODULE_AUTHOR("Mathieu Desnoyers"); |
| 32 | MODULE_DESCRIPTION("Linux Trace Toolkit Test"); |
| 33 | |