diff options
author | Dave Brolley <brolley@redhat.com> | 2010-02-15 13:59:24 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2010-02-15 13:59:24 -0500 |
commit | ed8abf2763d68a4404477e6b09fee0fe4d591970 (patch) | |
tree | a62ef645c92a11d334115eb9bb72e0271fc75bc5 /testsuite/systemtap.syscall/nd_sys.stp | |
parent | 27dc09b13650456b7b3efd45c07690083e526b6d (diff) | |
parent | c8408b459b88a5aa5f4325e690aef95b5da7c2eb (diff) | |
download | systemtap-steved-ed8abf2763d68a4404477e6b09fee0fe4d591970.tar.gz systemtap-steved-ed8abf2763d68a4404477e6b09fee0fe4d591970.tar.xz systemtap-steved-ed8abf2763d68a4404477e6b09fee0fe4d591970.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.syscall/nd_sys.stp')
-rwxr-xr-x | testsuite/systemtap.syscall/nd_sys.stp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/systemtap.syscall/nd_sys.stp b/testsuite/systemtap.syscall/nd_sys.stp new file mode 100755 index 00000000..5936cb77 --- /dev/null +++ b/testsuite/systemtap.syscall/nd_sys.stp @@ -0,0 +1,37 @@ +global indent, indent_str, entry_p + +probe begin { + indent = 0 + for (i=0; i<20; i++) { + if (i == 0) + indent_str[0] = "" + else + indent_str[i] = indent_str[i-1] . " " + } +} + + +probe nd_syscall.* ? { + if (pid() == target()) { + if (entry_p) printf("\n") + printf("%s%s: %s (%s) = ", indent_str[indent], execname(), name, argstr) +# printf("%s%s: %s (%s) = ", indent_str[indent], execname(), probefunc(), argstr) + indent++ + entry_p = 1 + } +} + +probe nd_syscall.*.return ? { + if (pid() == target()) { + if (indent) indent-- + if (entry_p) + printf("%s\n", retstr) + else + printf("%s%s\n", indent_str[indent],retstr) + entry_p = 0 + } +} + +probe end { + printf("\n") +} |