From 33776f4955fa52ae3e4dc87ab6ac484a3ebc9a71 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 21 Mar 2005 21:47:54 +0000 Subject: *** empty log message *** --- runtime/docs/html/probes_8c-source.html | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 runtime/docs/html/probes_8c-source.html (limited to 'runtime/docs/html/probes_8c-source.html') diff --git a/runtime/docs/html/probes_8c-source.html b/runtime/docs/html/probes_8c-source.html new file mode 100644 index 00000000..58c3fa98 --- /dev/null +++ b/runtime/docs/html/probes_8c-source.html @@ -0,0 +1,85 @@ + + +SystemTap: SystemTap Runtime Library + + +
Intro | Functions | Defines | Enumerations | Enumeration Values
+ + +

probes.c

Go to the documentation of this file.
00001 /* -*- linux-c -*- */
+00002 
+00012 static unsigned long (*_stp_lookup_name)(char *name)=(void *)KALLSYMS_LOOKUP_NAME;
+00013 
+00014 void _stp_unregister_jprobes (struct jprobe *probes, int num_probes)
+00015 {
+00016         int i;
+00017         for (i = 0; i < num_probes; i++)
+00018                 unregister_jprobe(&probes[i]);
+00019         dlog ("All jprobes removed\n");
+00020 }
+00021 
+00022 int _stp_register_jprobes (struct jprobe *probes, int num_probes)
+00023 {
+00024         int i, ret ;
+00025         unsigned long addr;
+00026 
+00027         for (i = 0; i < num_probes; i++) {
+00028                 addr =_stp_lookup_name((char *)probes[i].kp.addr);
+00029                 if (addr == 0) {
+00030                         dlog ("ERROR: function %s not found!\n", 
+00031                               (char *)probes[i].kp.addr);
+00032                         ret = -1; /* FIXME */
+00033                         goto out;
+00034                 }
+00035                 dlog("inserting jprobe at %s (%p)\n", probes[i].kp.addr, addr);
+00036                 probes[i].kp.addr = (kprobe_opcode_t *)addr;
+00037                 ret = register_jprobe(&probes[i]);
+00038                 if (ret)
+00039                         goto out;
+00040         }
+00041         return 0;
+00042 out:
+00043         dlog ("probe module initialization failed.  Exiting...\n");
+00044         _stp_unregister_jprobes(probes, i);
+00045         return ret;
+00046 }
+00047 
+00048 void _stp_unregister_kprobes (struct kprobe *probes, int num_probes)
+00049 {
+00050         int i;
+00051         for (i = 0; i < num_probes; i++)
+00052                 unregister_kprobe(&probes[i]);
+00053         dlog ("All kprobes removed\n");
+00054 }
+00055 
+00056 int _stp_register_kprobes (struct kprobe *probes, int num_probes)
+00057 {
+00058         int i, ret ;
+00059         unsigned long addr;
+00060 
+00061         for (i = 0; i < num_probes; i++) {
+00062                 addr =_stp_lookup_name((char *)probes[i].addr);
+00063                 if (addr == 0) {
+00064                         dlog ("ERROR: function %s not found!\n", 
+00065                               (char *)probes[i].addr);
+00066                         ret = -1; /* FIXME */
+00067                         goto out;
+00068                 }
+00069                 dlog("inserting kprobe at %s (%p)\n", probes[i].addr, addr);
+00070                 probes[i].addr = (kprobe_opcode_t *)addr;
+00071                 ret = register_kprobe(&probes[i]);
+00072                 if (ret)
+00073                         goto out;
+00074         }
+00075         return 0;
+00076 out:
+00077         dlog ("probe module initialization failed.  Exiting...\n");
+00078         _stp_unregister_kprobes(probes, i);
+00079         return ret;
+00080 }
+00081 
+

Generated on Mon Mar 21 13:29:45 2005 for SystemTap by  + +doxygen 1.4.1
+ + -- cgit