| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* tapset/conversions.stp (kernel_pointer): Use uintptr_t casts.
* tapset/conversions-guru.stp (set_kernel_pointer): Ditto.
|
|
|
|
|
|
|
| |
* translate.cxx (MAX_UNWIND_TABLE_SIZE): Double to 6MB.
(dump_unwindsyms): Handle excess .eh_frame, .eh_frame_hdr,
.debug_frame sizes as suppressible warnings instead of
semantic_errors.
|
|
|
|
|
| |
* runtime/task_finder.c (__stp_call_mmap_callbacks_with_addr): Avoided
uninitialized variable error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former code allowed stapio to have two concurrent commands sent
toward the runtime at the same time: one from the main loop and
another one from the signal handling thread. This is suspected to
have caused occasional lockups. This new code switches to a deferred
signal handling model, where the signal handling thread merely
increments a counter, and the main loop monitors that count.
Unfortunately, this currently involves switching the main loop's
blocking /.ctl read into a nonblocking poll.
* runtime/staprun/mainloop.c (pending_interrupts): New variable.
(signal_thread): Increment it.
(stp_main_loop): Check it.
|
|
|
|
| |
* dwflpp.cxx (build_blacklist): Add a few more entries.
|
|
|
|
|
|
|
|
| |
* main.cxx: Add "--compatible=VERSION" option.
* session.h (compatible): Store it.
* parse.cxx (eval_pp_conditional): Look at it as %( systemtap_v CMP VALUE ... %)
* stap.1.in: Document it.
* testsuite/parseko/preprocess17.stp, parseok/twenty.stp: Test it.
|
| |
|
| |
|
|
|
|
| |
* runtime/sym.c: Store individual rc's for build-id comparisons.
|
| |
|
|
|
|
|
|
|
|
|
| |
I consolidated the copy-construction that every target_symbol::chain
caller was doing. I also removed the comments that target_symbol errors
might be chained due to function wildcards, because it's not true --
each derived instance gets a deep_copy of the probe body. However,
@cast can still chain since it may try multiple modules to resolve the
casting dereference.
|
|
|
|
|
|
|
|
|
|
| |
Since commit 063906a9, we can just let dwflpp look everywhere for the
type on our behalf. Thanks dwflpp!
* tapsets.cxx (dwarf_cast_query::handle_query_module): Call dwflpp's
declaration_resolve_other_cus, focus on the CU, and expand.
(dwarf_cast_query::handle_query_cu): Remove.
(dwarf_cast_query::cast_query_cu): Remove.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tapset/ioblock.stp(__bio_start_sect): Converted from embedded-C to
script language.
* tapset/ipmib.stp: Replaced all _tcphdr_get_dport()/_tcphdr_get_sport()
calls with _tcp_skb_dport()/_tcp_skb_sport() calls. Removed embedded-C
functions _tcphdr_get_dport()/_tcphdr_get_sport().
(ipmib.OutRequests): Fixed for RHEL4.
(_trn_unspec): New function.
(_input_route_type): Originally called
__input_route_type_old()/__input_route_type_new(), which were embedded-C
functions. Now just does everything in script language.
(__input_route_type_old): Deleted.
(__input_route_type_new): Ditto.
(_output_route_type): Originally called
__output_route_type_old()/__output_route_type_new(), which were
embedded-C functions. Now just does everything in script language.
(__output_route_type_old): Deleted.
(__output_route_type_new): Ditto.
|
|
|
|
|
|
|
|
|
|
|
| |
* tapset/conversions.stp (kernel_pointer): New function.
* tapset/conversions-guru.stp (set_kernel_pointer): Ditto.
* testsuite/buildok/conversions-embedded.stp: Added kernel_pointer() test.
* testsuite/buildok/conversions.stp: Ditto.
* testsuite/buildok/set_kernel.stp: Added set_kernel_pointer() test.
* tapset/nfs.stp: Removed __d_loff_t() function. Uses new
kernel_pointer() function instead.
* testsuite/buildok/nfs-embedded.stp: Removed __d_loff_t() test.
|
|
|
|
| |
* tapset/rpc.stp: Replaced all embedded-C functions with script language.
|
|
|
|
|
|
|
|
| |
* tapset/atomic.stp: Added atomic_read().
* testsuite/buildok/atomic.stp: Added atomic_read() compile test.
* testsuite/systemtap.base/atomic.exp: Added atomic_read() tests.
* testsuite/lib/stap_run_error.exp (stap_run_error): Logs stap command and
tries to ensure inferior process is killed.
|
|
|
|
|
| |
* tapset/scsi.stp: Added script function timer_pending(). Rewrote
embedded-C function scsi_timer_pending() in script language.
|
|
|
|
|
|
|
|
|
|
| |
* tapset/nfs_proc.stp: Added script functions NFS_I(), NFS_FH(),
NFS_SERVER, NFS_PROTO. Rewrote embedded-C functions __nfsv4_bitmask()
and __getfh_inode() in script language.
* tapset/nfs.stp: Rewrote embedded-C functions __nfsi_cache_valid(),
__nfsi_rcache_time(), __nfsi_attr_time(), __nfsi_ndirty(),
__nfs_server_rsize(), __nfs_version(), __nfs_server_wsize(),
__nfs_rpages(), and __nfs_wpages() in script language.
|
|
|
|
|
|
|
| |
* tapset/nfs_proc.stp: Rewrote embedded-C functions stap_NFS_CLIENT(),
get_ip_from_client(), get_prot_from_client(), get_ip(), and get_prot()
in script language. Simplified __i2n_ip_proto() by just calling
get_ip_from_client() or get_prot_from_client().
|
|
|
|
|
| |
* tapset/nfs_proc.stp: To avoid a deref hazard, rewrote embedded-C
__i2n_ip_proto() in script language.
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (stp_main_loop): When a read error happens,
quit instead of retrying (which can end up in an infinite loop).
|
| |
|
| |
|
|
|
|
| |
* 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.
|