summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
...
* Backport recently added probes to RHEL5(U5)Steve Dickson2010-03-163-51/+119
| | | | | | | Ensured the recent additions of v4 probes and supporting routines worked or at least don't break with RHEL5 U5 kernel. Signed-off-by: Steve Dickson <steved@redhat.com>
* Revert "Backport recent changes to RHEL5 (U5)"Steve Dickson2010-03-163-53/+18
| | | | | | This commit causes the 2.6.33 probes to break This reverts commit 3ca4e3f2f5a7a615d0aed00a242f4e30864deaa8.
* Backport recent changes to RHEL5 (U5)Steve Dickson2010-03-163-18/+53
| | | | | | | Ensured the recent additions of v4 probes and supporting routines worked with RHEL5 U5 kernel. Signed-off-by: Steve Dickson <steved@redhat.com>
* Incorporated comments from code reviewSteve Dickson2010-03-161-40/+53
| | | | | | | | - Fixed a couple typos - To allow better optimization, removed the used of "convenience variables" Signed-off-by: Steve Dickson <steved@redhat.com>
* Allow better filtering with IP address and File handleSteve Dickson2010-03-162-23/+122
| | | | | | | | | | | | | | | To allow filtering by the client's IP address, the addr_from_rqst_str() function was added which extracts the IP address from incoming procedures and converts them into a character string. Calls to addr_from_rqst_str() were added to the top of each probe so callers of the probes can use the IP addresses as a filter. Calls to __svc_fh() were also sprinkled were needed so callers can also filter on file handles Signed-off-by: Steve Dickson <steved@redhat.com>
* General clean up on the upper level probesSteve Dickson2010-03-161-23/+67
| | | | | | | | | | Added the ftype() function which converts file types into character strings Added calls nfsderror() to the return probes that will display errors in character strings Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed the nfsd.proc4.compound and nfsd.proc.compound.return probesSteve Dickson2010-03-161-38/+0
| | | | | | | Either probes displayed anything that was useful, plus there are other ways to display similar information. Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.remove probesSteve Dickson2010-03-161-11/+39
| | | | | | | | | Converted the nfsd.proc.remove probes to used the @cast() mechanism. Created the nfsd.proc4.remove probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.remove probesSteve Dickson2010-03-161-7/+31
| | | | | | | | | Converted the nfsd.proc.remove probes to used the @cast() mechanism. Created the nfsd.proc4.remove probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.create probesSteve Dickson2010-03-161-8/+97
| | | | | | | | | Converted the nfsd.proc.create probes to used the @cast() mechanism. Created the nfsd.proc4.create probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.write probesSteve Dickson2010-03-161-20/+74
| | | | | | | | | Converted the nfsd.proc.write probes to used the @cast() mechanism. Created the nfsd.proc4.write probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.read probesSteve Dickson2010-03-161-12/+41
| | | | | | | | | Converted the nfsd.proc.read probes to used the @cast() mechanism. Created the nfsd.proc4.read probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated nfsd.proc.lookup probesSteve Dickson2010-03-161-79/+30
| | | | | | | | | Converted the nfsd.proc.lookup probes to used the @cast() mechanism. Created the nfsd.proc4.lookup probes Signed-off-by: Steve Dickson <steved@redhat.com>
* Added new nfsderror() functionSteve Dickson2010-03-161-0/+238
| | | | | | | | The nfsderror() function takes the error numbers used by the NFS server and converts them into a text representation of the given error number. Signed-off-by: Steve Dickson <steved@redhat.com>
* Get d_path's root natively with @castJosh Stone2010-03-121-15/+1
| | | | | | | | | | | As mjw's aborted commit 5ab0b1b6 attempted, we can use a @cast to get the filesystem root for the current task instead of embedded-C. I've left it using the kernel debuginfo instead of headers for now, because all of the neighboring @casts are doing the same. * tapset/dentry.stp (d_path): Use @cast to get the root. (__dentry_get_current_root): Remove, no longer needed. * testsuite/buildok/dentry.stp: Test that dentry's functions all build.
* Fix proc_mem.stp for RHEL5.David Smith2010-03-111-1/+1
| | | | | * tapset/proc_mem.stp: Move header file so that it will compile on RHEL5 systems.
* Revoke unprivileged from ftrace()Josh Stone2010-03-111-4/+2
| | | | | | | | It's writing into a system-wide resource, so it shouldn't be permitted to just anyone. Also remove the printk fallback that isn't actually functional. * tapset/logging.stp (ftrace): Remove unprivileged and printk.
* Update tapset proc_mem for 2.6.34Wenji Huang2010-03-111-0/+32
| | | | | * tapset/proc_mem.stp(_stp_get_mm_counter_file_rss, _stp_get_mm_counter_anon_rss): Use embedded function.
* Revert "Remove unnecessary embedded-c function __dentry_get_current_root()."Mark Wielaard2010-03-101-1/+15
| | | | | This reverts commit 5ab0b1b6c4d3a7f1ea156835a32000669e378886. Wrongly pushed commit.
* Remove unnecessary embedded-c function __dentry_get_current_root().Mark Wielaard2010-03-101-15/+1
| | | | | * tapset/dentry.stp: Removed embedded-c include and function __dentry_get_current_root(). Use task_current and @cast in d_path().
* tapset/task.stp remove redundant extra @defined in task_cpu().Mark Wielaard2010-03-101-2/+2
|
* PR 11338 (partial): Used '@defined()' in task, dentry, and scsi tapsets.David Smith2010-03-093-20/+13
| | | | | | * tapset/task.stp: Used '@defined()' to remove kernel version checks. * tapset/dentry.stp: Ditto. * tapset/scsi.stp: Ditto.
* PR 11338 (partial): Used '@defined()' in tty, scheduler, and vfs tapsets.David Smith2010-03-083-88/+38
| | | | | | | | | | * tapset/tty.stp: Used '@defined()' to remove kernel version checks. * tapset/scheduler.stp: Ditto. * tapset/vfs.stp: Used '@defined()' to remove kernel version checks. Also made several probe points optional instead of using kernel version checks to know when to include them. * testsuite/buildok/vfs_testcase.stp: Removed stap '-u' (unoptimized mode) switch, since '@defined()' doesn't work in unoptimized mode.
* Improved 'mm_struct' casting for RHEL5.David Smith2010-03-052-11/+11
| | | | | | | | * tapset/context.stp: Improved casting to 'mm_struct' on RHEL5 by changing the header file referenced from '<linux/mm_types.h>' to '<linux/sched.h>' (since mm_types.h doesn't exist on RHEL5). On newer kernels, sched.h includes mm_types.h. * tapset/proc_mem.stp: Ditto.
* PR 11338 (partial): Used '@defined()' in syscall tapsets.David Smith2010-03-056-225/+100
| | | | | | | | | | * tapset/syscalls.stp: Used '@defined()' to remove kernel version checks. * tapset/syscalls2.stp: Ditto. * tapset/x86_64/syscalls.stp: Ditto. * tapset/nd_syscalls.stp: Updated to match tapset/syscalls.stp. * tapset/nd_syscalls2.stp: Updated to match tapset/syscalls2.stp. * tapset/x86_64/nd_syscalls.stp: Updated to match tapset/x86_64/syscalls.stp.
* Remove unneeded embedded-c include block from tapset/udp.stp.Mark Wielaard2010-03-051-6/+0
|
* Add cmdline argument fetching for current process to context.stp tapset.Mark Wielaard2010-03-041-0/+74
| | | | | * tapset/context.stp: Add cmdline_str, cmdline_arg and cmdline_args. * testsuite/buildok/context_test.stp: Add tests for new functions.
* Describe function args and clean up titles for proc_mem.stp and task_time.stpWilliam Cohen2010-03-032-25/+47
|
* HACKING: emphasize embedded-c testingFrank Ch. Eigler2010-03-031-1/+2
|
* Add task_stime_tid(), task_utime_tid() and task_time_string_tid() support.Mark Wielaard2010-03-031-1/+49
| | | | | | * tapset/task_time.stp: New functions task_stime_tid(), task_utime_tid() and task_time_string_tid(). * testsuite/buildok/task_test.stp: Add tests.
* Add documentation and tests for proc_mem_*_pid functions.Mark Wielaard2010-03-031-0/+42
|
* Add proc_mem_*_pid tapset function variants.Mark Wielaard2010-03-031-1/+106
| | | | | | * tapset/proc_mem.stp: Add proc_mem_size_pid, proc_mem_rss_pid, proc_mem_shr_pid, proc_mem_txt_pid, proc_mem_data_pid and proc_mem_string_pid functions to tapset.
* Fixed PR 11269 by properly handling mmap syscall 'fd' argument.David Smith2010-02-237-25/+51
| | | | | | | | | | | | | | * testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap testing (along with testing of anonymous maps). * tapset/i386/syscalls.stp: In mmap probes, handle the fact that the kernel gets an unsigned long 'fd', but the user-side passes a signed int. * tapset/i386/nd_syscalls.stp: Ditto. * tapset/ia64/syscalls.stp: Ditto. * tapset/powerpc/nd_syscalls.stp: Ditto. * tapset/powerpc/syscalls.stp: Ditto. * tapset/x86_64/nd_syscalls.stp: Ditto. * tapset/x86_64/syscalls.stp: Ditto.
* Use clamping to more easily normalize input valuesJosh Stone2010-02-162-12/+9
| | | | | | The kernel has min/max/clamp macros to make range comparisons easier. Clamp is a newer invention, but we can define it for older kernels in terms of min and max.
* Add documentation for task.stp tapset.Mark Wielaard2010-02-151-34/+104
|
* rhbz#563114 Make syscall.pipe sys32_pipe probe alias optional on x86_64.Mark Wielaard2010-02-091-5/+3
| | | | | | | | | Some distributions might have backported the pipe fd leak patch and removed the sys32_pipe kernel function even before 2.6.32. So make the probe alias optional instead of relying on a version check. * tapset/x86_64/syscalls.stp (syscall.pipe): Make alias optional. (syscall.pipe.return): Likewise.
* Added backports required for 2.6.18 kernel for RHEL 5.David J. Wilder2010-02-052-21/+52
| | | | | | | Files changed: tapset/ipmib.stp, tapset.tcpmib.stp, testsuite/systemtap.examples/network/tcpipstat.stp, testsuite/systemtap.examples/network/tcp_trace.stp Signed-of-by: David Wilder <dwilder@us.ibm.com>
* PR11234: Rewrite __get_argv without embedded-CJosh Stone2010-02-041-115/+44
| | | | | | We now implement __get_argv's string building in pure stap script. Also, every argument is now quoted, which is different than before, but it's much more robust about handling special characters.
* Revert "PR11234: Ensure __get_argv doesn't overflow"Josh Stone2010-02-041-15/+11
| | | | This reverts commit f75409719f120a3dbee66d761cf23a64092d1414.
* Fix a incorrect UNKNOWN VALUE message creation in _sock_type_str functionPetr Muller2010-02-011-1/+1
|
* PR11234: Ensure __get_argv doesn't overflowJosh Stone2010-01-281-11/+15
| | | | | | | That function was calling strlcpy as if the return value was the number of bytes copied, but strlcpy actually returns the length of the input string. We now use min() to handle the case when it's bigger than the buffer length, and drop out of the loop when that happens.
* PR 11167 fixed by adding compat_sys_sigaction to the syscall.sigaction32 probe.David Smith2010-01-131-2/+4
| | | | | | * tapset/syscalls2.stp (syscall.sigaction32): Added kernel.function("compat_sys_sigaction"). (syscall.sigaction32.return): Ditto.
* Fix PR11160 by handling ppc syscall.sigaction32 correctly.David Smith2010-01-132-1/+45
| | | | | | | | | | * tapset/aux_syscalls.stp (_struct_old_sigaction32_u): New function. * tapset/syscalls2.stp (syscall.sigaction32): Uses new _struct_old_sigaction32() function to provide a human readable version of the sigaction argument. * testsuite/systemtap.syscall/test.tcl (run_one_test): Use additional C flags when pre-processing test files to better determine which tests are valid on which platforms.
* Fixed PR 11163 so that syscall.readv/syscall.writev puts fd in argstr for ppc.David Smith2010-01-122-21/+1
| | | | | | | | * tapset/syscalls2.stp (syscall.readv): Removed old ppc hack. (syscall.writev): Ditto. * tapset/nd_syscalls2.stp (nd_syscall.readv): Removed mention of old ppc hack. (nd_syscall.writev): Ditto.
* Fixed PR 11162 by removing extra 'buf_uaddr' assignment.David Smith2010-01-121-1/+0
| | | | | * tapset/syscalls2.stp (syscall.pwrite32): Remove extra 'buf_uaddr' assignment.
* Make probe syscall.mmap2 optionalWenji Huang2010-01-041-3/+3
| | | | The function sys32_mmap2 is removed since 2.6.33.
* Fixup some memory tapset vm kernel function probe fallbacks.Mark Wielaard2009-12-291-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | Older kernels don't have all GFP constants defined, and the fallback kernel function probe fallbacks don't have the same dwarf variable names as the kernel trace point probes. So replace them with variables that are available. bytes_alloc was sometimes a long and sometimes a string, this caused scripts to fail depending on which alternative was chosen for a particular kernel. So make it a long always. This isn't a full solution since kmalloc is always inlined which makes the kernel.function("kmalloc").return probe fail. * tapset/memory.stp: Define __GFP_THISNODE, __GFP_RECLAIMABLE, GFP_TEMPORARY, GFP_HIGHUSER_MOVABLE and GFP_THISNODE when not yet defined. (__vm.kmalloc.kp): Use $flags, not $gfp_flags. Set bytes_alloc equal to bytes_req. (__vm.kmem_cache_alloc.kp): Likewise. And use $cachep->buffer_size for bytes_req. (__vm.kmalloc_node.kp): Likewise. (__vm.kmem_cache_alloc_node.kp): Likewise. (__vm.kfree.kp): Use $ibjp for ptr, not $return. (__vm.kmem_cache_free.kp): Likewise. * testsuite/buildok/vm.tracepoints.stp: Move vm.kmalloc test to... * testsuite/buildok/vm.tracepoints.kmalloc.stp: ... here.
* Guard SDEV_BLOCK and SDEV_CREATED_BLOCK in tapset/scsi.stp with #ifdef.Mark Wielaard2009-12-291-0/+4
| | | | | Older kernels didn't define these constants, which are only used in the tapset/scsi.stp describe_device_state() function.
* Define __GFP_MOVABLE GFP_ZONEMASK __GFP_NOTRACK in memory.stp if not there.Mark Wielaard2009-12-281-0/+16
| | | | | Older kernels might not have these defines available, so define them if not yet there.
* Updates to SCSI tapset scsi.stp and corresponding testcasesAndre Detsch2009-12-221-18/+115
|