summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix [set_]kernel_pointer for 32-bitHEADmasterJosh Stone2010-04-132-2/+2
| | | | | * tapset/conversions.stp (kernel_pointer): Use uintptr_t casts. * tapset/conversions-guru.stp (set_kernel_pointer): Ditto.
* PR11498: hang loose, don't freak, if facing giganormous debug_frame's.Frank Ch. Eigler2010-04-131-33/+46
| | | | | | | * 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.
* Fixed uninitialized variable error in task_finder.c.David Smith2010-04-131-4/+3
| | | | | * runtime/task_finder.c (__stp_call_mmap_callbacks_with_addr): Avoided uninitialized variable error.
* runtime: switch to deferred STP_EXIT signallingFrank Ch. Eigler2010-04-091-8/+34
| | | | | | | | | | | | | | | 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.
* BZ580943: add more patterns to kprobe blacklistFrank Ch. Eigler2010-04-091-0/+2
| | | | * dwflpp.cxx (build_blacklist): Add a few more entries.
* PR11343: backward compatibility option/conditionalFrank Ch. Eigler2010-04-086-6/+40
| | | | | | | | * 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.
* docs: normalize tapset::nfsd man header/aliasesFrank Ch. Eigler2010-04-081-2/+2
|
* documentation: shorten morehelpFrank Ch. Eigler2010-04-081-910/+202
|
* runtime: more diagnostics for build-id checkingFrank Ch. Eigler2010-04-081-8/+8
| | | | * runtime/sym.c: Store individual rc's for build-id comparisons.
* Title for kernel_pointer needs to be all on one line.William Cohen2010-04-081-2/+1
|
* Clean up and clarify semantic_error chainingJosh Stone2010-04-076-19/+15
| | | | | | | | | 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.
* PR11474: Don't manually iterate over CUs for @castJosh Stone2010-04-071-40/+15
| | | | | | | | | | 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.
* PR 9871 (partial) fix. Removed embedded-C in ioblock.stp and ipmib.stp.David Smith2010-04-072-101/+39
| | | | | | | | | | | | | | | | | | | | * 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.
* Added kernel_pointer()/set_kernel_pointer() tapset functions.David Smith2010-04-077-13/+44
| | | | | | | | | | | * 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.
* PR 9871 (partial) fix. Removed all embedded-C in rpc.stp.David Smith2010-04-071-94/+69
| | | | * tapset/rpc.stp: Replaced all embedded-C functions with script language.
* Added atomic_read() embedded-C function and tests.David Smith2010-04-064-13/+91
| | | | | | | | * 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.
* PR 9871 (partial) fix. Removed some embedded-C in scsi.stp.David Smith2010-04-061-14/+15
| | | | | * tapset/scsi.stp: Added script function timer_pending(). Rewrote embedded-C function scsi_timer_pending() in script language.
* PR 9871 (partial) fix. Removed more embedded-C in nfs_proc.stp and nfs.stp.David Smith2010-04-062-146/+129
| | | | | | | | | | * 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.
* PR 9871 (partial) fix. Removed more embedded-C in nfs_proc.stp.David Smith2010-04-051-156/+92
| | | | | | | * 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().
* PR 9871 (partial) fix. Removed some embedded-C in nfs_proc.stp.David Smith2010-04-051-22/+21
| | | | | * tapset/nfs_proc.stp: To avoid a deref hazard, rewrote embedded-C __i2n_ip_proto() in script language.
* Fixed BZ 557165 by adding better error handling.David Smith2010-04-051-1/+3
| | | | | * runtime/staprun/mainloop.c (stp_main_loop): When a read error happens, quit instead of retrying (which can end up in an infinite loop).
* documentation: don't panicFrank Ch. Eigler2010-04-011-0/+919
|
* Add NEWS for set_kernel_*Josh Stone2010-04-011-0/+3
|
* Add set_kernel_* bad-address testsJosh Stone2010-04-011-0/+30
| | | | * testsuite/systemtap.base/set_kernel.stp: try/catch addresses of -1.
* 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.