summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Test that all of the set_kernel_* functions workJosh Stone2010-04-013-0/+107
| | | | | * testsuite/buildok/set_kernel.stp: Test that all can build. * testsuite/systemtap.base/set_kernel.stp: Test that values are all set.
* PR9958: Test that the guru notation is workingJosh Stone2010-04-012-0/+8
| | | | | * testsuite/semko/gurufunc.stp: Test rejection without -g. * testsuite/semok/gurufunc.stp: Test acceptance with -g.
* Add kernel-writing functions for guru onlyJosh Stone2010-04-012-0/+128
| | | | | * runtime/loc2c-runtime.h (store_deref_string): New. * tapset/conversions-guru.stp (set_kernel_*): New guru functions.
* PR9958: Let embedded-C assert guru modeJosh Stone2010-04-011-0/+5
| | | | | * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Don't allow calling /* guru */ functions unless guru mode is active.
* Make sure that the testsuite can find its serverJosh Stone2010-03-311-0/+7
| | | | | * testsuite/lib/systemtap.exp (setup_server): Use stap-find-servers to check that the firewall is letting us through to the server.
* Use a different PATH approach for pfilesJosh Stone2010-03-311-5/+2
| | | | | | | //bin/true && exec stap -g $0 ${1+"$@"} This keeps it as an entirely valid stap script, so manual stap invocation still works (as in pfiles.meta).
* Use a wider cache for simple function lookupsJosh Stone2010-03-303-3/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have many individual function lookups, like the nearly 1000 with syscall.*, each one will iterate every CU in the module (M) and then do a cache lookup in N entries. That's a thousand MlogN lookups. We can instead keep the functions in a module-wide map, and then the complexity is just a thousand logMN lookups. Before: $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s), 0 global(s) using 245872virt/147304res/78272shr kb, in 1390usr/60sys/1448real ms. After: $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s), 0 global(s) using 246228virt/147616res/78276shr kb, in 720usr/60sys/782real ms. * dwflpp.cxx (dwflpp::iterate_single_function): Do a simple function lookup based on a module-wide cache. (dwflpp::mod_function_caching_callback): Helper for above. * tapsets.cxx (dwarf_query::query_module_functions): Query a single function from the module-wide cache. (dwarf_query::query_module_dwarf): Use above for simple cases.
* Remove unused code from iterate_over_functionsJosh Stone2010-03-303-14/+3
| | | | | | * dwflpp.cxx (dwflpp::iterate_over_functions): No caller is using has_statement_num anymore (since 6b517475), so kill it. * tapsets.cxx (query_cu): Let the default call rule the day.
* PR 9871 (partial) fix. Removed some embedded-C in ioblock.stp/vfs.stp.David Smith2010-03-304-29/+42
| | | | | | | | | * tapset/dev.stp: Added a bdevname() script function. * tapset/ioblock.stp: Rewrote the embedded-C devname function to just use bdevname() script function. * tapset/vfs.stp: Removed embedded-C __bdevname() C function. Calls bdevname() script function instead. * tapset/string.stp: Added isdigit() function.
* testsuite: convert pfiles.stp to $PATH-based stap invocation formFrank Ch. Eigler2010-03-301-1/+7
|
* testsuite: use #! /usr/bin/env stap instead of /usr/bin/stapFrank Ch. Eigler2010-03-302-2/+2
|
* Add documentation about Flight Recorder Mode to Beginner's GuideWilliam Cohen2010-03-301-0/+136
|
* PR 11338 (partial): Used @defined in ioscheduler.stp and fixed deref hazards.David Smith2010-03-291-48/+40
| | | | | | | | | | * tapset/ioscheduler.stp (ioschedule.elv_next_request): Used '@defined' instead of a kernel version check. (ioscheduler.elv_next_request.return): Ditto. (ioscheduler.elv_add_request.kp): Ditto. (ioscheduler.elv_completed_request): Ditto. (disk_major_from_request): Fixed deref hazards. (disk_minor_from_request): Ditto.
* PR4105 Support up to 9 (up from 5) array indices documentation.William Cohen2010-03-291-1/+1
|
* Add kprobe user probe semaphore handling.Stan Cox2010-03-262-25/+198
| | | | | | | | | | | | | | | | | | | | | | 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
* PR 11338 (partial): Used '@defined()' in inet_sock tapsets.David Smith2010-03-261-21/+7
| | | | | | * tapset/inet_sock.stp (inet_get_local_port): Used '@defined' instead of a kernel version check. Added RHEL4 support. (inet_get_ip_source): Now calls __ip_sock_daddr() to get daddr.
* PR 9871/11338 fix in tcpmib.stp by removing embedded-C and using @defined.David Smith2010-03-263-88/+69
| | | | | | | | | | | | | | | | * tapset/tcpmib.stp (tcpmib_get_state): Changed from embedded-C to script code. (tcpmib_local_addr): Instead of an embedded-C function, now calls function from ip.stp/tcp.stp. (tcpmib_remote_addr): Ditto. (tcpmib_local_port): Ditto. (tcpmib_remote_port): Ditto. (tcpmib.OutRsts.A): Used '@defined' instead of a kernel version check. * tapset/ip.stp (__ip_sock_saddr): Used '@defined' instead of a kernel version check. Added RHEL4 support. (__ip_sock_daddr): Ditto. * tapset/tcp.stp (__tcp_sock_dport): Ditto. (__tcp_sock_sport): Ditto.
* Remove probe_point code duplicationJosh Stone2010-03-251-14/+1
| | | | * staptree.cxx (probe_point::str): Don't duplicate ::print -- reuse it.
* Print probepoint addresses in hexJosh Stone2010-03-253-30/+38
| | | | | | | | | | * staptree.h (literal_number): Add a bool "print_hex". * staptree.cxx (literal_number::print): Switch to hex if needed. * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Write the statement number component with a hex literal_number. (sdt_query::convert_location): Ditto (kprobe_derived_probe::kprobe_derived_probe): Ditto. (hwbkpt_derived_probe::hwbkpt_derived_probe): Ditto for data addr.
* Mention ** in NEWS and stapprobes.3stapJosh Stone2010-03-252-1/+10
|
* PR11399: Allow '**' to match tapsets across '.'Josh Stone2010-03-253-0/+83
| | | | | | | | | | | | | | Normally wildcards are constrained to matching a single probe point component between the '.' separator. This patch enables '**' to match across the separator. Probe point parameters are still absolute separators though, as there's not really a meaningful semantic we could use to cross them with '**'. * elaborate.cxx (isdoubleglob): Check for '**'. (match_node::find_and_build): Recurse '**' to cross separators. * testsuite/semok/doubleglob.stp: New test of broad wildcards. * testsuite/semko/doubleglob.stp: New negative test.
* PR11427: port sdt.h to sparcTom Callaway2010-03-241-1/+1
| | | | * includes/sys/sdt.h (STAP_NOP): Add __sparc__ to list of "nop" users.
* Small cleanup of context.exp.David Smith2010-03-241-15/+18
| | | | | * testsuite/systemtap.context/context.exp: Used "make -C $build_dir" to avoid using 'cd'. Added error handling.
* Improved atomic.exp testcase by removing the need for an external module.David Smith2010-03-244-118/+26
| | | | | | | | * testsuite/systemtap.base/atomic.exp: Removed the need for the external module by putting the atomic_long_t inside the stap module. * testsuite/systemtap.base/atomic_module.c: Removed. * testsuite/systemtap.base/atomic_module.makefile: Ditto. * testsuite/lib/stap_run_error.exp (stap_run_error): Better error handling.
* Fix pipe syscall name in return probe.Mark Wielaard2010-03-241-1/+5
| | | | | * tapset/syscalls2.stp (syscall.pipe.return): If @defined($flags) then use it to determine correct name.
* Removed unneeded convenience variables in syscall.pipe.return.David Smith2010-03-231-5/+1
| | | | | * tapset/syscalls2.stp: Removed unneeded 'flags' and 'flag_str' convenience variables in syscall.pipe.return probe.
* Fixed PR 11425 by fixing probefunc() when used with kprobe.function.David Smith2010-03-231-1/+1
| | | | | * tapset/context-symbols.stp: Fixed probefunc() by looking for '"' as the end of the function name along with '@'.
* Partial fix for pr 11414. Fixed several 32-bit probe points.David Smith2010-03-231-8/+13
| | | | | * tapset/nd_syscalls2.stp: Updated/fixed rt_sigaction32, compat_select, and sigaction32 probes.
* PR10913: Fix error messages when unable to close certain tokensCharley Wang2010-03-231-4/+3
|
* releng: bump to version 1.2Frank Ch. Eigler2010-03-226-24/+27
|
* Fixed nd_syscalls 'sys32_mmap2' problem on newer kernels.David Smith2010-03-221-2/+2
| | | | | * tapset/x86_64/nd_syscalls.stp: Made 'sys32_mmap2' probe point optional, since it doesn't exist on newer kernels.
* Fixed cut-and-paste error for sys_ia64_pipe.David Smith2010-03-221-1/+1
| | | | | * tapset/nd_syscalls2.stp: Removed '.call' from 'kprobe.function("sys_ia64_pipe")'.
* Ifdef out atomic_long_read() body on older kernels where the type doesn't exist.David Smith2010-03-221-0/+2
| | | | | * tapset/atomic.stp: If we don't have ATOMIC_LOGN_INIT(), ifdef out the function.
* Partial fix for pr 11388 by adding 'sys_mmap_pgoff' support.David Smith2010-03-222-4/+8
| | | | | | * tapset/i386/nd_syscalls.stp: Add support for 'sys_mmap_pgoff' (which is what the mmap syscall uses). * tapset/x86_64/nd_syscalls.stp: Ditto.
* Partial fix for pr 11388 by adding 'sys_mmap_pgoff' support.David Smith2010-03-222-6/+10
| | | | | | * tapset/i386/syscalls.stp: Add support for 'sys_mmap_pgoff' (which is what the mmap syscall uses). * tapset/x86_64/syscalls.stp: Ditto.
* Fix syscall tapset on older kernels (RHEL4).David Smith2010-03-221-0/+2
| | | | | * tapset/aux_syscalls.stp: On systems where inotify isn't supported, don't include inotify.h.
* Improve handling of O_NONBLOCK and O_CLOEXEC.David Smith2010-03-221-1/+7
| | | | | | * tapset/aux_syscalls.stp (_sys_pipe2_flag_str): Separate O_NONBLOCK and O_CLOEXEC support. (_sys_open_flag_str): Added O_CLOEXEC support.
* Support signalfd4 in syscalls2.stp tapset.Mark Wielaard2010-03-213-5/+75
| | | | | | | * tapset/aux_syscalls.stp (_signalfd4_flags_str): New utility function. * tapset/syscalls2.stp (syscall.signalfd[.return]): Handle signalfd4 variant when available. * testsuite/systemtap.syscall/signalfd.c: New test.
* Add inotify_init1() and inotify_add_watch() mask string support.Mark Wielaard2010-03-213-7/+85
| | | | | | | | * tapset/aux_syscalls.stp (_inotify_watch_mask_str): New helper function. (_inotify_init1_flag_str): Likewise. * tapset/syscalls.stp (inotify_add_watch): Stringify watch mask. (syscall.inotify_init[.return]): Add inotify_init1() support. * testsuite/systemtap.syscall/inotify.c: New test.
* Add support for eventfd2 to syscall.stp tapset.Mark Wielaard2010-03-213-6/+61
| | | | | | | * tapset/aux_syscalls.stp (_eventfd2_flag_str): New utility function. * tapset/syscalls.stp (syscall.eventfd[.return]): Add alternatives to handle eventfd2. * testsuite/systemtap.syscall/eventfd.c: New test.
* Explicitly test first kernel version in utimensat syscall test.Mark Wielaard2010-03-211-1/+2
| | | | | * testsuite/systemtap.syscall/futimes.c: utimensat was only available since 2.6.22, but libc headers might already define __NR_utimensat.
* Match syscall.pipe32 with regular syscall.pipe[2] output.Mark Wielaard2010-03-211-1/+34
| | | | | * tapset/x86_64/syscalls.stp (syscall.pipe32[.return]): Define same variables and match argstr with regular syscall.pipe.
* Add support for dup3 to syscall.stp tapset.Mark Wielaard2010-03-213-0/+96
| | | | | | * tapset/aux_syscalls.stp (_dup3_flag_str): New helper function. * tapset/syscalls.stp (syscall.dup2): Add alternatives to handle dup3 also. * testsuite/systemtap.syscall/dup.c: New testcase.
* Add F_DUPFD_CLOEXEC to _fcntl_cmd_str().Mark Wielaard2010-03-211-0/+1
|
* Add MSG_CMSG_CLOEXEC to _recvflags_str.Mark Wielaard2010-03-211-0/+1
|
* Support epoll_create1 syscall.Mark Wielaard2010-03-213-6/+33
| | | | | | * tapset/aux_syscalls.stp (_epoll_create1_flag_str): New helper function. * tapset/syscalls.stp (syscall.epoll_create[.return]): Match epoll_creat1 if available.
* robustness: add special_mapping_* to blacklist for 2.6.32ishFrank Ch. Eigler2010-03-201-0/+3
| | | | * dwflpp.cxx (build_blacklist): Add special_mapping_*
* PR11405: Warn and continue for parsing errors in tapsetsJosh Stone2010-03-205-1/+23
| | | | | | | | | | | | When we start seeing tapsets provided by third parties, any errors in their files should not be fatal to us. Since we don't really know which tapsets are our own, this leniency applies to all. * main.cxx (main): Warn on tapset errors, but continue unless -W. * testsuite/parseko/bad_tapset/foo.stp: New bogus tapset. * testsuite/parseko/bad_tapset.stp: Check that "-W -I bad_tapset" fails. * testsuite/parseok/bad_tapset.stp: Check that "-I bad_tapset" succeeds. * testsuite/parseok/all_tapsets.stp: Check -W with the default tapsets.
* Bump the sample indexesJosh Stone2010-03-194-10/+10
|
* Add ia64 pipe result support. Relax pipe syscall test a little.Mark Wielaard2010-03-192-4/+20
| | | | | | * tapset/syscalls2.stp (syscall.pipe.return): ia64 provides pipe0, pipe1 results through (user) registers. * testsuite/systemtap.syscall/pipe.c: Only expect zero as input fildes.