summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Clean up nd_syscalls2 formattingJosh Stone2009-05-291-556/+786
| | | | This applies some of the formatting rules specified in c0c1ccc.
* Kill trailing whitespace in nd_syscalls[2]Josh Stone2009-05-292-144/+144
|
* Convert nd_syscalls2 to kprobe.functionJosh Stone2009-05-291-437/+437
|
* Create nd_syscalls2.stpJoeLynn Keniston2009-05-291-0/+3916
| | | | | | | This contains an initial transformation of syscalls2.stp to start using numbered parameter access instead of relying on dwarf. Signed-off-by: Josh Stone <jistone@redhat.com>
* Add ucontext-symbols and ucontext-unwind tapset functions to the manual.Mark Wielaard2009-05-281-1/+0
| | | | | | | * tapset/ucontext-unwind.stp (ubacktrace): Remove empty line before function triggering parse errors for doc scanner. * doc/SystemTap_Tapset_Reference/tapsets.tmpl (chapter context_stp): Add tapset/ucontext-symbols.stp and tapset/ucontext-unwind.stp.
* Fix nd_syscalls.stp for architectures using SYSCALL_WRAPPERS.Przemyslaw Pawelczyk2009-05-261-305/+568
| | | | | | | | | | | | Add kprobe.function("SyS_*") probe points to nd_syscall.* probe aliases. Analogue of commit 132c337c with two exceptions: - remove sufficiency of these new probe points (use '?' instead of '!'), because translator always considers them resolved, - make non-SyS probe points optional in probe aliases affected by syscall wrappers, because otherwise they will fail on such architectures. Signed-off-by: Josh Stone <jistone@redhat.com>
* Move the "pure" tag into the body of __is_user_regsJosh Stone2009-05-222-2/+4
| | | | | | The "/* pure */" tag has no effect unless it is within the embedded-C body of a function. In this instance, they were accidentally moved out during the syscall cleanups.
* Use embedded-C for empty functionsJosh Stone2009-05-223-12/+6
| | | | | | | | | | The functions asmlinkage() and fastcall() are used to help access syscall parameters on i686. All other archs don't need this, but they still define empty functions to shield the callers from arch details. However, stap issues warnings for empty script-level functions. This patch changes them to "%{ /* pure */ %}" so there's no complaint, and they will still get optimized away.
* Uncomment 'name' variable in nd_syscall.lseek probe point.Przemyslaw Pawelczyk2009-05-221-1/+1
| | | | Signed-off-by: Josh Stone <jistone@redhat.com>
* Add missing probe points in nd_syscalls.stp.Przemyslaw Pawelczyk2009-05-221-0/+154
| | | | | | | | Add probe points for faccessat, fchmodat, fchownat, linkat and mknodat. Analogue of commits: a3d153e5, 335972be, 46e2c2c1, c815c982, dac6e242 and bad69f1d. Signed-off-by: Josh Stone <jistone@redhat.com>
* Remove return probes for exit[_group] in nd_syscalls.stp.Przemyslaw Pawelczyk2009-05-221-3/+4
| | | | | | Analogue of commit 39a8b0bc. Signed-off-by: Josh Stone <jistone@redhat.com>
* Unify formatting of nd_syscalls.stp.Przemyslaw Pawelczyk2009-05-221-110/+103
| | | | | | Rules were already specified in commit c0c1ccc6. Signed-off-by: Josh Stone <jistone@redhat.com>
* PR10177: init/kill time in sleepy context onlyJosh Stone2009-05-201-15/+2
| | | | | | | | | | | | Previously, _stp_init_time and _stp_kill_time were being called from begin/end/error probes, which will run with preemption disabled. The BUG reported on RT kernels showed that cpufreq_unregister_notifier can end up sleeping, which violates our preemption block. This patch moves the init/kill into systemtap_module_init/exit, where it is safe to sleep. The code maintains a new predicate with the define STAP_NEED_GETTIMEOFDAY, so we don't still incur any timer overhead if it's not used.
* Adapt sid to latest kernelWenji Huang2009-05-191-0/+4
|
* Fix alignment of probe aliases in syscalls(|2).stp.Przemyslaw Pawelczyk2009-05-192-736/+736
| | | | | | | Align probe points in probe aliases to equal sign using spaces as it's already done in nd_syscalls.stp. Signed-off-by: Josh Stone <jistone@redhat.com>
* Unify formatting of syscalls.stp and syscalls2.stp.Przemyslaw Pawelczyk2009-05-192-1059/+1407
| | | | | | | | | | | | | | | Rules: - Specify probe points for aliases starting from the alias declaration line and with one probe point per line. - Use K&R indent style -- probe alias/point/function opening brace goes to the line following the declaration, other opening braces are kept on the same line as the control statements. - Indent using tabs. - Surround operators with spaces. - Put spaces after commas. - Avoid trailing whitespaces. Signed-off-by: Josh Stone <jistone@redhat.com>