summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|\|
| * More gcc 4.5 'jump skips variable initialization' fixlets.Mark Wielaard2009-07-084-20/+41
| | | | | | | | | | | | | | | | | | * tapset/ioblock.stp (__bio_start_sect): Declare, then initialize variables that could (through kread) take an early jump. * tapset/nfs_proc.stp (get_prot_from_client): Likewise. * tapset/scsi.stp (scsi_timer_pending): Likewise. * tapset/task.stp (task_cpu): Likewise. (task_open_file_handles): Likewise.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-06-302-2/+15
|\|
| * Update memory and ioscheduler tapset for 2.6.31Wenji Huang2009-06-292-2/+15
| | | | | | | | | | * tapset/ioscheduler.stp (elv_next_request): Change to blk_peek_request. * tapset/memory.stp (vm.pagefault): Replace $write_access.
* | Disallow embedded C in tapset functions ifor unprivileged users unless ↵Dave Brolley2009-06-252-5/+5
|/ | | | tagged by /* unprivileged */.
* Remove unused strlens from str_replaceJosh Stone2009-06-221-2/+0
|
* Add str_replace() To TapsetsVarun Chandramohan2009-06-221-0/+33
| | | | | | | | | | | | | | | | | | This patch adds a search and replace string functionality to existing tapsets. The functionality is as follows: The function takes in a parent string and searches for a substring as specified by the user. If substring not found, the parent string is returned. If substring is found, it is replaced by another string and returned. NOTE: The function will search and replace all the occurrence of substrings in a parent string when matched. Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com> Signed-off-by: Josh Stone <jistone@redhat.com>
* Fix target_set tapset.Przemyslaw Pawelczyk2009-06-181-10/+18
| | | | | | | | Revise acquiring of pid and ppid in fork.return probe -- use returnval() and pid() instead of pid() and ppid() respectively. Add pid removal on exit syscall. Use dwarfless syscall probe aliases. Correct formatting. Signed-off-by: Josh Stone <jistone@redhat.com>
* Fix tokenize function and test.Przemyslaw Pawelczyk2009-06-171-8/+15
| | | | | | | | | | | | | | | | | Previous implementation was error-prone, because allowed returning empty tokens (mimiced strsep()), which is fine if there is a NULL semantic. Unfortunately SystemTap doesn't provide it in scripts and has only blank string (""), therefore testing against it was misleading. The solution is to return only non-empty tokens (mimic strtok()). * tapset/string.stp: Fix tokenize. * testsuite/systemtap.string/tokenize.stp: Improve and add case with more than one delimiter in the delim string. * testsuite/systemtap.string/tokenize.exp: Ditto. * stapfuncs.3stap.in: Update tokenize description. * doc/langref.tex: Ditto. Signed-off-by: Josh Stone <jistone@redhat.com>
* Add pgrp() context tapset function. Describe sid().Przemyslaw Pawelczyk2009-06-151-0/+13
| | | | | | | | * tapset/context.stp: Add pgrp() function. * testsuite/buildok/context_test.stp: Add pgrp() call. * stapfuncs.3stap.in: Describe pgrp() and sid(). Signed-off-by: Josh Stone <jistone@redhat.com>
* Add $arch/nd_syscalls.stpJosh Stone2009-06-025-0/+1419
| | | | | These are all the dwarfless analogs to $arch/syscalls.stp. (Only i686 and x86_64 have been tested...)
* Clean up the formatting of $arch/syscalls.stpJosh Stone2009-06-025-149/+224
|
* Complete a few TODO probe points in nd_syscalls2Josh Stone2009-06-021-39/+96
| | | | This adds renameat, unlinkat, unshare, and compat_sys_semctl.
* Fix nd_syscall2 open.return typo.Mark Wielaard2009-06-021-2/+2
| | | | | * tapset/nd_syscalls2.stp (nd_syscall.open.return): Add commas after alternatives.
* More nd_syscalls2 cleanup, and add SYSCALL_WRAPPERSJosh Stone2009-06-021-291/+575
| | | | | | | - Fix a few more formatting issues - Add SYSCALL_WRAPPERS analogous to 132c33 tapset/syscalls2.stp Thanks to Przemysław Pawełczyk for the helpful translation scripts.
* Fix a few variables in nd_syscalls2Josh Stone2009-05-291-13/+13
|