summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2010-03-26 17:14:32 -0400
committerStan Cox <scox@redhat.com>2010-03-26 17:14:32 -0400
commitb642c901a918a92fdd6b1167ed02dfe4c50cdd3e (patch)
treed84a778e61848003cd48ea6b42db5614d8a26bae /includes
parent7ad76102c4cd18e083ea74abd413332da55426d1 (diff)
downloadsystemtap-steved-b642c901a918a92fdd6b1167ed02dfe4c50cdd3e.tar.gz
systemtap-steved-b642c901a918a92fdd6b1167ed02dfe4c50cdd3e.tar.xz
systemtap-steved-b642c901a918a92fdd6b1167ed02dfe4c50cdd3e.zip
Add kprobe user probe semaphore handling.
Adds stap_kprobe_process_found and stap_kprobe_mmap_found handlers and then the task_finder uses those to set the semaphore values. The probe adds user_path and user_lib which are used by the task_finder to decide what object to sniff. * sdt.h (STAP_SEMAPHORE): Also define for kprobes. * tapsets.cxx (dwarf_derived_probe): Add user_path and user_lib. (dwarf_derived_probe::join_group): Enable task finder for kprobes. (dwarf_derived_probe::dwarf_derived_probe): Set user_path and user_lib. (dwarf_derived_probe_group::emit_module_decls): Emit stap_kprobe_mmap_found, sdt_sem_offset, sdt_sem_address, pathname, and finder declarations. Emit stap_kprobe_process_found and stap_kprobe_mmap_found. (dwarf_derived_probe_group::emit_module_init): Setup task finder. (sdt_query::convert_location): Remove TOK_LIBRARY token. (dwarf_builder::build): Set user_path and user_lib. (kprobe_derived_probe): Add path and library. (kprobe_builder::build): Get process and library params
Diffstat (limited to 'includes')
-rw-r--r--includes/sys/sdt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h
index 39ebfb50..74906783 100644
--- a/includes/sys/sdt.h
+++ b/includes/sys/sdt.h
@@ -29,12 +29,12 @@
#define STAP_PROBE_DATA_(probe,guard,arg) \
__asm__ volatile (".section .probes," ALLOCSEC "\n" \
"\t.balign 8\n" \
- "1:\n\t.asciz " #probe "\n" \
- "\t.balign 4\n" \
+ "1:\n\t.asciz " #probe "\n" \
+ "\t.balign 4\n" \
"\t.int " #guard "\n" \
"\t.balign 8\n" \
- STAP_PROBE_ADDR("1b\n") \
- "\t.balign 8\n" \
+ STAP_PROBE_ADDR("1b\n") \
+ "\t.balign 8\n" \
STAP_PROBE_ADDR(#arg "\n") \
"\t.int 0\n" \
"\t.previous\n")
@@ -42,7 +42,7 @@
#define STAP_PROBE_DATA(probe, guard, arg) \
STAP_PROBE_DATA_(#probe,guard,arg)
-#if defined STAP_HAS_SEMAPHORES && ! defined EXPERIMENTAL_KPROBE_SDT
+#if defined STAP_HAS_SEMAPHORES
#define STAP_SEMAPHORE(probe) \
if (__builtin_expect ( probe ## _semaphore , 0))
#else