summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* PR10632: tapset: randint() function + testsRoland Grunberg2009-09-231-0/+18
|
* PR10390: ftrace() tapset functionFrank Ch. Eigler2009-09-231-4/+59
| | | | | | | | | | | * tapset/logging.stp (ftrace): New function. (*): Add kerneldoc to other functions. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Process logging.stp. * stapfuncs.3stap.in: Remove "LOGGING" section, now redundant. * runtime/autoconf-trace-printk.c: New autoconf test. * buildrun.cxx (compile_pass): Build it. * NEWS: Mention it. * testsuite/buildok/logging.stp: Test it.
* Don't mark print_ustack() as pure, it has side effects (printing the stack).Mark Wielaard2009-09-181-1/+1
| | | | * tapset/ucontext-symbols.stp (print_ustack): Remove /* pure */
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapWilliam Cohen2009-09-171-14/+6
|\
| * Remove temporaries in netdev.change_macJosh Stone2009-09-171-14/+6
| | | | | | | | | | | | | | | | | | As reported by dsmith, reusing temporary locals will prevent our limited optimizer from eliminating code. I'm getting rid of these particular locals altogether. * tapset/networking.stp (netdev.change_mac): Don't write mac intermediates into locals; just pass them directly to sprintf.
* | Add task_backtrace systemtap function.William Cohen2009-09-171-0/+13
|/
* PR10650: markup some unprivileged-safe tapset functionsFrank Ch. Eigler2009-09-168-61/+113
| | | | | | | | | | | | | | | | | Add /* unprivileged */ to a variety of tapset embedded-c functions, together with uid-assertion-checking code as needed. This is only an initial set, and may need to grow or shrink after further testing. Prototyped-By: Dave Brolley <brolley@redhat.com> * runtime/runtime.h (is_myproc, assert_is_myproc): New macros. * runtime/addr-map.c (lookup_bad_addr): Reject if !is_myproc in unprivileged mode. * runtime/print.c (_stp_print_kernel_info): Add unprivileged mode info. * tapset/DEVGUIDE: Document /* pure */ and /* unprivileged */. * tapset/*.stp: Add /* unprivileged */ here and there, in questionable cases along with an assert_is_myproc().
* Spelling fixes in the tapsetsJosh Stone2009-09-167-31/+30
|
* Adding a some new probes to the networking.stp tapsetBreno Leitao2009-09-161-0/+177
| | | | | | | | A tapset that helps those who are working with network devices. These new fnctions try to cover almost all functions related to these network devices. Signed-off-by: Josh Stone <jistone@redhat.com>
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-09-163-5/+28
|\
| * Use the sched_switch tracepoint if available.William Cohen2009-09-141-3/+3
| |
| * PR10613 sys32_ustat is renamed compat_sys_ustat in 2.6.30 kernel.Mark Wielaard2009-09-072-2/+25
| | | | | | | | | | | | | | | | | | | | Note that the new compat_sys_ustat is asmlinkage and has a differently named argument for the user struct. * tapset/syscalls2.stp (syscall.ustat32): Add compat_sys_ustat variant. (syscall.ustat.return): Likewise. * tapset/nd_syscalls2.stp (nd_syscall.ustat32): Likewise. (nd_syscall.ustat.return): Likewise.
* | Create is_myproc helper function.Dave Brolley2009-09-161-0/+14
|/
* Use a header-cast in nd_syscall.sigaltstackJosh Stone2009-08-311-1/+2
| | | | | | | | | The nd_syscalls tapset is meant to run with no debuginfo, so using a @cast into a module type defeats the purpose. We should use a @cast with a header name instead, so debuginfo is generated. * tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Get the pt_regs type definition from "kernel<asm/ptrace.h>".
* Mirror the sys_sigaltstack fix in nd_syscallsJosh Stone2009-08-311-2/+2
| | | | | | | The argument fix in commit 77c26b4 needs to be made in nd_syscalls too, where the conditional kernel should be 2.6.30 instead of 2.6.29. * tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Check 2.6.30.
* Fix sys_sigaltstack ussp conditional.Mark Wielaard2009-08-291-1/+1
| | | | | | | | For i386 sys_sigaltstack changed argument params starting with kernel commit b12bda which was only included in 2.6.30, not in any 2.6.29 kernel. * tapset/i386/syscalls.stp (sys_sigaltstack): ussp conditional should be kernel_v < "2.6.30" for param change (from bx to regs).
* Use || and && in preprocessor's conditions in tapsets.Przemyslaw Pawelczyk2009-08-281-13/+3
| | | | Signed-off-by: Josh Stone <jistone@redhat.com>
* Cleanup some deref handling in the task tapsetJosh Stone2009-08-261-11/+20
| | | | | | | | | | | | | Some of this is just cosmetic, but there is one big takeaway: there's a error-goto between kread calls and the CATCH_DEREF_FAULT. You must not allow this to bypass any resource management, like unlocking a resource that you grabbed! * tapset/task.stp (pid2task): No derefs, so remove the CATCH. (task_gid, task_egid, task_uid, task_euid): Move the CATCH within the #ifdef branch that actually needs it. (task_open_file_handles, task_max_file_handles): Ensure that we always call rcu_read_unlock if we locked it!
* Correct a few comments to match the codeJosh Stone2009-08-263-6/+6
| | | | | | | * tapset/conversions.stp (kernel_long, kernel_int, kernel_short, kernel_char): All are actually using kread(), not deref(). * tapset/i386/registers.stp (_stp_arg): Ditto. * tapset/x86_64/registers.stp (_stp_arg): Ditto.
* PR4186 cont'd: option #2: standardize on kernel ARCH/SUBARCH throughoutFrank Ch. Eigler2009-08-259-12/+12
| | | | | | | | * main.cxx (main): Perform equivalent sed by hand on uname()->machine. * stap.1.in: Clarify -a ARCH slightly. * tapsets.cxx (validate_module_elf): Accept "arm*"for EM_ARM. * tapset/**, testsuite/**: Removed/collapsed "i386"/"i686" branches, renamed "ppc64"->"powerpc" and "s390x"->"s390".
* PR4186 cont'd: move tapset/i686 -> tapset/i386Frank Ch. Eigler2009-08-243-0/+0
|
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-08-041-0/+267
|\ | | | | | | | | | | Conflicts: cache.cxx
| * PR10204: Place userspace markers in systemtap itselfKent Sebastian2009-07-311-0/+267
| | | | | | | | * tapset/stap_staticmarkers.stp: new file (for real this time)
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-237-145/+339
|\|
| * PR10421: Update task.stp for 2.6.31Wenji Huang2009-07-211-3/+9
| | | | | | | | * tapset/task.stp (pid2task): Use find_get_pid for 2.6.31.
| * Fixes for 2.6.31. There are some changes in sk_buff structure those causeDavid J. Wilder2009-07-202-10/+81
| | | | | | | | | | failures of compiling ipmib.stp and tcpmib.stp, rtable and dst fields are deleted.
| * Tweak kernel or module resident probeWenji Huang2009-07-193-132/+132
| | | | | | | | | | | | * tapset/nfs_proc.stp: Change '?' notation to "!". * tapset/nfsd.stp: Ditto. * tapset/scsi.stp: Ditto.
| * PR10410: dentry tapset, autofs4 sampleJeff Moyer2009-07-171-0/+117
| | | | | | | | | | | | | | * tapset/dentry.stp: New d_path, d_name, reverse_path_walk. * .../examples/.../autofs4.*: New autofs demo. Signed-off-by: Frank Ch. Eigler <fche@elastic.org>
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-173-0/+968
|\|
| * This SNMP group of tapsets provides probes used to count SNMP managementDavid J. Wilder2009-07-163-0/+968
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | events. The probes mirror many of the SNMP statistics defined in /usr/include/linux/snmp.h. Each probe represents a single SNMP statistic or MIB. Each of the probe's handler is called when system performs an operation that would alter the associated statistic. Along with each probe is defined an indexed set of counters used to record probe hits. The probe handlers call a user supplied callback functions to determine which counter to alter. The user's callback should returns a key value that will be used to index the counter. For example a callback could return a unique value for each socket. This would results in a separate counter being used for each socket. tcpipstat.stp shows how snmp tapsets could be used. Tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets. Signed-off-by: David Wilder <dwilder@us.ibm.com>
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-131-2/+5
|\| | | | | | | | | | | Conflicts: main.cxx
| * Don't accidentially use user space ntohs function.Mark Wielaard2009-07-111-2/+5
| | | | | | | | | | | | | | | | | | The definition of ntohs comes from user space include headers netinet/in.h which could define it as function instead of macro. So use builtin kernel be16_to_cpu instead. * tapset/aux_syscalls.stp (_struct_sockaddr_u): Define and use _stp_ntohs as be16_to_cpu.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-101-26/+28
|\|
| * Fix signal.send matching for 2.6.30+.Roland McGrath2009-07-091-26/+28
| |
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-084-20/+41
|\|