| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* testsuite/systemtap.base/set_kernel.stp: try/catch addresses of -1.
|
|
|
|
|
| |
* testsuite/buildok/set_kernel.stp: Test that all can build.
* testsuite/systemtap.base/set_kernel.stp: Test that values are all set.
|
|
|
|
|
| |
* testsuite/semko/gurufunc.stp: Test rejection without -g.
* testsuite/semok/gurufunc.stp: Test acceptance with -g.
|
|
|
|
|
| |
* runtime/loc2c-runtime.h (store_deref_string): New.
* tapset/conversions-guru.stp (set_kernel_*): New guru functions.
|
|
|
|
|
| |
* staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Don't
allow calling /* guru */ functions unless guru mode is active.
|
|
|
|
|
| |
* testsuite/lib/systemtap.exp (setup_server): Use stap-find-servers to
check that the firewall is letting us through to the server.
|
|
|
|
|
|
|
| |
//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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* staptree.cxx (probe_point::str): Don't duplicate ::print -- reuse it.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* includes/sys/sdt.h (STAP_NOP): Add __sparc__ to list of "nop" users.
|
|
|
|
|
| |
* testsuite/systemtap.context/context.exp: Used "make -C $build_dir" to
avoid using 'cd'. Added error handling.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tapset/syscalls2.stp (syscall.pipe.return): If @defined($flags) then use
it to determine correct name.
|
|
|
|
|
| |
* tapset/syscalls2.stp: Removed unneeded 'flags' and 'flag_str'
convenience variables in syscall.pipe.return probe.
|
|
|
|
|
| |
* tapset/context-symbols.stp: Fixed probefunc() by looking for '"' as the
end of the function name along with '@'.
|
|
|
|
|
| |
* tapset/nd_syscalls2.stp: Updated/fixed rt_sigaction32, compat_select,
and sigaction32 probes.
|
| |
|
| |
|
|
|
|
|
| |
* tapset/x86_64/nd_syscalls.stp: Made 'sys32_mmap2' probe point optional,
since it doesn't exist on newer kernels.
|
|
|
|
|
| |
* tapset/nd_syscalls2.stp: Removed '.call' from
'kprobe.function("sys_ia64_pipe")'.
|
|
|
|
|
| |
* tapset/atomic.stp: If we don't have ATOMIC_LOGN_INIT(), ifdef out the
function.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* tapset/i386/syscalls.stp: Add support for 'sys_mmap_pgoff' (which is
what the mmap syscall uses).
* tapset/x86_64/syscalls.stp: Ditto.
|
|
|
|
|
| |
* tapset/aux_syscalls.stp: On systems where inotify isn't supported, don't
include inotify.h.
|
|
|
|
|
|
| |
* tapset/aux_syscalls.stp (_sys_pipe2_flag_str): Separate O_NONBLOCK and
O_CLOEXEC support.
(_sys_open_flag_str): Added O_CLOEXEC support.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* testsuite/systemtap.syscall/futimes.c: utimensat was only available since
2.6.22, but libc headers might already define __NR_utimensat.
|
|
|
|
|
| |
* tapset/x86_64/syscalls.stp (syscall.pipe32[.return]): Define same
variables and match argstr with regular syscall.pipe.
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
|
| |
* tapset/aux_syscalls.stp (_epoll_create1_flag_str): New helper function.
* tapset/syscalls.stp (syscall.epoll_create[.return]): Match epoll_creat1
if available.
|
|
|
|
| |
* dwflpp.cxx (build_blacklist): Add special_mapping_*
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|