| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tapset/ioscheduler.stp (elv_next_request): Change to blk_peek_request.
* tapset/memory.stp (vm.pagefault): Replace $write_access.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
These are all the dwarfless analogs to $arch/syscalls.stp.
(Only i686 and x86_64 have been tested...)
|
| |
|
|
|
|
| |
This adds renameat, unlinkat, unshare, and compat_sys_semctl.
|
|
|
|
|
| |
* tapset/nd_syscalls2.stp (nd_syscall.open.return): Add commas after
alternatives.
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
| |
This applies some of the formatting rules specified in c0c1ccc.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: Josh Stone <jistone@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Analogue of commit 39a8b0bc.
Signed-off-by: Josh Stone <jistone@redhat.com>
|
|
|
|
|
|
| |
Rules were already specified in commit c0c1ccc6.
Signed-off-by: Josh Stone <jistone@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
* tapset/syscalls.stp: Rename abs_timout_uaddr to abs_timeout_uaddr.
|
|
|
|
| |
* tapset/aux_syscalls.stp: Don't indent #include <linux/utime.h>.
|
|
|
|
|
| |
* tapset/context-unwind.stp (caller): Implement as stap function using
symname(), caller_addr() and sprintf().
|
| |
|
|
|
|
|
|
| |
PR10117 fix.
* tapset/context.stp: Added ppc64 task_pt_regs() definition if it dooesn't
already exist.
|
|
|
|
| |
While there, fix minor issues with the s390x syscall tapset.
|
|
|
|
|
|
| |
* tapset/conversions.stp (user_string_n2): Explicitly null terminate
return string.
(user_string_n_warn): Likewise.
|
|
|
|
|
|
| |
* tapset/string.stp: New function stringat.
* testsuite/systemtap.printf/char1.exp: Update test case.
* testsuite/systemtap.printf/char1.stp: Ditto.
|
|
|
|
| |
* tapset/syscalls.stp: Rename fs variable to fd.
|
|
|
|
|
| |
* tapset/context.stp (uaddr): Marked as experimental. Add FIXME for vdso
tracking bug #10080.
|
|
|
|
|
|
| |
* tapset/ucontext-symbols.stp (usymname, usymdata, print_ustack):
mark EXPERIMENTAL.
* tapset/ucontext-unwind.stp (print_ubacktrace, ubacktrace): Likewise.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
Weirdness was fixed in commit d4db5608.
* tapset/context-symbols.stp (print_stack): Remove FIXME.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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().
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|