00001
00002
00003
00004
00005 #define HASH_TABLE_BITS 8
00006 #define HASH_TABLE_SIZE (1<<HASH_TABLE_BITS)
00007 #define BUCKETS 16
00008
00009 #include "runtime.h"
00010 #include "io.c"
00011 #include "probes.c"
00012
00013 MODULE_DESCRIPTION("test jprobes of tasklets");
00014 MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>");
00015
00016 void inst__rcu_process_callbacks(struct rcu_ctrlblk *rcp,
00017 struct rcu_state *rsp, struct rcu_data *rdp)
00018 {
00019 dlog ("interrupt=%d\n", in_interrupt());
00020 jprobe_return();
00021 }
00022
00023 static struct jprobe stp_probes[] = {
00024 {
00025 .kp.addr = (kprobe_opcode_t *)"__rcu_process_callbacks",
00026 .entry = (kprobe_opcode_t *) inst__rcu_process_callbacks
00027 },
00028 };
00029 #define MAX_STP_PROBES (sizeof(stp_probes)/sizeof(struct jprobe))
00030
00031
00032 static int init_stp(void)
00033 {
00034 int ret = _stp_register_jprobes (stp_probes, MAX_STP_PROBES);
00035 dlog("instrumentation is enabled...\n");
00036 return ret;
00037 }
00038
00039 static void cleanup_stp(void)
00040 {
00041 _stp_unregister_jprobes (stp_probes, MAX_STP_PROBES);
00042 dlog ("EXIT\n");
00043 }
00044
00045 module_init(init_stp);
00046 module_exit(cleanup_stp);
00047 MODULE_LICENSE("GPL");
00048