summaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Add kprobe user probe semaphore handling.Stan Cox2010-03-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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
* PR11427: port sdt.h to sparcTom Callaway2010-03-241-1/+1
| | | | * includes/sys/sdt.h (STAP_NOP): Add __sparc__ to list of "nop" users.
* PR11364 sdt.h volatile for args isn't needed with gcc 4.5 or rh 4.4.3-10+Mark Wielaard2010-03-171-6/+4
|
* Be pessimistic about the gcc version as debuginfo has an undependable case ↵Stan Cox2010-03-101-1/+1
| | | | | | (RH572260). * sdt.h (GNUC_VERSION): Check against gcc 4.5.0
* sdt.h: rename volatile-control macro to STAP_SDT_VOLATILE. Document in NEWS.Frank Ch. Eigler2010-03-101-59/+61
|
* Include __GNUC_RH_RELEASE__ in the volatile check.Stan Cox2010-03-091-2/+5
| | | | sdt.h (GNUC_VERSION) Include __GNUC_RH_RELEASE__. Check for at least gcc 4.4.4
* Check the gcc version using polynomial representation.Stan Cox2010-03-091-1/+2
| | | | * sdt.h (GNUC_VERSION): New.
* Only use volatile for sdt.h arguments when needed.Stan Cox2010-03-091-55/+61
| | | | | sdt.h (VOLATILE_ARG): gcc 4.4.3 support for inline asm argument debug info means volatile is not needed.
* Purge sdt utrace support.Stan Cox2010-01-041-6/+3
| | | | | | | | | | | | | | | * sdt.h (UTRACE_SDT): Remove. * tapset-utrace.cxx (utrace_derived_probe): Remove has_library and library. (utrace_derived_probe_group::emit_probe_decl): Remove mmap_callback, sdt_sem_offset, and sdt_sem_address. (utrace_derived_probe_group::emit_module_decls): Remove sdt_sem_offset and sdt_sem_address support. * tapsets.cxx (sdt_var_expanding_visitor): Remove utrace_probe. (sdt_query::handle_query_module) Remove utrace_type. (sdt_query::convert_probe): Likewise. * postgres.exp: Remove utrace testing. * sdt.exp: Likewise. * sdt_misc.exp: Likewise.
* Handle .probes section big endian 32 bit case.Stan Cox2009-12-091-8/+10
| | | | | | sdt.h (STAP_PROBE_ADDR): Add 32 bit big endian case. (STAP_PROBE_DATA_): Use .balign tapsets.cxx (sdt_query::get_next_probe): Stop if there is no probe name.
* Add .library("lib").mark("mark") and use it for .mark semaphores.Stan Cox2009-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | tapset-utrace.cxx (TOK_LIBRARY): New. (utrace_derived_probe::utrace_derived_probe): Add library and has_library. (utrace_builder::build): Handle library. (utrace_derived_probe_group::emit_probe_decl): Add sdt_sem_offset to emitted stap_utrace_probes. Add stap_task_finder_target mmap_callback for handling shared library. Handle sdt_sem_offset in emitted_stp_utrace_probe_cb. Add stap_utrace_mmap_found. (register_tapset_utrace): Handle .library tapset-utrace.cxx (TOK_LIBRARY): New. (base_query::base_query): Add path and has_library. (dwarf_derived_probe::dwarf_derived_probe) Likewise. (dwarf_derived_probe::register_patterns): Handle .library (sdt_query::convert_location): Likewise. (dwarf_builder::build): Likewise. (uprobe_derived_probe_group::emit_module_decls): Emit sdt_sem_address. Add sdt_sem_offset to emitted stap_uprobe_spec. Add offset and vm_flags to signature of stap_uprobe_change_plus, and handle sdt_sem_offset. Allow writeable segments in emitted stap_uprobe_mmap_found. sdt_misc.exp: Test .library util.cxx (find_executable): Add env_path to sig and use it in getenv. util.h (find_executable): Likewise. Make "PATH" the default. dtrace.in (provider): Turn on semaphores. sdt.h: Likewise.
* reorganize app tests; rewrite tcl as sample of improvementsFrank Ch. Eigler2009-10-311-1/+1
| | | | | | | | | | | | | | | * testsuite/configure.ac (--enable-testapps): New option. * testsuite/Makefile.am (TESTAPPS): Pass to dejagnu. * testsuite/systemtap.base/{xulrunner,tcl,mysql,postgres}: Moved under new systemtap.apps/ subdirectory. * testsuite/systemtap.apps/stap-tcl.sh: New file to build tcl. * testsuite/systemtap.apps/stap-tcl.stp: New file to test tcl. * testsuite/systemtap.apps/tcl.exp: New simplified test driver. * dtrace.in: Disable STAP_HAS_SEMAPHORES as they don't work on shlibs yet. * includes/sys/sdt.h (STAP_SEMAPHORE): Include __builtin_expect for unlikely.
* Add DTRACE_PROBE10.Mark Wielaard2009-10-141-0/+2
| | | | | | We already had STAP_PROBE10, but not DTRACE_PROBE10 yet. * includes/sys/sdt.h: Declare DTRACE_PROBE10 as STAP_PROBE10.
* Always mark .probes section as writable.Mark Wielaard2009-09-181-5/+3
| | | | | | | | | Allocated section needs to be writable when creating pic shared objects because we store relocatable addresses in them. We used to make this read only for non-pic executables, but the new semaphore support relies on having a writable .probes section to put the enabled variables in. * includes/sys/sdt.h (ALLOCSEC): Define unconditionally as "aw".
* Whitespace cleanups in sdt.hJosh Stone2009-09-171-60/+60
|
* Ensure that STAP_PROBE behaves like a single statementJosh Stone2009-09-171-43/+22
| | | | | | | | | | It's important for macros like this to appear as a single statement, so they won't break the control flow of the caller. The new STAP_SEMAPHORE macro was breaking this masquerade, but now I've moved it inside of the do-while block. * includes/sys/sdt.h (STAP_SEMAPHORE): Define the disabled case empty. (STAP_PROBE[1-10]_): Move the semaphore inside the do-while block.
* * sdt.h (STAP_SEMAPHORE): New. Add guard to utrace probe points.Stan Cox2009-09-161-4/+32
| | | | | | | | | | | | | | * itrace.h (__access_process_vm): Moved from here... * runtime/access_process_vm.h: New. ...to here. * translate.cxx (translate_pass): Include access_process_vm.h * session.h (sdt_semaphore_addr): New. * tapsets.cxx (sdt_query::record_semaphore): New. Record sdt_semaphore_addr. (uprobe_derived_probe_group::emit_module_decls): Allow for uprobe guard variable to be set and unset. (uprobe_derived_probe_group::emit_module_decls): Likewise. (uprobe_derived_probe_group::emit_module_exit): Likewise. * tapset-utrace.cxx (utrace_derived_probe_group::emit_probe_decl): Likewise. (utrace_derived_probe_group::emit_module_decls): Likewise. (utrace_derived_probe_group::emit_module_exit): Likewise.
* PR10512 Referencing computed goto labels in c++ constructors does work.Mark Wielaard2009-08-181-23/+0
| | | | | | | | PR10533 inlined vars are not always found was fixed which means we no longer need to prevent inlining of the STAP_PROBE macros. * includes/sys/sdt.h (STAP_UNINLINE_LABEL): Removed. (STAP_PROBE[1-9]_): Remove label: and STAP_UNINLINE_LABEL.
* Use nop instructions without parameters on armEugeniy Meshcheryakov2009-08-081-1/+1
| | | | | Fixes FTBFS, see https://buildd.debian.org/fetch.cgi?pkg=systemtap;ver=0.9.9-1;arch=armel;stamp=1249664825
* * tapsets.cxx (dwarf_builder::probe_table::convert_probe):Stan Cox2009-07-201-13/+11
| | | | | | First check kprobe and utrace (did we arrive via stap?) then check if probe arg matches mark("NAME") * sdt.h (STAP_PROBE?_): Use STAP_GUARD for stap check, not gettid.
* PR10381 sdt.h macros create relocatable addresses in non-writable section.Mark Wielaard2009-07-101-1/+9
| | | | | | | | Allocated section needs to be writable when creating pic shared objects because we store relocatable addresses in them. * includes/sys/sdt.h (ALLOCSEC): New macro, depends on __PIC__. (STAP_PROBE_DATA_): Use new ALLOCSEC macro.
* Clarify sdt.h license for public domain.Stan Cox2009-07-081-1/+1
|
* Do not use GPL for sdt.h.Stan Cox2009-07-081-5/+1
|
* Correctly find probes for -m32 executables.Stan Cox2009-06-191-0/+1
| | | | | | | * sdt.h (STAP_PROBE_DATA_): Pad with 0 so final probe entry doesn't pickup a stray word. * sdt_misc.exp (static_user_markers.{c,d}): Add bstruct to test struct type handling
* Cast STAP_PROBE1 parameter.Stan Cox2009-06-181-4/+4
| | | | * sdt.h (STAP_PROBE1): Add cast of parm1 for narrower signed types.
* Add experimental utrace/kprobe sdt supportStan Cox2009-06-151-123/+285
| | | | | | | | | | | | * sdt.h (EXPERIMENTAL_UTRACE_SDT, EXPERIMENTAL_KPROBE_SDT): New probe point macros. * dtrace: Add support for creating type debug info, currently invoked with --types. * tapsets.cxx (probe_table::convert_probe): New. (probe_table::convert_location): New. (dwarf_builder::build): Use it to simplify probe point handling. * sdt.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace. * static_uprobes.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace.
* PR10172 sdt.h on powerpc Error: junk at end of line: `0'Mark Wielaard2009-05-201-1/+1
| | | | | | * includes/sys/sdt.h (STAP_NOP): __powerpc__ doesn't want an extra 0. Tested-by: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
* PR10139 Mark .probes section SHF_ALLOC.Mark Wielaard2009-05-141-1/+2
| | | | | | * includes/sys/sdt.h (STAP_PROBE_DATA_): Mark .probes section SHF_ALLOC. * tapsets.cxx (dwarf_builder::build): Search in either dwarf or main elf file for .probes section.
* Avoid a uprobe break setting problem by avoiding 'nop 0' on x86.Stan Cox2009-04-231-11/+17
| | | | | * sdt.h (STAP_NOP): New. (STAP_PROBE): Use it.
* Avoid 64 bit address value on a 32 bit machine.Stan Cox2009-04-221-2/+8
| | | | | * sdt.h (STAP_PROBE_ADDR): New. (STAP_PROBE_DATA_): Use it.
* Make sdt.h big endian aware.Stan Cox2009-04-221-13/+13
| | | | | | * sdt.h: Use .quad instead of .long for .probe section addresses. ia64 and s390 require 'nop 0' and x86 tolerates it. * tapsets.cxx (build): Fetch probe_name in a big endian friendly fashion.
* Use alloca trick to keep argN active on GCC 4.1.Stan Cox2009-04-011-14/+34
| | | | | | * includes/sys/sdt.h (STAP_UNINLINE): New. (STAP_UNINLINE_LABEL): New. static_uprobes.exp: Match using charset instead of .*
* Use read operand "g" constraints.Stan Cox2009-03-241-10/+10
| | | | | * includes/sdt.h (STAP_PROBEN): Use R "g" instead of RW "+rm" which can result in "read-only variable arg1 used as asm output"
* Keep static probe parameters visible while inlining.Stan Cox2009-03-241-94/+123
| | | | | | | | * includes/sys/sdt.h (STAP_PROBEN): Revive the STAP_LABEL macro to prevent inlining to keep probe parameters visible. Use +rm constraints. * tapsets.cxx (build): Use .probes section for all uses of static probes.
* Make .probes 32 bit aware and simplify label handling.Stan Cox2009-03-231-62/+56
| | | | | | * includes/sys/sdt.h (STAP_PROBE_DATA_): Use gas local labels which avoids a mysql problem when a function containing a probe is inlined. Make the data placement 32 bit aware.
* Define static user probe point using asm instead of c.Stan Cox2009-03-201-73/+50
| | | | | | | | | * includes/sys/sdt.h (STAP_PROBE_DATA): New. Define the probe point using asm instead of c. (STAP_PROBEN): Use it. * testsuite/systemtap.base/sdt.exp: Continue if a compile fails. * testsuite/systemtap.base/static_uprobes.exp: Don't test setting probe without .probes section.
* improve sdt.h compatibility and test suiteFrank Ch. Eigler2009-03-111-20/+20
| | | | | | Replaced cpp VA_ARGS in sdt.h with explicit enumeration of arguments (since with -pedantic, cpp has no varargs), and added a few more cflags variants to the sdt.exp test case.
* Ensure args are available for postgres static probes.Stan Cox2009-03-101-25/+25
| | | | * includes/sys/sdt.h: Couple asm with its arg declaration.
* Use alternate keywords for sdt.hStan Cox2009-03-091-136/+92
| | | | * include/sys/sdt.h: Initialize args when declaring. Use alternate keywords.
* Include sys/types.h in sdt.h for __uint64_t.Mark Wielaard2009-03-091-0/+1
| | | | * includes/sys/sdt.h: Add #include <sys/types.h>.
* Put statements after declaration in sdt macros. Fix arg10 assignment.Mark Wielaard2009-03-091-85/+140
| | | | * includes/sys/sdt.h: Assign args, after declaration.
* Only use plain C comments in sdt.h.Mark Wielaard2009-03-091-10/+11
| | | | includes/sys/sdt.h: Replace c++ comments with plain C comments.
* Remove extra semi-colons from defines in sdt.h.Mark Wielaard2009-03-091-3/+3
| | | | | * includes/sys/sdt.h (STAP_PROBE_STRUCT_ARG): Remove ending semi-colon. (STAP_LABEL_REF): Likewise.
* STAP_PROBE takes no extra arguments.Mark Wielaard2009-03-061-2/+2
| | | | * includes/sys/sdt.h (STAP_PROBE): Don't add __VA_ARGS__.
* Create unique named labels.Stan Cox2009-03-061-65/+94
| | | | | * includes/sys/sdt.h (STAP_PROBEN_): New macros that take advantage of __COUNTER__
* Allow the same static user probe to be used multiple times per line.Stan Cox2009-03-021-15/+41
| | | | | * dtrace (provider): Add STAP_PROBE10. * includes/sys/sdt.h: Likewise. Convert labels to __label__
* Always emit .probes section; use .label method as a backup strategyStan Cox2009-02-181-12/+5
|
* use "X" asm constraint for user-space marker parmsFrank Ch. Eigler2009-02-171-5/+5
|
* Move sdt.h to includes/sys and use in tests.Mark Wielaard2009-02-171-0/+180