summaryrefslogtreecommitdiffstats
path: root/tapset
Commit message (Collapse)AuthorAgeFilesLines
* Fix signal.send matching for 2.6.30+.Roland McGrath2009-07-091-26/+28
|
* 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.
* 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.
* 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>
* Correct misnamed variables in syscalls.stp.Przemyslaw Pawelczyk2009-05-191-33/+27
| | | | | | | Rename variables accordingly to argument names used in man pages in syscall.(faccess|fchmod|fchown|link|mknod)at probe points. Signed-off-by: Josh Stone <jistone@redhat.com>
* Complete the names-to-numbers conversion in nd_syscalls.stp.Przemyslaw Pawelczyk2009-05-181-980/+1711
| | | | | | | | Replace in-scope variables references with *_arg functions. Use 'kprobe' family of probes instead of 'kernel' family for dwarfless probing. Also fix a few typos and unify formatting. Signed-off-by: Josh Stone <jistone@redhat.com>
* Fix typo in mq_timedreceive probe point.Przemyslaw Pawelczyk2009-05-181-1/+1
| | | | * tapset/syscalls.stp: Rename abs_timout_uaddr to abs_timeout_uaddr.
* Fix inconsistent indentation for including header file in aux_syscalls.stp.Sunzen Wang2009-05-141-4/+4
| | | | * tapset/aux_syscalls.stp: Don't indent #include <linux/utime.h>.
* Implement caller:string() in terms of symname() and caller_addr().Mark Wielaard2009-05-131-8/+5
| | | | | * tapset/context-unwind.stp (caller): Implement as stap function using symname(), caller_addr() and sprintf().
* context tapset: sid() function to return task session leader pidMalte Nuhn2009-05-081-0/+12
|
* Fixed uaddr tapset function for ppc64 by adding task_pt_regs() definition.David Smith2009-04-301-0/+6
| | | | | | PR10117 fix. * tapset/context.stp: Added ppc64 task_pt_regs() definition if it dooesn't already exist.
* PR10007: Avoid probing syscall entry points in the testsuite.Ananth N Mavinakayanahalli2009-04-301-10/+14
| | | | While there, fix minor issues with the s390x syscall tapset.
* Make sure user_string_n() results are always zero terminated strings.Mark Wielaard2009-04-281-1/+4
| | | | | | * tapset/conversions.stp (user_string_n2): Explicitly null terminate return string. (user_string_n_warn): Likewise.
* Add function of returning the char in given position of stringWenji Huang2009-04-261-0/+12
| | | | | | * tapset/string.stp: New function stringat. * testsuite/systemtap.printf/char1.exp: Update test case. * testsuite/systemtap.printf/char1.stp: Ditto.
* Correct fd variable name in fadvise64 probe points.Przemyslaw Pawelczyk2009-04-251-4/+4
| | | | * tapset/syscalls.stp: Rename fs variable to fd.
* Mark uaddr tapset function as EXPERIMENTAL.Mark Wielaard2009-04-231-2/+4
| | | | | * tapset/context.stp (uaddr): Marked as experimental. Add FIXME for vdso tracking bug #10080.
* Mark ucontext tapset functions EXPERIMENTAL.Mark Wielaard2009-04-212-5/+5
| | | | | | * tapset/ucontext-symbols.stp (usymname, usymdata, print_ustack): mark EXPERIMENTAL. * tapset/ucontext-unwind.stp (print_ubacktrace, ubacktrace): Likewise.
* Add ubacktrace(), print_ustack() and print_ubacktrace().Mark Wielaard2009-04-212-0/+75
| | | | | | | | * runtime/sym.c (_stp_usymbol_print): New function. * tapset/ucontext-unwind.stp (print_ubacktrace): New tapset function. (ubacktrace): Likewise. * tapset/ucontext-symbols.stp (print_ustack): Likewise. * testsuite/buildok/ustack.stp: New test for above three functions.
* Remove documentation weirdness FIXME in tapset print_stack().Mark Wielaard2009-04-211-2/+2
| | | | | | Weirdness was fixed in commit d4db5608. * tapset/context-symbols.stp (print_stack): Remove FIXME.
* Pass task from tapset, through stack and unwind functions for lookup.Mark Wielaard2009-04-201-2/+2
| | | | | | | | | | | | | | | | | * runtime/stack-arm.c (__stp_stack_print): Take struct task_struct *. * runtime/stack-ia64.c (__stp_stack_print): Likewise. * runtime/stack-ppc64.c (__stp_stack_print): Likewise. * runtime/stack-s390.c (__stp_stack_print): Likewise. * runtime/stack-i386.c (__stp_stack_print): Likewise. And add check and pass to unwind() and _stp_func_print(). * runtime/stack-x86_64.c: Likewise. * runtime/stack.c *_stp_stack_print): Take and pass on task_struct. (_stp_stack_snprint): Likewise. * runtime/unwind.c (unwind): Take and use task_struct for _stp_mod_sec_lookup(). * tapset/context-unwind.stp (print_backtrace): Pass NULL to _stp_stack_print(). (backtrace): Pass NULL to _stp_stack_snprint().
* Avoid sign extension in syscall return values.David Smith2009-04-171-9/+15
| | | | | | | | 2009-04-17 David Smith <dsmith@redhat.com> * tapset/utrace.stp: Cast the return value of syscall_get_return_value() to an unsigned long to avoid sign extension.
* PR9953: split up the two process.* tapsetsJosh Stone2009-04-142-18/+18
| | | | | | | The overlapping process.* tapsets are now separated. Those probe points documented in stapprobes(3stap) remain the same. Those that were formerly in stapprobes.process(3stap) have been renamed to kprocess, to reflect their kernel perspective on processes.
* Add new TCP and IP functionsAndre Detsch2009-04-142-0/+140
| | | | | | | | | | | | | | | | | | | This patch adds some basic functions to the IP and TCP tapsets. Mainly, it's possible to get the iphdr and tcphdr from a sk_buff structure. As a consequence, a TCP probe called tcp.receive() was created and is probed every time a TCP packet is received, and a lot of useful fields is available, as the TCP flags. Also a small example that works like tcpdump for received TCP packets was created. This patch was tested on x86 and ppc machines, on 2.6.18 kernel and also on mainline one. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Josh Stone <jistone@redhat.com>
* Uses <asm/syscall.h> when available.David Smith2009-04-091-3/+5
| | | | | | | | | | | | | | | | | | | | 2009-04-09 David Smith <dsmith@redhat.com> * buildrun.cxx (compile_pass): Compile autoconf test for <asm/syscall.h>. * runtime/autoconf-asm-syscall.c: New "autoconf" test the presence of <asm/syscall.h>. * runtime/syscall.h: If <asm/syscall.h> exists, use it. Otherwise, use our private copy of the functions for each architecture. (syscall_get_nr): Renamed from __stp_user_syscall_nr(). (syscall_get_return_value): Renamed from __stp_user_syscall_return_value(). (syscall_get_arguments): Renamed from __stp_user_syscall_arg(). * runtime/task_finder.c (__stp_utrace_task_finder_target_syscall_exit): Uses new syscall.h functions. * tapset/utrace.stp: Ditto.