probe test
[lttv.git] / tests / kernel / probe.c
CommitLineData
3bb4bef8 1/* probe.c
2 *
3 * Loads a function at a marker call site.
4 *
5 * (C) Copyright 2006 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
6 *
7 * This file is released under the GPLv2.
8 * See the file COPYING for more details.
9 */
10
11#include <linux/marker.h>
12#include <linux/module.h>
13#include <linux/kallsyms.h>
14
15/* function to install */
16void do_mark1(const char *format, int value)
17{
18 printk("value is %d\n", value);
19}
20
21int init_module(void)
22{
23 return marker_set_probe("subsys_mark1", (marker_probe)do_mark1,
24 MARKER_CALL);
25}
26
27void cleanup_module(void)
28{
29 marker_disable_probe("subsys_mark1", (marker_probe)do_mark1,
30 MARKER_CALL);
31}
32
33MODULE_LICENSE("GPL");
34MODULE_AUTHOR("Mathieu Desnoyers");
35MODULE_DESCRIPTION("Probe");
36
This page took 0.022827 seconds and 4 git commands to generate.