summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
...
* Update tapset related to struct inet_sock for 2.6.33Wenji Huang2009-12-224-0/+40
| | | | | | | * tapset/inet_sock.stp : Add prefix "inet_" to field. * tapset/ip.stp : Ditto. * tapset/tcp.stp : Ditto. * tapset/tcpmib.stp : Ditto.
* Tracepoint based tapset for memory - changes to NEWS and tapset/memory.stp ↵Rajasekhar Duddu2009-12-221-0/+266
| | | | that got left out in earlier commit 0c487e433fd6343e49b1e9dbc6492f38cfe26143.
* PR11015 Support shared library reloading (in different processes)Mark Wielaard2009-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * runtime/task_finder_vma.c (stap_remove_vma_map_info): Return negative status on failure. (stap_find_vma_map_info): Likewise. (stap_find_vma_map_info_user): New function. (stap_drop_vma_maps): New function. * runtime/sym.h (addr): Renamed to static_addr, to store addresses for sections which are always mapped at the same address. (_stp_module_relocate): Add extra struct task_struct *tsk argument. * runtime/sym.c (_stp_tf_exec_cb): New callback, calls stap_drop_vma_maps. (_stp_tf_mmap_cb): Don't store address in module.section, but call stap_add_vma_map_info() per tsk->group_leader for matched module. Don't register empty/null modules. (_stp_module_relocate): Take extra struct task_struct *tsk argument, cache last tsk used. Only use section->static_addr for none dynamic modules. Use stap_find_vma_map_info_user() to locate dynamic modules. (_stp_mod_sec_lookup): Add extra argument unsigned long *rel_addr to optionally store relative address when module/section found. (_stp_kallsyms_lookup): Use _stp_mod_sec_lookup to find relative address. (_stp_sym_init): Register _stp_tf_exec_cb in stap_task_finder_target. Add error check to see if task finder could be initialized. * dwflpp.cxx (emit_address): Pass NULL for kernel/modules and current for user tasks to _stp_module_relocate. * runtime/transport/symbols.c (_stp_do_relocation): Set new static_addr _stp_section field. * runtime/unwind.c (adjustStartLoc): Take new struct task_struct *tsk argument and pass to stap_find_vma_map_info_user and _stp_module_relocate to find adjusted addr. (_stp_search_unwind_hdr): Pass through struct task_struct *tsk. (unwind_frame): Likewise. * tapset/context-symbols.stp (probemod): Add NULL to _stp_mod_sec_lookup call to indicate we aren't interested in relative address. * tapsets.cxx (dwarf_derived_probe_group::emit_module_init): Pass NULL to _stp_module_relocate to indicate kernel/module address.
* Remove blank line in ucontext-unwind.stp for SystemTap Tapset Reference ManualWilliam Cohen2009-12-171-1/+0
| | | | | | The automatic documentation extraction doesn't allow blank lines between the the comment and the actual code. Removed the problem blank line to allow the information to be extracted for the SystemTap Tapset Reference Manual.
* support for a brief backtrace formatTim Moore2009-12-171-0/+18
| | | | | | | | | | | | | | This only prints symbol+offset, or an address if the symbol isn't known. * runtime/runtime.h (SYM_VERBOSE_NO, SYM_VERBOSE_FULL, SYM_VERBOSE_BRIEF): new constants * runtime/stack.c (_stp_stack_print): support brief format * runtime/sym.c (_stp_func_print): ditto * tapset/ucontext-unwind.stp (print_ubacktrace_brief): new function * testsuite/systemtap.context/fib.c: new test program * testsuite/systemtap.context/fib.stp: new test * testsuite/systemtap.context/fib.exp: new test
* set the IP in return probes to the returned-to instructionTim Moore2009-12-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It's easily available in kretprobes and uretprobes and is consistent with the rest of the program state. * translate.cxx (emit_common_header) : add uretprobe_instance to context. * tapsets.cxx (common_probe_entryfn_prologue): Initialize ri in context to 0. (dwarf_derived_probe_group::emit_module_decls): Change IP to return address in kretprobes. (uprobe_derived_probe_group::emit_module_decls): enter_uretprobe_probe: set ri (uretprobe_instance) in context. Change IP to return address in uretprobes. Don't emit uprobe include and #define * runtime/runtime.h : Add includes and #define for uprobes. * runtime/stack.c (_stp_stack_print, _stp_stack_snprint): Add extra argument for uretprobe_instance. * tapset/context-unwind.stp (print_backtrace, backtrace): Pass NULL for uretprobe_instance to _stp_stack_print. * tapset/ucontext-unwind.stp (print_ubacktrace, ubacktrace): pass uretprobe_instance to _stp_stack_print * testsuite/systemtap.context/uprobe_uaddr.exp : new test for uaddr in function probes * testsuite/systemtap.context/uprobe_uaddr.stp : new file
* Fix regression introduced by commit 379c585Wenji Huang2009-12-071-10/+1
|
* Make tapset and tests compatible with old kernelWenji Huang2009-12-026-22/+71
| | | | | | | | | | | | | * tapset/ioscheduler.stp : Make probe optional. * tapset/irq.stp : Ditto. * tapset/scheduler.stp : Ditto. * tapset/tcpmib.stp : Ditto. * tapset/linuxmib.stp : Switch variable by version. * tapset/tty.stp : Ditto. * testsuite/buildok/irq.stp : Make probe test optional. * testsuite/buildok/tty.stp : Ditto. * testsuite/systemtap.examples/network/netdev.stp : Ditto. * testsuite/buildok/tcpmib-all-probes.stp : Add embedded functions.
* Share ppc64 and ppc32 code where possibleAnton Vorontsov2009-12-012-2/+2
| | | | | | | | | | * runtime/copy.c: Can use ppc64's code. * runtime/regs.h: Ditto. * runtime/string.h: Ditto. * tapset/context.stp: Ditto. * tapset/errno.stp: Ditto. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* Implement ppc32 variant of __is_user_regsAnton Vorontsov2009-12-012-0/+6
| | | | | | | * tapset/nd_syscalls.stp: Implement ppc32 variant of __is_user_regs. * tapset/syscalls.stp: Ditto. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* Convert string.stp documentation to standard markup.Mark Wielaard2009-12-011-53/+76
| | | | | | * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add string.stp chapter. * tapset/string.stp: Convert documentation to standard markup and add documentation that was missing.
* Fix typo in scheduler tapsetWenji Huang2009-12-011-1/+1
| | | | | * tapset/scheduler.stp (__scheduler.kthread_stop.kp): Change priority to prio.
* Fixed tapset reference manual generation.David Smith2009-11-231-1/+1
| | | | | | | * doc/SystemTap_Tapset_Reference/Makefile.am: Check for file existence before doing compare. * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated. * tapset/ioblock.stp: Fixed comment so that docs can be built.
* Correct tapset/ioscheduler.stp so documentation builds.William Cohen2009-11-231-6/+6
|
* Correct block IO and IO scheduler tapset and test caseWenji Huang2009-11-231-8/+1
| | | | | | * tapset/ioblock.stp: Update comment and variables. * testsuite/buildok/ioblock_test.stp: Add parameters. * testsuite/buildok/ioscheduler.stp: Remove redundant parameters.
* Added tracepoint-based probes to block IO and IO scheduler tapsets.Prerna Saxena2009-11-222-50/+362
| | | | | Added testcases for these probes. Also, modified comments in ioblock.stp so that tapset docmentation can be automatically generated for this tapset.
* PR 10981. Fixed buildok/netdev.stp for RHEL5.David Smith2009-11-181-2/+2
| | | | | | | * tapset/networking.stp: Made 'netdev.change_rx_flag' and 'netdev.get_stats' optional, since those functions don't exist on RHEL5. * testsuite/buildok/netdev.stp: Ditto.
* PR 5150. Fixed nfs tapset by making probes optional.David Smith2009-11-181-22/+30
| | | | | | | * tapset/nfs_proc.stp: Made 'nfs.proc.read', 'nfs.proc.write', and 'nfs.proc.commit' optional for newer kernels without those functions. * testsuite/systemtap.pass1-4/buildok.exp: Expect nfs-all-probes.stp to pass.
* Document is_return(), module_name() and stp_pid() context tapset functions.Mark Wielaard2009-11-171-15/+18
|
* Fixed aux_syscalls.stp for RHEL4.David Smith2009-11-171-0/+12
| | | | | * tapset/aux_syscalls.stp: Only define entries for IRQF_* flags if they exist.
* PR 10974 fix. Fixed aux_syscalls.stp for RHEL5.David Smith2009-11-171-0/+4
| | | | | * tapset/aux_syscalls.stp: Only define entries for IRQF_NOBALANCING/IRQF_IRQPOLL if they exist.
* PR 5150 partial fixes. Added support for nfs_file_fsync.David Smith2009-11-161-37/+40
| | | | | | | | | | | | | | | * tapset/nfs.stp(nfs.fop.fsync): Added support for nfs_file_fsync. (nfs.fop.fsync.return): Ditto. (nfs.aop.readpages.return): Fixed 'size' bug. (nfs.aop.write_begin): Renamed to make 'nfs.*.*' probes work correctly. (nfs.aop.write_end): Ditto. (__nfs.aop.write_begin): Ditto. (__nfs.aop.write_end): Ditto. (__nfs.aop.prepare_write): Ditto. (__nfs.aop.commit_write): Ditto. (nfs.fop.aio_read.return): Always sets 'units'. (nfs.fop.aio_write.return): Ditto. (nfs.fop.sendfile.return): Ditto.
* PR 5150 partial fix. Support nfs_write_begin()/nfs_write_end().David Smith2009-11-161-4/+76
| | | | | * tapset/nfs.stp: Added support for nfs_write_begin()/nfs_write_end(), which replaced nfs_prepare_write()/nfs_commit_write().
* Add documentation for ansi.stp tapset.Mark Wielaard2009-11-161-15/+79
| | | | | * tapset/ansi.stp: Add documentation for every function. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add chapter on ansi.
* Define IRQF_ONESHOT for older kernels.Mark Wielaard2009-11-161-0/+3
| | | | | | | IRQF_ONESHOT was only introduced in 2.6.32. It doesn't hurt defining it if it isn't already there. It will just never show up on older kernels. * tapset/aux_syscalls.stp: Define IRQF_ONESHOT if not already defined.
* add definition of function irqflags_str()Prerna Saxena2009-11-161-0/+27
|
* Turn ctime.stp documentation into proper Tapset Reference markup.Mark Wielaard2009-11-131-12/+15
| | | | | * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add chapter on ctime.stp. * tapset/ctime.stp: Turn documentation into proper reference markup.
* Add documentation for conversions.stp tapset functions.Mark Wielaard2009-11-121-7/+179
| | | | | * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add conversions.stp chapter. * tapset/conversions.stp: Add documentation for all functions.
* Mark usymname as unprivileged.Mark Wielaard2009-11-121-1/+2
| | | | | * tapset/ucontext-symbols.stp (usymname): Add assert_is_myproc() and mark as unprivileged, just like usymdata().
* A very simple patch that fix the networking tapset documentation.Breno Leitao2009-11-111-1/+1
| | | | | It references the file include/linux/if_ether.h as the one that contains the protocol numbers and types.
* PR5916: Exploit kretprobe data storage areaJosh Stone2009-11-101-0/+56
| | | | | | | | | | | | | | | | | | | | Since 2.6.25, kretprobes can carry a data packet to be filled in an entry_handler. This patch lets us store our implicitly-saved $target variables in .return probes in that data area. * tapset/kretprobe.stp: New get/set functions for kretprobe data. * translate.cxx (c_unparser::emit_common_header): Add context->pi_longs. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): Switch between the old and new methods of saving $vars in .return probes. (dwarf_var_expanding_visitor::gen_mapped_saved_return): The old way. (dwarf_var_expanding_visitor::gen_kretprobe_saved_return): The new way. (dwarf_derived_probe::join_group): Don't register paired entry-handlers. (dwarf_derived_probe::dwarf_derived_probe): Remember saved-var details. (dwarf_derived_probe_group::emit_module_decls): Output saved-var details. Also split the kretprobe handler whether we're on entry or return. (dwarf_derived_probe_group::emit_module_init): Prepare the entry handler. * testsuite/systemtap.base/kretprobe-vars.stp: Test implicit $var saving.
* Normalized whitespace and comments.David Smith2009-11-091-146/+153
|
* IRQ tapset, sample script, testsuite, man page updates, etcPrerna Saxena2009-11-091-0/+172
|
* PR 6691 fixed by adding support for sys_accept4.David Smith2009-11-022-15/+87
| | | | | | | | | | * tapset/aux_syscalls.stp(_sock_type_str): Rewrote in embedded-C and added socket flags support. (_sock_flags_str): New function. * tapset/syscalls.stp: syscall.accept prefers to use sys_accept4 when it exists. Added support for sys_accept4's 'flag' parameter. * testsuite/systemtap.syscall/net1.c (main): Updated regular expression to handle the new 'flags' argument.
* A new tapset that adds support for tty and serial devicesBreno Leitão2009-10-291-0/+189
| | | | | | A new tapset that supports tty devices and consequently serial devices. It is just a basic implementation that can be extended as demands appears
* RHBZ519314: define task_struct cast to operate without debuginfoFrank Ch. Eigler2009-10-201-7/+7
| | | | | * tapset/task.stp: Use @cast(...,"task_struct","kernel<linux/sched.h") throughout to operate dwarf-free.
* PR5434: Fix syscall.nfsservctl.Przemyslaw Pawelczyk2009-10-131-0/+8
| | | | | | | | Use proper $vars according to CONFIG_NFSD and CONFIG_COMPAT in syscall.nfsservctl and mask it out along with return probe if CONFIG_NFSD != "[ym]" && CONFIG_COMPAT != "y". * tapset/syscalls2.stp (syscall.nfsservctl): Fix it.
* Add the .call modifier to syscall entry probes.Przemyslaw Pawelczyk2009-10-122-704/+704
| | | | | | | | | | | | | | | | | | | | Inline functions do not have an indentifiable return point and require kernel built using VTA-enabled gcc to get tracking of variables. OTOH syscall functions are very rarely inlined (depending on the compiler mood), therefore filtering probes to include only non-inlined functions ensures consistent behavior between different kernels. This removes the problem of inaccessible variables in inlined syscalls that is described in comments #6-9 to PR5890 and gives us the status quo w.r.t. syscall probing, because before the commit solving PR10572 (b7478964) inline instances were masked anyway by non-inline ones. You can check whether you have inlined syscalls using following command: $ stap -l 'kernel.function("sys_*"),kernel.function("compat_sys_*")' \ 2>&1 -vvv | awk '/^selected inline/{print $5}' * tapset/syscalls.stp: Add .call to all entry probes. * tapset/syscalls2.stp: Ditto.
* Add task_time tapset, functions to query time resource usage of current task.Mark Wielaard2009-10-091-0/+101
| | | | | | | * tapset/task_time.stp: New tapset. * testsuite/buildok/task_test.stp: Add new task_time functions. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add new section on Task Time Tapset. Include tapset/task_time.stp.
* tapset/proc_mem.stp: Document function parameters.Mark Wielaard2009-10-091-0/+2
|
* Add proc_mem tapset, functions to query memory usage of the current process.Mark Wielaard2009-10-061-0/+194
| | | | | | | * tapset/proc_mem.stp: New tapset. * testsuite/buildok/proc_mem.stp * doc/SystemTap_Tapset_Reference/tapsets.tmpl (memory_stp): Include tapset/proc_mem.stp.
* Scheduler Tapset based on kernel tracepointsKiran Prakesh2009-10-021-51/+302
| | | | | | | | | This patch adds kernel tracepoints based probes to the scheduler tapset along with the testcase, scheduler-test-tracepoints.stp and an example script, sched_switch.stp. Signed-off-by: Kiran Prakash <kiran@linux.vnet.ibm.com> Signed-off-by: Josh Stone <jistone@redhat.com>
* indent tapset: make O(1) rather than O(n)Frank Ch. Eigler2009-10-021-5/+1
| | | | | * tapset/indent.stp (_generic_indent): Use "%-*s" instead of string concatenation loop.
* Actually indent_thread() is a very useful function, butBreno Leitao2009-10-011-4/+16
| | | | | | | | | | | | | | | | | | | | | | sometimes you're probing something that is not related to any task, as an interrupt function, and if the application changes during the interrupt, the indentation gets confused. For example: 0 swapper(0): -> neo_copy_data_from_queue_to_uart 69 a.out(7659): -> neo_parse_modem 74 a.out(7659): -> neo_param 14 swapper(0): <- neo_copy_data_from_queue_to_uart 83 a.out(7659): -> jsm_carrier 86 a.out(7659): <- jsm_carrier 0 swapper(0): -> neo_parse_modem 94 a.out(7659): <- jsm_tty_set_termios 8 swapper(0): <- neo_parse_modem So, I decided to create a simpler function that doesn't consider the task. Much of the idea of this implementation came from Frank(Thanks)
* tapset docs cleanupFrank Ch. Eigler2009-09-299-80/+75
| | | | | | | | | | | | | | Several problems: some invalid <command> etc. directives in the tapset embedded docs; some analysis about the non-generation of the pdf; some cleanup of the generated man pages. * configure.ac (BUILD_PDFREFDOCS): Correct condition typo, but still leave disabled. * doc/SystemTap_Tapset_Reference/Makefile.am (XMLTOMANPARMS): Add, to disable noise "AUTHORS" / "COPYRIGHT" sections. * tapset/*.stp: Removed several docbook-y markup that is not valid in kerneldoc.
* Make sys32_pipe probe available only before 2.6.32Wenji Huang2009-09-292-0/+4
| | | | | * tapset/x86_64/nd_syscalls.stp: Switch by kernel version. * tapset/x86_64/syscalls.stp: Ditto.
* PR10700 Add newline after log() message.Mark Wielaard2009-09-281-1/+1
| | | | * tapset/logging.stp (log): Use _stp_printf "%s\n".
* Removing support for InMcastPkts, OutMcastPkts, InBcastPkts andDavid J. Wilder2009-09-251-82/+4
| | | | | OutBcastPkts. As they are not needed for tcpipstat and tend to break easily with kernel changes.
* PR10632: make randint() unprivilegedFrank Ch. Eigler2009-09-231-1/+1
|
* PR10632: simplify randint() implementationFrank Ch. Eigler2009-09-231-16/+12
| | | | | | | | | * tapset/random.stp (randint): Make it 1-arity (imply min=0). Document with kerneldoc. * doc/Systemtap_Tapset_Reference/tapsets.tmpl: Extract the docs. * runtime/arith.c (_stp_random_pm_u): Rename without _pm. (_stp_random_pm): Rewrite in terms of ..._u. * testsuite/random.stp: Adapt & simplify.