]> sourceware.org Git - systemtap.git/log
systemtap.git
9 years agolisting_mode.exp: update for RHEL5
Jonathan Lebon [Mon, 22 Dec 2014 17:21:40 +0000 (12:21 -0500)]
listing_mode.exp: update for RHEL5

The listing_mode.exp testcase showed multiple failures on RHEL5. This
commit fixes these errors by making perf probe testing conditional on
system support and by adjusting linenos to play nice with RHEL5's GCC.

9 years agoNEWS: add blurb about PR17190
Jonathan Lebon [Mon, 6 Oct 2014 21:06:34 +0000 (17:06 -0400)]
NEWS: add blurb about PR17190

9 years agoscripts/update-docs: pass on some learned wisdom during startup
Frank Ch. Eigler [Mon, 22 Dec 2014 17:40:50 +0000 (12:40 -0500)]
scripts/update-docs: pass on some learned wisdom during startup

9 years agostap.1 option doc tweaks
Frank Ch. Eigler [Mon, 22 Dec 2014 17:31:06 +0000 (12:31 -0500)]
stap.1 option doc tweaks

9 years agoregenerate configury with fedora-21 auto* toolchain
Frank Ch. Eigler [Mon, 22 Dec 2014 17:02:35 +0000 (12:02 -0500)]
regenerate configury with fedora-21 auto* toolchain

9 years agoPR17737: tapset-reference html chapters should not get <toc>
Frank Ch. Eigler [Mon, 22 Dec 2014 16:59:40 +0000 (11:59 -0500)]
PR17737: tapset-reference html chapters should not get <toc>

The docbook xsl-stylesheets' html output normally includes generated
TOC for incoming <chapter> blocks.  Suppress this with a cunning
choice of generate.toc --stringparam for the xmlto.  (On F21 at least,
the parameter needs to contain an embedded \ apparently due to layers
of being passed between shell scripts and xml parsers and whatnot.
Sorry.)

9 years agoFix PR17292 parse error of string auto-concatenation in printf statement.
Hushan Jia [Mon, 22 Dec 2014 15:08:20 +0000 (09:08 -0600)]
Fix PR17292 parse error of string auto-concatenation in printf statement.

Use multi part string concatenation as the format string of printf
statement will cuase following parse error:

$ /usr/bin/stap -p1 testsuite/parseok/strconcat.stp
parse error: expected ','
        saw: string 'bar' at testsuite/parseok/strconcat.stp:6:19
     source:     printf("foo " "bar" "\n")
                               ^

1 parse error.
Pass 1: parse failed.  [man error::pass1]

This fix is suggested by fche.

9 years agoFixed PR17270 by updating "on the fly" tests for ppc64.
David Smith [Wed, 17 Dec 2014 17:38:45 +0000 (11:38 -0600)]
Fixed PR17270 by updating "on the fly" tests for ppc64.

* translate.cxx (c_unparser::emit_module_refresh): Don't print debug
  message in STAP_SESSION_STOPPING state.
* testsuite/systemtap.onthefly/hrtimer_onthefly.exp: On ppc64, don't probe
  kernel tracepoints causing a crash.
* testsuite/systemtap.onthefly/kprobes_onthefly.exp: Ditto.
* testsuite/systemtap.onthefly/uprobes_onthefly.exp: Ditto.

9 years agoFix PR17688 by updating the nfs tapset for kernels >= 3.16.
David Smith [Tue, 16 Dec 2014 16:58:05 +0000 (10:58 -0600)]
Fix PR17688 by updating the nfs tapset for kernels >= 3.16.

* tapset/linux/nfs.stp (nfs.fop.aio_read): Only use if the kernel version
  is less than 3.16. Upstream kernel has switched from aio_{read,write} to
  {read_write}_iter, but using the same function names.
  (nfs.fop.aio_write): Ditto.
  (nfs.fop.read_iter): New probe for kernel versions >= 3.16.
  (nfs.fop.write_iter): Ditto.
* testsuite/buildok/nfs-detailed.stp: Added new tests.

9 years agoImprove the output of cycle_thief.stp to include executable name
William Cohen [Mon, 15 Dec 2014 19:45:40 +0000 (14:45 -0500)]
Improve the output of cycle_thief.stp to include executable name

Jeremy Eder suggested that it would be good to include the executable
name in the output to save people the step of looking up the
executable name of the various PIDs.  The change also includes a
header for the output in that section to make it clearer what each
column is.

9 years agoPR17706: Fix filename in syscall.openat for s390.
Martin Cermak [Mon, 15 Dec 2014 06:02:45 +0000 (07:02 +0100)]
PR17706: Fix filename in syscall.openat for s390.

9 years agofix bashisms in stap-report script
Oleksandr Chumachenko [Sun, 14 Dec 2014 15:00:32 +0000 (10:00 -0500)]
fix bashisms in stap-report script

stap-report shell script contains bashisms that may be unsupported in
some POSIX-complete shells.

9 years agoPR16716 partial fix: Fix types in 'syscall.{[f]truncate,[f]statfs,umask,ustat}'
David Smith [Fri, 12 Dec 2014 21:19:35 +0000 (15:19 -0600)]
PR16716 partial fix: Fix types in 'syscall.{[f]truncate,[f]statfs,umask,ustat}'

* runtime/linux/compat_unistd.h: Add ftruncate/truncate defines.
* tapset/linux/aux_syscalls.stp (_sched_policy_str): Improved.
  (_mountflags_str): Updated using _stp_lookup_or_str().
  (_umountflags_str): Ditto.
  (__long): New function.
* tapset/linux/syscalls.stp: Fixed types in fstatfs, fstatfs64, and
  ftruncate.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Fixed types in statfs64, truncate, umask,
  ustat, and ustat32.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/powerpc/nd_syscalls.stp: Added arch-specific compat
  ftruncate64 and truncate64 probes.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/x86_64/nd_syscalls.stp: Ditto.
* tapset/linux/x86_64/syscalls.stp: Ditto.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Added tests for new probes.
* testsuite/buildok/syscalls-arch-detailed.stp: Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added test.
* testsuite/systemtap.syscall/ioperm.c: Minor update.
* testsuite/systemtap.syscall/mount.c: Expects new output.
* testsuite/systemtap.syscall/sched_setscheduler.c: Ditto.
* testsuite/systemtap.syscall/signal.c: Minor update.
* testsuite/systemtap.syscall/statfs.c: Add more tests.
* testsuite/systemtap.syscall/trunc.c: Ditto.
* testsuite/systemtap.syscall/umask.c: Ditto.

9 years agoFix PR17690 by adding support for asynchronous NFS rename operations.
David Smith [Fri, 12 Dec 2014 19:06:14 +0000 (13:06 -0600)]
Fix PR17690 by adding support for asynchronous NFS rename operations.

* tapset/linux/nfs_proc.stp (nfs.proc.rename_setup): Added to support
  asynchronous NFS client rename operations.
  (nfs.proc2.rename_setup): Ditto.
  (nfs.proc3.rename_setup): Ditto.
  (nfs.proc4.rename_setup): Ditto.
  (nfs.proc.rename_done): Ditto.
  (nfs.proc2.rename_done): Ditto.
  (nfs.proc3.rename_done): Ditto.
  (nfs.proc4.rename_done): Ditto.
  (nfs.proc3.rename): Provide default values if the probe point doesn't
  exist.
  (nfs.proc4.rename): Ditto.
  (nfs.proc3.read_setup): Update to handle new argument names.
  (nfs.proc4.read_setup): Ditto.
  (nfs.proc3.read_done): Ditto.
  (nfs.proc4.read_done): Ditto.
  (nfs.proc3.write_setup): Ditto.
  (nfs.proc4.write_setup): Ditto.
  (nfs.proc3.write_done): Ditto.
  (nfs.proc4.write_done): Ditto.
* testsuite/buildok/nfs_proc-detailed.stp: Update to handle new probe
  points.

9 years agoman/stapprobes for syscalls: note $var narrowing risk
Frank Ch. Eigler [Fri, 12 Dec 2014 17:43:12 +0000 (12:43 -0500)]
man/stapprobes for syscalls: note $var narrowing risk

9 years agoAllow syscall tests to match the arm64 remapped syscalls:
Martin Cermak [Fri, 12 Dec 2014 09:51:07 +0000 (10:51 +0100)]
Allow syscall tests to match the arm64 remapped syscalls:

* testsuite/systemtap.syscall/openclose.c
* testsuite/systemtap.syscall/poll.c
* testsuite/systemtap.syscall/sched_setscheduler.c
* testsuite/systemtap.syscall/select.c
* testsuite/systemtap.syscall/statfs.c

9 years agoPR16716 partial fix: Fix types in syscall.ioperm
Martin Cermak [Wed, 10 Dec 2014 05:36:10 +0000 (06:36 +0100)]
PR16716 partial fix: Fix types in syscall.ioperm

* tapset/linux/nd_syscalls.stp: Fix types
* tapset/linux/syscalls.stp: Fix types
* testsuite/systemtap.syscall/ioperm.c: New testcase
* testsuite/systemtap.syscall/getdents.c: Fix coverage

9 years agoBZ117823: Simplify fix using typed-integers.
David Smith [Mon, 8 Dec 2014 22:17:06 +0000 (16:17 -0600)]
BZ117823: Simplify fix using typed-integers.

* tapset/linux/nfsd.stp: Simplify __svc_fh() fix which removes macro.

9 years agoFix the SDT_V3 operand handling to recognize arm64 style address modes
William Cohen [Mon, 8 Dec 2014 21:25:37 +0000 (16:25 -0500)]
Fix the SDT_V3 operand handling to recognize arm64 style address modes

The arm64 address operands are very similar to 32-bit arm address
operands, but they are not identical.  The arm64 versions may lack
white space and the '#' before the offset value.  The regular
expression matching has been adjusted to recognized both 32-bit and
64-bit arm versions.

9 years agoImplement arm64 support in __is_user_regs
William Cohen [Mon, 8 Dec 2014 20:20:53 +0000 (15:20 -0500)]
Implement arm64 support in __is_user_regs

9 years agoFix BZ1171823 by updating the __svc_fh() nfsd tapset function.
David Smith [Mon, 8 Dec 2014 20:04:19 +0000 (14:04 -0600)]
Fix BZ1171823 by updating the __svc_fh() nfsd tapset function.

* tapset/linux/nfsd.stp: Rewrite __svc_fh() in systemtap script language
  instead of embedded-C to get around the disappearance of struct svc_fh's
  declaration from a public kernel header file.

9 years agoAllow speculate.exp to use syscall.openat on arm64
William Cohen [Mon, 8 Dec 2014 19:39:25 +0000 (14:39 -0500)]
Allow speculate.exp to use syscall.openat on arm64

On arm64 the syscall.open is deprecated and will never be used.  The
arm64 will use syscall.openat instead.  The speculate.exp test has
been adjusted accept syscall.openat in the place of syscall.open.

9 years agoAllow pp.exp to use syscall.openat on arm64
William Cohen [Mon, 8 Dec 2014 17:08:05 +0000 (12:08 -0500)]
Allow pp.exp to use syscall.openat on arm64

On arm64 the syscall.open is deprecated and will never be used.  The
arm64 will use syscall.openat instead.  The pp.exp test has been
adjusted accept syscall.openat in the place of syscall.open.

9 years agoCorrections to global_var_kernel.stp tests
William Cohen [Mon, 8 Dec 2014 14:47:41 +0000 (09:47 -0500)]
Corrections to global_var_kernel.stp tests

Newer kernels have moved kernel/time.c to kernel/time/time.c and the
@var() statements need to be less picky where it looks for sys_tz.
Also some machines such as the arm64 use the syscall.openat than
the deprecated syscall.open.

9 years agoPR16716 partial fix: Fix types in 'syscall.sched_{{get,set}param,get_priority_{max...
Martin Cermak [Fri, 5 Dec 2014 16:38:50 +0000 (17:38 +0100)]
PR16716 partial fix: Fix types in 'syscall.sched_{{get,set}param,get_priority_{max,min},yield}'

* tapset/linux/aux_syscalls.stp: Fix handling negative args in _sched_policy_str()
* tapset/linux/nd_syscalls2.stp: Fix argstr in sched_get_priority_{max,min}
* tapset/linux/syscalls2.stp: Fix types and argstr in sched_get_priority_{max,min}
  and sched_{get,set}param
* testsuite/systemtap.syscall/mknod.c: Use thin wrapper around the syscall()
* testsuite/systemtap.syscall/sched.c: New testcase

9 years agoPR16716 partial fix: Fix types in 'syscall.{ioprio_[gs]et,sched_setaffinity}'.
David Smith [Thu, 4 Dec 2014 19:59:11 +0000 (13:59 -0600)]
PR16716 partial fix: Fix types in 'syscall.{ioprio_[gs]et,sched_setaffinity}'.

* tapset/linux/syscalls.stp: Fixed types in syscall.ioprio_get and
  syscall.ioprio_set.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Updated syscall.sched_getaffinity and fixed
  types and added 32-bit support to syscall.sched_setaffinity.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_mknod_mode_str): Simplified.
  (_stp_ioprio_which_str): New function.
  (_stp_ioprio_value_str): Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added test for new functions.
* testsuite/buildok/syscalls-detailed.stp: Tests new convience variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/mknod.c: Updated.
* testsuite/systemtap.syscall/sched_getaffinity.c: Updated.
* testsuite/systemtap.syscall/ioprio.c: New test case.
* testsuite/systemtap.syscall/sched_setaffinity.c: Ditto.

9 years agoPR16716 partial fix: Fix types in syscall.mknod[at]
Martin Cermak [Wed, 3 Dec 2014 09:15:36 +0000 (10:15 +0100)]
PR16716 partial fix: Fix types in syscall.mknod[at]

* runtime/linux/compat_unistd.h: Added more compat defines
* tapset/linux/aux_syscalls.stp: Fixed types and neesting
* tapset/linux/syscalls.stp: Fixed types and neesting
* testsuite/systemtap.syscall/mknod.c: new testcase

9 years agoRHBZ1126645: New regression testcase.
Martin Cermak [Tue, 2 Dec 2014 16:16:50 +0000 (17:16 +0100)]
RHBZ1126645: New regression testcase.

9 years agoPR16716 partial fix: Fix types in 'syscall.{get,list,remove,set}xattr'.
David Smith [Mon, 1 Dec 2014 22:22:23 +0000 (16:22 -0600)]
PR16716 partial fix: Fix types in 'syscall.{get,list,remove,set}xattr'.

* tapset/linux/syscalls.stp: Fix types in syscall.fgetxattr,
  syscall.flistxattr, syscall.fremovexattr, syscall.fsetxattr,
  syscall.getxattr, syscall.lgetxattr, syscall.listxattr,
  syscall.llistxattr, and syscall.lsetxattr.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/syscalls2.stp: Fix types in syscall.setxattr.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_stp_xattr_flags): New function.
  (_stp_xattr_val_str): Ditto.
* testsuite/buildok/aux_syscalls-embedded.stp: Added new functions.
* testsuite/buildok/syscalls-detailed.stp: Test new convenience variables.
* testsuite/buildok/syscalls2-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/systemtap.syscall/fxattr.c: New test case.
* testsuite/systemtap.syscall/lxattr.c: Ditto.
* testsuite/systemtap.syscall/xattr.c: Dito.

9 years agoAllow systemtap.base/warnings.exp to work with newer kernels
William Cohen [Fri, 28 Nov 2014 05:01:50 +0000 (00:01 -0500)]
Allow systemtap.base/warnings.exp to work with newer kernels

Linux kernel commit f9c78b2be2cac2a7a397d489275e7d9f9ae785f2 moved
fs/bio.c to block/bio.c. Adjusted the test to be less picky about the
location of bio.c file.

9 years agoFix stat.c syscall test matching for arm64
William Cohen [Fri, 28 Nov 2014 04:52:35 +0000 (23:52 -0500)]
Fix stat.c syscall test matching for arm64

9 years agoAllow at_var_tracepoint.stp to handle time.c move in newer Linux kernels
William Cohen [Fri, 28 Nov 2014 02:53:16 +0000 (21:53 -0500)]
Allow at_var_tracepoint.stp to handle time.c move in newer Linux kernels

Kernel commit 5cee964597260237dd2cabb3ec22bba0da24b25d moved time.c
from kernel/time.c to kernel/time/time.c.  The at_var_tracepoint.stp
test was failing because of the changed location of the file.  The
test should not over specify the location of the time.c file.  This
change should work with both old and new kernels.

9 years agoRemove <stdint.h> from <sys/sdt.h>
Chung-Lin Tang [Tue, 21 Oct 2014 09:09:25 +0000 (17:09 +0800)]
Remove <stdint.h> from <sys/sdt.h>

9 years agoRHBZ1167652: Boot time probing feature fix
Martin Cermak [Tue, 25 Nov 2014 14:58:29 +0000 (15:58 +0100)]
RHBZ1167652: Boot time probing feature fix

* initscript/systemtap.in: Fix regenerating initramfs image
  without the stap module

9 years agoSplit the access of sp from the rest of pt_regs regs[] accesses
William Cohen [Fri, 21 Nov 2014 15:58:16 +0000 (10:58 -0500)]
Split the access of sp from the rest of pt_regs regs[] accesses

The pt_regs struct has regs[0] through regs[30].  The sp is a separate
field and not regs[31] in the regs array.  The compiler will fail to
compile modules when the code includes accesses to the sp because of
the warnings.  This change splits out sp (and all the other reg)
accesses so this code compiles correctly without warnings.  This
issues observed with the systemtap.base/rlimit.exp tests failures.
The rlimit.exp tests now all pass with the patch.

9 years agoRecognize the arm64 registers in SDT_V3 format
William Cohen [Fri, 21 Nov 2014 15:17:12 +0000 (10:17 -0500)]
Recognize the arm64 registers in SDT_V3 format

The check for the arm64 architecture was missing, so systemtap was not
recognizing the arm64 registers.  This addition should allow systemtap
to find the various arguments being passed in by user-space markers.

9 years agoAllow syscall tests to match the arm64 remapped syscalls
William Cohen [Fri, 21 Nov 2014 01:04:23 +0000 (20:04 -0500)]
Allow syscall tests to match the arm64 remapped syscalls

The arm64 does not implement a number of deprecated syscalls.  The
deprecated syscalls are remapped to more generic syscalls with the
additional arguments set to so the remapped systemcall emulates the
behavior the deprecated syscalls.  The syscall tests matching needed
to be adjusted to match these remaped syscalls for inotify_init(),
pipe(), select(), and vfork().  These fixes are applied to the
following tests:

* systemtap.syscall/inotify.c
* systemtap.syscall/pipe.c
* systemtap.syscall/recv.c
* systemtap.syscall/recvfrom.c
* systemtap.syscall/recvmmsg.c
* stemtap.syscall/recvmsg.c
* systemtap.syscall/select.c
* systemtap.syscall/vforkwait.c

9 years agoKFAIL more plt and callee probe types in systemtap.base/listing_mode.exp.
David Smith [Thu, 20 Nov 2014 22:55:23 +0000 (16:55 -0600)]
KFAIL more plt and callee probe types in systemtap.base/listing_mode.exp.

9 years agoPR17126: put hcall_* kernel tracepoints into blacklist for powerpc
Frank Ch. Eigler [Thu, 20 Nov 2014 21:30:20 +0000 (16:30 -0500)]
PR17126: put hcall_* kernel tracepoints into blacklist for powerpc

* tapsets.cxx (tracepoint_query::handle_query_func): Implement
  baby blacklist.

9 years agoAdd more checks for uprobes in the testsuite when needed.
David Smith [Thu, 20 Nov 2014 20:28:11 +0000 (14:28 -0600)]
Add more checks for uprobes in the testsuite when needed.

* testsuite/systemtap.base/callee.exp: Add uprobes_p test.
* testsuite/systemtap.base/pr16719.exp: Ditto.
* testsuite/systemtap.base/sdt_misc.exp: Ditto.
* testsuite/systemtap.base/stmt_inlines.exp: Ditto.
* testsuite/systemtap.base/utrace_syscall_args.exp: Add utrace_p test.
* testsuite/systemtap.examples/general/py2example.tcl: New file containing
  uprobes_p test.
* testsuite/systemtap.examples/general/py3example.tcl: Ditto.
* testsuite/systemtap.examples/memory/last_100_frees.tcl: Ditto.

9 years agoPR16716 partial fix: Fix types in 'syscall.{semctl,semget,semop,semtimedop}'.
David Smith [Thu, 20 Nov 2014 15:34:08 +0000 (09:34 -0600)]
PR16716 partial fix: Fix types in 'syscall.{semctl,semget,semop,semtimedop}'.

* tapset/linux/syscalls2.stp: Fix types and nesting in syscall.semctl,
  syscall.semget, syscall.semop, and syscall.semtimedop.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/aux_syscalls.stp: Add SEMOP, SEMCTL, and SEMTIMEDOP defines
  when needed.
* tapset/linux/syscalls.stpm: Add __compat_syscall_gate_negative macro.
* tapset/linux/s390/syscalls.stp: Since syscall.ipc was interferring with
  the new syscall.sem* work, go ahead and deprecate syscall.ipc now.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/semctl.c: New testcase.
* testsuite/systemtap.syscall/semget.c: Ditto.
* testsuite/systemtap.syscall/semop.c: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Add tests for new convenience vars.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/syscalls-arch-detailed.stp: Only test s390x
  syscall.ipc when needed.
* testsuite/buildok/nd_syscalls-arch-detailed.stp:: Ditto.

9 years agoUpdated COVERAGE lines in syscall test cases.
David Smith [Wed, 19 Nov 2014 21:13:37 +0000 (15:13 -0600)]
Updated COVERAGE lines in syscall test cases.

* testsuite/systemtap.syscall/mmap.c: Updated COVERAGE line.
* testsuite/systemtap.syscall/pread.c: Ditto.
* testsuite/systemtap.syscall/pwrite.c: Ditto.
* testsuite/systemtap.syscall/signalfd.c: Ditto.
* testsuite/systemtap.syscall/statfs.c: Ditto.

9 years ago16716 partial fix: Fix types in 'syscall.{io_setup,io_submit,io_getevents,io_cancel...
Martin Cermak [Wed, 19 Nov 2014 18:00:22 +0000 (19:00 +0100)]
16716 partial fix: Fix types in 'syscall.{io_setup,io_submit,io_getevents,io_cancel,io_destroy}

* tapset/linux/nd_syscalls.stp: Fixed types and nesting
* tapset/linux/syscalls.stp: Fixed types and nesting
* testsuite/systemtap.syscall/aio.c: New testcase

9 years agoAdd arm64 loader to the whitelist of interpreters
William Cohen [Wed, 19 Nov 2014 14:48:49 +0000 (09:48 -0500)]
Add arm64 loader to the whitelist of interpreters

All the systemtap.base/listing_mode.exp tests that probed the library
were failing (pr17622) because the code did not have the arm64 loader
whitelisted.  Added the appropriate arm64 loader to the whitelist to
resolve this issue.

9 years agoruntime: fix kernel relocation basis symbol on ppc64le
Frank Ch. Eigler [Fri, 14 Nov 2014 20:04:53 +0000 (15:04 -0500)]
runtime: fix kernel relocation basis symbol on ppc64le

It's _stext, not .__start (as on normal ppc64).

9 years agoCorrect nodebug mkdirat syscall argstr
William Cohen [Fri, 14 Nov 2014 04:52:44 +0000 (23:52 -0500)]
Correct nodebug mkdirat syscall argstr

The debuginfo mkdirat syscall prints a string for the first argument.
However, the nodebug version just printed the numerical value of the
first arg.  Some of the testsuite/systemtap.syscall/nd_syscall.exp
tests were failing because of the difference in output.

9 years agoImprove arm64 syscall/nd_syscall test results
William Cohen [Fri, 14 Nov 2014 04:39:27 +0000 (23:39 -0500)]
Improve arm64 syscall/nd_syscall test results

A number of syscalls are remapped on the arm64 to newer, more general syscalls.
The older syscalls are not implemented on arm64.  The tests should match those
newer, more general syscalls.

9 years agoAdd arm64 specific defines for num_args.stp
William Cohen [Thu, 13 Nov 2014 18:34:28 +0000 (13:34 -0500)]
Add arm64 specific defines for num_args.stp

The ir and lr variables need to be defined for each architeture.
This test was missing a define for arm64.

9 years agoRHBZ1119336: document STAP_FIPS_OVERRIDE in man staprun.8
Frank Ch. Eigler [Wed, 12 Nov 2014 16:04:39 +0000 (11:04 -0500)]
RHBZ1119336: document STAP_FIPS_OVERRIDE in man staprun.8

9 years agoAdded missing 'asmlinkage()' call in nd_syscall.pread.
David Smith [Tue, 11 Nov 2014 21:17:05 +0000 (15:17 -0600)]
Added missing 'asmlinkage()' call in nd_syscall.pread.

9 years agoPR16716 partial fix: Fix types in 'syscall.{msgctl,msgget,msgrcv,msgsnd}'.
David Smith [Tue, 11 Nov 2014 20:52:07 +0000 (14:52 -0600)]
PR16716 partial fix: Fix types in 'syscall.{msgctl,msgget,msgrcv,msgsnd}'.

* tapset/linux/syscalls.stp (syscall.msgctl): Fixed types, nesting, and
  improved 32-bit support.
  (syscall.msgget): Ditto.
  (syscall.msgrcv): Ditto.
  (syscall.msgsnd): Ditto.
* tapset/linux/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (___sem_flags): Updated and improved.
  (_stp_msgget_key_str): New function.
  (_stp_msgctl_cmd_str): New function.
  (_stp_msgflg_str): New function.
  (_stp_compat_msgrcv_msgbuf): New function.
  (_stp_compat_msgrcv_msgtyp): New function.
* runtime/linux/compat_unistd.h: Added more compat defines.
* testsuite/buildok/syscalls-detailed.stp: Added tests for new '_str'
  variables.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.

9 years agodebian bug766994: adapt to emacs 24.3 deprecation of c-* macros by default
Hilko Bengen [Tue, 11 Nov 2014 16:16:04 +0000 (11:16 -0500)]
debian bug766994: adapt to emacs 24.3 deprecation of c-* macros by default

It appears 'cl works better than 'cl-lib in the clean emacs24 debian
environment.

9 years agoImprove arm64 syscall/nd_syscall test results.
David Smith [Mon, 10 Nov 2014 15:31:16 +0000 (09:31 -0600)]
Improve arm64 syscall/nd_syscall test results.

* testsuite/systemtap.syscall/bind.c: Make the expected output for an
  open() syscall also expect an openat() syscall, since openat() is
  substituted for open() on arm64.
* testsuite/systemtap.syscall/chmod.c: Ditto.
* testsuite/systemtap.syscall/dir.c: Ditto.
* testsuite/systemtap.syscall/getpeername.c: Ditto.
* testsuite/systemtap.syscall/getsockname.c: Ditto.
* testsuite/systemtap.syscall/getsockopt.c: Ditto.
* testsuite/systemtap.syscall/listen.c: Ditto.
* testsuite/systemtap.syscall/lseek.c: Ditto.
* testsuite/systemtap.syscall/mmap.c: Ditto.
* testsuite/systemtap.syscall/openclose.c: Ditto.
* testsuite/systemtap.syscall/pread.c: Ditto.
* testsuite/systemtap.syscall/preadv.c: Ditto.
* testsuite/systemtap.syscall/pwrite.c: Ditto.
* testsuite/systemtap.syscall/pwritev.c: Ditto.
* testsuite/systemtap.syscall/readv.c: Ditto.
* testsuite/systemtap.syscall/readwrite.c: Ditto.
* testsuite/systemtap.syscall/recvfrom.c: Ditto.
* testsuite/systemtap.syscall/recvmmsg.c: Ditto.
* testsuite/systemtap.syscall/recvmsg.c: Ditto.
* testsuite/systemtap.syscall/setsockopt.c: Ditto.
* testsuite/systemtap.syscall/writev.c: Ditto.

9 years agoFixed BZ1160837 by updating the iostat-scsi.stp example.
David Smith [Thu, 6 Nov 2014 20:47:36 +0000 (14:47 -0600)]
Fixed BZ1160837 by updating the iostat-scsi.stp example.

* testsuite/systemtap.examples/io/iostat-scsi.stp: Updated for newer
  kernels like RHEL7 and rawhide. Probes the "sd_init_command" kernel
  function which replaced "sd_prep_fn" in newer kernels. Added whitespace
  for more clarity.

9 years agotransok/tval-opt.stp: nuke test case
Frank Ch. Eigler [Thu, 6 Nov 2014 14:35:18 +0000 (09:35 -0500)]
transok/tval-opt.stp: nuke test case

It can no longer pass as is, as -u has grown to mean
more and more unoptimization, far beyond $var elision.

9 years agoPR16716 partial fix: Fix types in syscall.mq_*
Martin Cermak [Wed, 5 Nov 2014 17:56:46 +0000 (18:56 +0100)]
PR16716 partial fix: Fix types in syscall.mq_*

tapset/linux/aux_syscalls.stp: Add __ushort()
tapset/linux/nd_syscalls.stp: Fix types, add compat support
tapset/linux/syscalls.stp: Fix types, add compat support
testsuite/systemtap.syscall/mq.c: New testcase

9 years agoPR16716 partial fix: Fix types in 'syscall.{pread,pwrite,read,write}'.
David Smith [Tue, 4 Nov 2014 16:24:17 +0000 (10:24 -0600)]
PR16716 partial fix: Fix types in 'syscall.{pread,pwrite,read,write}'.

* tapset/linux/syscalls2.stp: Fixed types in syscall.pread,
  syscall.pwrite, syscall.pwrite32, syscall.read, and syscall.write.
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/systemtap.syscall/readwrite.c (main): Added tests and split.
* testsuite/systemtap.syscall/lseek.c: Tests moved from readwrite.c and
  new tests added.
* testsuite/systemtap.syscall/pread.c: Ditto.
* testsuite/systemtap.syscall/pwrite.c: Ditto.

9 years agoEstimate the frequency of the arch64 get_cycle()
William Cohen [Fri, 31 Oct 2014 16:24:55 +0000 (12:24 -0400)]
Estimate the frequency of the arch64 get_cycle()

Unlike 32-bit arm the 64-bit has a working get_cycle() function and
the SystemTap runtime support should make an attempt to estimate the
frequency of get_cycle().  This change will make scripts using time
information on aarch64 produce accurate results.

9 years agodebian bug766994: adapt to emacs 24.3 deprecation of c-* macros by default
Frank Ch. Eigler [Mon, 27 Oct 2014 16:40:50 +0000 (12:40 -0400)]
debian bug766994: adapt to emacs 24.3 deprecation of c-* macros by default

Adding a (eval-when-compile (require 'cl-lib)) as per the Internet
appears to not-hurt on older emacs and work fine on rawhide 24.3.

9 years agoPR16716 partial fix: Fix types in 'syscall.{shmctl,shmget,sig*}'.
David Smith [Mon, 20 Oct 2014 17:14:02 +0000 (12:14 -0500)]
PR16716 partial fix: Fix types in 'syscall.{shmctl,shmget,sig*}'.

* tapset/linux/syscalls2.stp (syscall.shmctl): Handle nesting and
  types. Add 'cmd_str' convenience variable.
  (syscall.compat_sys_shmctl): Ditto.
  (syscall.shmget): Fix types and 'shmflg_str' convenience variable.
  (syscall.sigaction): Fix types.
  (syscall.sigaction32): Fix types.
  (syscall.signal): Fix types.
  (syscall.signalfd): Fix types.
  (syscall.signalfd4): Fix types.
  (syscall.sigprocmask): Fix types.
* tapset/linux/nd_syscalls2.stp (nd_syscall.shmctl): Handle nesting. Add
  'cmd_str' convenience variable.
  (nd_syscall.compat_sys_shmctl): Ditto.
  (nd_syscall.shmget): Add 'shmflg_str' convenience variable.
* tapset/linux/i386/syscalls.stp: Deprecate syscall.ipc.
* tapset/linux/powerpc/syscalls.stp: Ditto.
* tapset/linux/s390/syscalls.stp: Ditto.
* tapset/linux/i386/nd_syscalls.stp: Deprecate nd_syscall.ipc.
* tapset/linux/powerpc/nd_syscalls.stp: Dito.
* tapset/linux/s390/nd_syscalls.stp: Ditto.
* tapset/linux/aux_syscalls.stp (_semctl_cmt): Updated.
  (_signalfd4_flags_str): Updated.
  (_stp_shmget_flags_str): New function.
* runtime/linux/compat_unistd.h: Added compat defines.
* testsuite/buildok/syscalls-arch-detailed.stp: Deprecate syscall.ipc.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Ditto.
* testsuite/buildok/syscalls2-detailed.stp: Update.
* testsuite/buildok/nd_syscalls2-detailed.stp: Ditto.
* testsuite/buildok/syscalls-detailed.stp: Ditto.
* testsuite/buildok/nd_syscalls-detailed.stp: Ditto.
* testsuite/systemtap.syscall/select.c: Add test cases.
* testsuite/systemtap.syscall/signalfd.c: Ditto.
* testsuite/systemtap.syscall/shmat.c: New test case.
* testsuite/systemtap.syscall/shmget.c: New test case.

9 years agoRHBZ1153673: speculatively correct segv in dead_control_remover
Frank Ch. Eigler [Thu, 16 Oct 2014 20:25:55 +0000 (16:25 -0400)]
RHBZ1153673: speculatively correct segv in dead_control_remover

It was reported that ::visit_block was occasionally called with
a 0-size input vs[].  That leads to an array overflow, as the
for condition becomes apprx. (i < UINT_MAX).

   for (size_t i = 0; i < vs.size() - 1; ++i)
     do_something_with (vs[i]);

Let's reject 0-size vectors right away.

9 years agoRHBZ847286: systemtap initscript: return rc=0 for no-scripts-configured case
Frank Ch. Eigler [Wed, 15 Oct 2014 16:36:49 +0000 (12:36 -0400)]
RHBZ847286: systemtap initscript: return rc=0 for no-scripts-configured case

We already emit a message as a warning; let's not treat this
relatively harmless situation as an error RC.

9 years agoNEWS: tweak string-optimization wordage
Frank Ch. Eigler [Tue, 14 Oct 2014 15:13:34 +0000 (11:13 -0400)]
NEWS: tweak string-optimization wordage

9 years agoNEWS: added bit on string passing optimization
Abegail Jakop [Tue, 14 Oct 2014 14:50:26 +0000 (10:50 -0400)]
NEWS: added bit on string passing optimization

9 years agoPR16716 partial fix: Fix types in syscall.{getdents,getsid}
Martin Cermak [Tue, 14 Oct 2014 07:20:40 +0000 (09:20 +0200)]
PR16716 partial fix: Fix types in syscall.{getdents,getsid}

tapset/linux/syscalls.stp: Fix types
testsuite/systemtap.syscall/getdents.c: New testcase
testsuite/systemtap.syscall/getsid.c: New testcase

9 years agoruntime: tweak panic message
Frank Ch. Eigler [Sat, 11 Oct 2014 14:38:29 +0000 (10:38 -0400)]
runtime: tweak panic message

Before:
   [ 2365.196201] Stap trace buffer for processor 0 sub-buffer 0:
After:
   [ NNNN.MMMMMM] stap_DEADBEEF trace buffer for processor 0 sub-buffer 0:

9 years agoFix spelling typo in man pages
Masanari Iida [Fri, 10 Oct 2014 14:55:29 +0000 (23:55 +0900)]
Fix spelling typo in man pages

This patch fix some spelling typo in man pages.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
9 years agoMerge branch 'ajakop/11528'
Abegail Jakop [Fri, 10 Oct 2014 14:57:40 +0000 (10:57 -0400)]
Merge branch 'ajakop/11528'

9 years agotranslate.cxx: fix "referece" typo
Abegail Jakop [Fri, 10 Oct 2014 14:16:49 +0000 (10:16 -0400)]
translate.cxx: fix "referece" typo

9 years agoPR11528: log messages for vars passed by reference
Abegail Jakop [Thu, 9 Oct 2014 21:58:36 +0000 (17:58 -0400)]
PR11528: log messages for vars passed by reference

9 years agoPR11528: put retval assignment after arg assignments
Abegail Jakop [Thu, 9 Oct 2014 21:31:35 +0000 (17:31 -0400)]
PR11528: put retval assignment after arg assignments

translate.cxx: moved generated c portion for the retval assignment from
::c_assign to ::visit_functioncall, after function argument assignments
to avoid complicationns with nested functioncalls

9 years agoAdd backtrace support for aarch64
William Cohen [Thu, 9 Oct 2014 16:41:44 +0000 (12:41 -0400)]
Add backtrace support for aarch64

This patch uses the dwarf unwinder to implement backtrace support for aarch64.
This addresses PR16920.

9 years agoPR16716 partial fix: Fix types in syscall.{getrlimit,ioctl}
Martin Cermak [Thu, 9 Oct 2014 06:30:06 +0000 (08:30 +0200)]
PR16716 partial fix: Fix types in syscall.{getrlimit,ioctl}

* tapset/linux/nd_syscalls.stp: Fix types, add compat support
* tapset/linux/syscalls.stp: Fix types, add compat support
* tapset/linux/syscalls.stpm: New macro __syscall_gate_compat_simple
* testsuite/systemtap.syscall/getrlimit.c new testcase
* testsuite/systemtap.syscall/ioctl.c new testcase

9 years agoMake the -DDEBUG_UNWIND output more tolerant of types used in struct pt_regs
William Cohen [Thu, 9 Oct 2014 02:06:32 +0000 (22:06 -0400)]
Make the -DDEBUG_UNWIND output more tolerant of types used in struct pt_regs

On aarch64 u64 rather than unsigned long is used to store various
register values in struct pt_regs.  When -DDEBUG_UNWIND is used to
compile SystemTap scripts the warning from the type mismatches causes
the module builds to fail.  The kernel's
Documentation/printk-formations.txt suggests explicit typecast to
unsigned long long and using %llu as the print specifier in these
cases.

9 years agoAdd support for getrandom, memfd_create, seccomp syscalls
Lukas Berk [Wed, 8 Oct 2014 17:54:29 +0000 (13:54 -0400)]
Add support for getrandom, memfd_create, seccomp syscalls

Linux 3.17 added several syscalls, we need to add support for them
as well.

*aux_syscalls.stp - aux funcitions for sorting through flags
*nd_syscalls.stp - no debuginfo impl for getrandom,memfd_create
*nd_syscalls2.stp - no debuginfo impl for seccomp
*syscalls.stp - impl for getrandom,memfd_create
*syscalls2.stp - impl for seccomp
*buildok/nd_syscalls-details.stp - testcase for nd getrandom, memfd_create
*buildok/nd_syscalls2-details.stp - testcase for nd seccomp
*buildok/syscalls-details.stp - testcase for getrandom, memfd_create
*buildok/syscalls2-details.stp - testcase for seccomp
*systemtap.syscall/getrandom.c - test of the actual getrandom syscall
*systemtap.syscall/memfd_create.c - test of the actual memfd_create syscall

9 years agoRHBZ1150166: Handle the filename of compressed modules
Josh Stone [Tue, 7 Oct 2014 19:38:39 +0000 (12:38 -0700)]
RHBZ1150166: Handle the filename of compressed modules

This allows filenames like ".ko.xz" in modname_from_path().

9 years agorun-stap: Let DEBUG_STAP use a custom gdb command
Josh Stone [Tue, 7 Oct 2014 18:36:41 +0000 (11:36 -0700)]
run-stap: Let DEBUG_STAP use a custom gdb command

e.g. DEBUG_STAP=1 GDB=cgdb ./run-stap ...

9 years agoDefine __NR_epoll_wait if not defined (PR17462)
William Cohen [Tue, 7 Oct 2014 14:44:28 +0000 (10:44 -0400)]
Define __NR_epoll_wait if not defined (PR17462)

On arm64 __NR_epoll_wait is not defined and some of probes will fail
to build because of the lacking define (PR17462).  This makes sure there
is a sane definition, so scripts compile.

9 years agoPR11528: embedded_tags_visitor store tags in a set
Abegail Jakop [Mon, 6 Oct 2014 21:03:25 +0000 (17:03 -0400)]
PR11528: embedded_tags_visitor store tags in a set

9 years agoPR11528: added unmodified-fnargs pragma to man/stap.1
Abegail Jakop [Mon, 6 Oct 2014 18:41:33 +0000 (14:41 -0400)]
PR11528: added unmodified-fnargs pragma to man/stap.1

9 years agoPR11528: revised embedded_code_visitor
Abegail Jakop [Mon, 6 Oct 2014 17:33:51 +0000 (13:33 -0400)]
PR11528: revised embedded_code_visitor

translate.cxx: renamed embedded_code_visitor to unmodified_fnargs_checker
and have it inherit from embedded_tags_visitor.

9 years agoPR11528: replace ::is_functioncall() with a visitor
Abegail Jakop [Mon, 6 Oct 2014 17:32:33 +0000 (13:32 -0400)]
PR11528: replace ::is_functioncall() with a visitor

9 years agoFixed typo in testsuite/systemtap.syscall/rt_signal.c.
David Smith [Thu, 2 Oct 2014 20:58:43 +0000 (15:58 -0500)]
Fixed typo in testsuite/systemtap.syscall/rt_signal.c.

9 years agoPR11528: don't include pure code in optimization
Abegail Jakop [Thu, 2 Oct 2014 19:18:44 +0000 (15:18 -0400)]
PR11528: don't include pure code in optimization

9 years agoPR11528: new pragma "unmodified-fnargs" for embedded-c
Abegail Jakop [Wed, 1 Oct 2014 20:49:39 +0000 (16:49 -0400)]
PR11528: new pragma "unmodified-fnargs" for embedded-c

elaborate.cxx: remove the portion in semantic_pass_opt2() that populates
a vector with unmodified function args
translate.cxx: new function that uses a new visitor to determine if the body
of a function modifies the function arguments. for embedded code, it checks
for the presence of the pure or unmodified-fnargs pragma.

9 years agoPR16716 partial fix: Fix types in 'syscall.{rt_sigaction,rt_sigprocmask}'.
David Smith [Wed, 1 Oct 2014 16:20:20 +0000 (11:20 -0500)]
PR16716 partial fix: Fix types in 'syscall.{rt_sigaction,rt_sigprocmask}'.

* tapset/linux/syscalls2.stp: Fixed types in syscall.rt_sigaction and
  syscall.rt_sigprocmask.
* testsuite/systemtap.syscall/rt_signal.c: Added tests.

9 years agoPR16716 partial fix: Fix types in 'syscall.{pipe,pselect[67],sched_getaffinity}'
David Smith [Tue, 30 Sep 2014 20:01:44 +0000 (15:01 -0500)]
PR16716 partial fix: Fix types in 'syscall.{pipe,pselect[67],sched_getaffinity}'

* tapset/linux/syscalls2.stp: Fixed types in syscall.pipe,
  syscall.pselect6, syscall.pselect7, syscall.sched_getaffinity. Fix
  nesting in syscall.pselect7. Add 32-bit support to
  syscall.sched_getaffinity.
* tapset/linux/nd_syscalls2.stp: Fix nesting in nd_syscall.pselect7. Add
  32-bit support to nd_syscall.sched_getaffinity.
* tapset/linux/aux_syscalls.stp (_sys_pipe2_flag_str): Updated and
  improved.
* runtime/linux/compat_unistd.h: Add '__NR_pselect7' define.
* testsuite/systemtap.syscall/flock.c: Updated.
* testsuite/systemtap.syscall/sched_setscheduler.c: Ditto.
* testsuite/systemtap.syscall/pipe.c: Added tests.
* testsuite/systemtap.syscall/rename.c: Ditto.
* testsuite/systemtap.syscall/select.c: Ditto.
* testsuite/systemtap.syscall/sched_getaffinity.c: New testcase.
* testsuite/systemtap.syscall/test-debug-cmd.tcl: Add support for '!!!!'.
* testsuite/systemtap.syscall/test-debug-cmd-nd.tcl: Ditto.

9 years agoPR11528: set __retval as char * where possible
Abegail Jakop [Thu, 25 Sep 2014 18:43:39 +0000 (14:43 -0400)]
PR11528: set __retval as char * where possible

translate.cxx: in ::c_assign(), when the rval is a functioncall and the
function returns a string, the retval is points to the destination.
c_unparser::visit_functioncall() handles the case where the return value
of the function is not used, by setting the destination to a tmpvar.

9 years agoAdd pyparsing / no-parsing compatibility test.
Stan Cox [Thu, 25 Sep 2014 17:47:04 +0000 (13:47 -0400)]
Add pyparsing / no-parsing compatibility test.

* dtrace.exp:  Add pyparsing compatibility test.

9 years agoPR16716 partial fix: Fix types for the flock syscall
Martin Cermak [Thu, 25 Sep 2014 07:24:36 +0000 (09:24 +0200)]
PR16716 partial fix: Fix types for the flock syscall

* tapset/linux/syscalls.stp: Fix types
* testsuite/systemtap.syscall/flock.c: New testcase

9 years agoPR16806: tweak test case to guarantee stoppage better
Frank Ch. Eigler [Thu, 25 Sep 2014 01:41:01 +0000 (21:41 -0400)]
PR16806: tweak test case to guarantee stoppage better

We run the "./loop" executable under /usr/bin/timeout control, but on
RHEL6, uprobes can take a while to sync up for some reason, leading to
a testsuite hang.  Switch to timeout -s KILL, moohahahaha, from orbit.

9 years agopo i18n regen
Frank Ch. Eigler [Wed, 24 Sep 2014 19:53:15 +0000 (15:53 -0400)]
po i18n regen

9 years agostp: rt: fix preemptible bug_on for STAT_GET_CPU
Santosh Shukla [Mon, 22 Sep 2014 07:27:02 +0000 (12:57 +0530)]
stp: rt: fix preemptible bug_on for STAT_GET_CPU

STAT_GET_CPU to use raw_smp_xxx api in -rt fixes below bug on

BUG: using smp_processor_id() in preemptible [00000000 00000000] code: rmmod/56155
caller is _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
CPU: 6 PID: 56155 Comm: rmmod Tainted: GF          O 3.14.12-rt-rt9+ #2
Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013
 ffff88040819ae80 ffff8803d86c7dc8 ffffffff81602b13 0000000000000006
 ffff8803d86c7de0 ffffffff812e5575 000000006426532c ffff8803d86c7e08
 ffffffffa0877c1d ffffffffa0883c00 ffffffffa0823118 00008fd170541a19
Call Trace:
 [<ffffffff81602b13>] dump_stack+0x4e/0x7a
 [<ffffffff812e5575>] debug_smp_processor_id+0x105/0x120
 [<ffffffffa0877c1d>] _stp_stat_add+0x1d/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffffa087ad0f>] systemtap_module_refresh+0x10f/0x1d0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffffa087c8a1>] _stp_module_notifier+0x41/0x1a0 [stap_4f58f85e0fd53d8fdc48b8abb0e89a5d_56139]
 [<ffffffff8160d4ed>] ? kprobes_module_callback+0x12d/0x140
 [<ffffffff8160c75c>] notifier_call_chain+0x4c/0x70
 [<ffffffff8109805d>] __blocking_notifier_call_chain+0x4d/0x70
 [<ffffffff81098096>] blocking_notifier_call_chain+0x16/0x20
 [<ffffffff810eb006>] SyS_delete_module+0x146/0x1c0
 [<ffffffff81611166>] ? int_signal+0x12/0x17
 [<ffffffff81610ea9>] system_call_fastpath+0x16/0x1b

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace stp_print lock with stp style lock
Santosh Shukla [Mon, 22 Sep 2014 07:27:01 +0000 (12:57 +0530)]
stp: rt: replace stp_print lock with stp style lock

-rt mode preemptable spin lock lead to deadlock causes x86 box to freeze.
Replacing spin lock with stp type raw lock solves the problem. Observed
deadlock in make installcheck testsuite for sched_switch.stp test case.

Crash backtrace:
PID: 0      TASK: ffff880419f50000  CPU: 11  COMMAND: "swapper/11"
 #4 [ffff88042d963bc0] _raw_spin_lock at ffffffff81608c02
 #5 [ffff88042d963bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d963c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d963c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d963cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d963cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

PID: 0      TASK: ffff880419f36780  CPU: 10  COMMAND: "swapper/10"
 #4 [ffff88042d943bc0] _raw_spin_lock at ffffffff81608bf8
 #5 [ffff88042d943bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d943c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d943c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d943cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d943cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

PID: 0      TASK: ffff880419f35a90  CPU: 9   COMMAND: "swapper/9"
 #4 [ffff88042d923bc0] _raw_spin_lock at ffffffff81608bf8
 #5 [ffff88042d923bd0] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d923c60] rt_spin_lock at ffffffff81608e25
 #7 [ffff88042d923c70] stp_print_flush at ffffffffa07e235b [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #8 [ffff88042d923cb0] probe_2293 at ffffffffa07e365c [stap_b232c01b8c036276987b9a52a38f25eb__7614]
 #9 [ffff88042d923cf0] enter_real_tracepoint_probe_0 at ffffffffa07e607f [stap_b232c01b8c036276987b9a52a38f25eb__7614]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace addr_map_lock rd/wr lock with stp type raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:27:00 +0000 (12:57 +0530)]
stp: rt: replace addr_map_lock rd/wr lock with stp type raw lock

Without this change, Noticed that make installcheck freezes x86_64 box, testing
done on IvyBridge v2 12 core (HT). With crash post mortem analysis observed
that multiple threads grabs rd lock and get preempted in rt mode which
shouldn't ideally be the expected flow. rd/wr lock is preemptible which is
causing this problem for -rt mode so replace them with stp style raw lock.
However I poited out in other patches that replacement of rd/wr with rcu lock
in general better approach, we'll revisit them later(todo).

Crash log:

PID: 795    TASK: ffff8804185b5a90  CPU: 9   COMMAND: "migration/9"
 #4 [ffff8804185fdc28] _raw_spin_lock at ffffffff81608c02
 #5 [ffff8804185fdc38] try_to_wake_up at ffffffff810a4c35
 #6 [ffff8804185fdc80] wake_up_lock_sleeper at ffffffff810a4ee8
 #7 [ffff8804185fdc90] wakeup_next_waiter at ffffffff810bc6fd
 #8 [ffff8804185fdcd0] __rt_spin_lock_slowunlock at ffffffff81607b49
 #9 [ffff8804185fdce8] rt_spin_lock_slowunlock at ffffffff81607b9a
 #6 [ffff88042d803c18] __rt_spin_lock at ffffffff81608df5
 #7 [ffff88042d803c28] rt_read_lock at ffffffff816090b0
 #8 [ffff88042d803c40] rt_read_lock_irqsave at ffffffff816090ce
 #9 [ffff88042d803c50] lookup_bad_addr at ffffffffa0818dc8 [stap_674aee0a10a6c961c424f3bb2537e01f_12442]
 #10 [ffff88042d803c70] function__dwarf_cast_get_cast_8 at ffffffffa08194ab

PID: 0      TASK: ffffffff8191a460  CPU: 0   COMMAND: "swapper/0"
 #4 [ffff88042d803b78] _raw_spin_lock at ffffffff81608c02
 #5 [ffff88042d803b88] rt_spin_lock_slowlock at ffffffff81608204
 #6 [ffff88042d803c18] __rt_spin_lock at ffffffff81608df5
 #7 [ffff88042d803c28] rt_read_lock at ffffffff816090b0
 #8 [ffff88042d803c40] rt_read_lock_irqsave at ffffffff816090ce
 #9 [ffff88042d803c50] lookup_bad_addr at ffffffffa0818dc8 [stap_674aee0a10a6c961c424f3bb2537e01f_12442]

PID: 12444  TASK: ffff880410920cf0  CPU: 10  COMMAND: "stapio"
 #11 [ffff88042d943e18] _raw_spin_lock at ffffffff81608bfb
 #12 [ffff88042d943e28] scheduler_tick at ffffffff810a2cbe
 #13 [ffff88042d943e58] update_process_times at ffffffff8107cc32
 #14 [ffff88042d943e80] tick_sched_handle at ffffffff810e1235
 #15 [ffff88042d943ea0] tick_sched_timer at ffffffff810e14b4
 #16 [ffff88042d943ec8] __run_hrtimer at ffffffff81096407
 #17 [ffff88042d943f08] hrtimer_interrupt at ffffffff81097110
 #18 [ffff88042d943f80] local_apic_timer_interrupt at ffffffff81047814
 #19 [ffff88042d943f98] smp_apic_timer_interrupt at ffffffff8161393f
 #20 [ffff88042d943fb0] apic_timer_interrupt at ffffffff816122dd

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_task_work_list_lock to stp raw
Santosh Shukla [Mon, 22 Sep 2014 07:26:59 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_task_work_list_lock to stp raw

Fixes this bug_on for -rt case :

[ 2184.284672]  [<ffffffff81602329>] dump_stack+0x4e/0x7a
[ 2184.284679]  [<ffffffff815fcaed>] __schedule_bug+0x9f/0xad
[ 2184.284686]  [<ffffffff816057f7>] __schedule+0x627/0x6a0
[ 2184.284694]  [<ffffffff810be5fb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[ 2184.284699]  [<ffffffff816058a0>] schedule+0x30/0xa0
[ 2184.284707]  [<ffffffff8160727d>] rt_spin_lock_slowlock+0xbd/0x1f0
[ 2184.284714]  [<ffffffff81607e25>] rt_spin_lock+0x25/0x30
[ 2184.284727]  [<ffffffffa08ae573>] __stp_tf_alloc_task_work+0x43/0x90 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284737]  [<ffffffffa08aff8b>] __stp_utrace_task_finder_target_syscall_exit+0xdb/0x350 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284747]  [<ffffffffa08a91d5>] utrace_report_syscall_exit+0xc5/0x110 [stap_63e05c06fe2b0c2d17f8d8e096a4ee8a__1700]
[ 2184.284753]  [<ffffffff81023ce0>] syscall_trace_leave+0x100/0x130
[ 2184.284758]  [<ffffffff8161090b>] int_check_syscall_exit_work+0x34/0x3d

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace utrace_struct lock to stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:58 +0000 (12:56 +0530)]
stp: rt: replace utrace_struct lock to stp style raw lock

Patch fixes below bug_on for -rt mode kernel:

[ 3375.430085]  [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430090]  [<ffffffff815da3a4>] dump_stack+0x19/0x1b
[ 3375.430094]  [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430098]  [<ffffffff815d49d7>] __schedule_bug+0xa0/0xae
[ 3375.430102]  [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430107]  [<ffffffff815de469>] __schedule+0x5a9/0x700
[ 3375.430110]  [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430116]  [<ffffffff815de5ea>] schedule+0x2a/0x90
[ 3375.430125]  [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430131]  [<ffffffff815df525>] rt_spin_lock_slowlock+0xe5/0x2e0
[ 3375.430138]  [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430143]  [<ffffffff815df935>] rt_spin_lock+0x25/0x30
[ 3375.430148]  [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430156]  [<ffffffffa2f5ed5e>] task_utrace_struct+0x1e/0x40 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430161]  [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430168]  [<ffffffffa2f6204b>] utrace_report_syscall_exit+0x4b/0x110 [stap_eb141ade124ccb17a233482e6996651f_15664]
[ 3375.430173]  [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d
[ 3375.430178]  [<ffffffff810ea646>] ? __audit_syscall_exit+0x1f6/0x2a0
[ 3375.430184]  [<ffffffff81021d56>] syscall_trace_leave+0xd6/0xf0
[ 3375.430191]  [<ffffffff815e7af0>] int_check_syscall_exit_work+0x34/0x3d

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace utrace->lock with stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:57 +0000 (12:56 +0530)]
stp: rt: replace utrace->lock with stp style raw lock

In preempt-rt kernel, At the time of launching stap script noticed below
bug_on. Replacing spinlock with Raw fixes this problem.

[  159.433464] Preemption disabled at:[<ffffffff810b74d6>] remove_wait_queue+0x36/0x40

[  159.433466] CPU: 8 PID: 6723 Comm: bash Tainted: GF       W  O 3.14.12-rt-rt9+ #1
[  159.433467] Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.0002.082220131453 08/22/2013
[  159.433471]  ffff88042d917d80 ffff88040f623d90 ffffffff81602b13 ffff8804121e3980
[  159.433474]  ffff88040f623da0 ffffffff815fd2fb ffff88040f623df8 ffffffff81606017
[  159.433478]  ffff88040f623fd8 0000000000017d80 0000000000017d80 ffffffff810bcbcb
[  159.433478] Call Trace:
[  159.433481]  [<ffffffff81602b13>] dump_stack+0x4e/0x7a
[  159.433484]  [<ffffffff815fd2fb>] __schedule_bug+0x9f/0xad
[  159.433486]  [<ffffffff81606017>] __schedule+0x627/0x6a0
[  159.433489]  [<ffffffff810bcbcb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[  159.433492]  [<ffffffff816060c0>] schedule+0x30/0xa0
[  159.433495]  [<ffffffff81607a9d>] rt_spin_lock_slowlock+0xbd/0x1f0
[  159.433498]  [<ffffffff81608645>] rt_spin_lock+0x25/0x30
[  159.433503]  [<ffffffffa076fbf5>] start_report+0x45/0xb0 [stap_c108d00c22143294d42db713b804dbb9_10325]
[  159.433508]  [<ffffffffa0773e38>] utrace_report_syscall_exit+0x88/0x110 [stap_c108d00c22143294d42db713b804dbb9_10325]
[  159.433511]  [<ffffffff81023d30>] syscall_trace_leave+0x100/0x130
[  159.433514]  [<ffffffff8161114b>] int_check_syscall_exit_work+0x34/0x3d

Note : This module afaiu is prime candidate to benifit rcu locking primitives
and same some cycle, should improve overall performance, more scallable.
[This is general desing improvement so keeping those changes out from this
patch. .todo]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:56 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_vma_lock rd/wr lock with stp style of raw lock

To make it -rt aware. Description similar to previous patch
commit, RCU is better substitute for rd/wr lock [todo]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
9 years agostp: rt: replace __stp_tf_map_lock rd/wr lock with stp style raw lock
Santosh Shukla [Mon, 22 Sep 2014 07:26:55 +0000 (12:56 +0530)]
stp: rt: replace __stp_tf_map_lock rd/wr lock with stp style raw lock

noticed that in rt mode - read and write_lock lead to several bug_on :

[ 1033.544821]  ffff880035463d38 ffffffff815fcaed ffff880035463d90 ffffffff816057f7
[ 1033.544826]  ffff880035463fd8 0000000000017e80 0000000000017e80 ffffffff810be5fb
[ 1033.544826] Call Trace:
[ 1033.544830]  [<ffffffff81602329>] dump_stack+0x4e/0x7a
[ 1033.544834]  [<ffffffff815fcaed>] __schedule_bug+0x9f/0xad
[ 1033.544838]  [<ffffffff816057f7>] __schedule+0x627/0x6a0
[ 1033.544842]  [<ffffffff810be5fb>] ? task_blocks_on_rt_mutex+0x19b/0x220
[ 1033.544846]  [<ffffffff816058a0>] schedule+0x30/0xa0
[ 1033.544850]  [<ffffffff8160727d>] rt_spin_lock_slowlock+0xbd/0x1f0
[ 1033.544856]  [<ffffffff81607df5>] __rt_spin_lock+0x25/0x30
[ 1033.544858]  [<ffffffff816080b0>] rt_read_lock+0x30/0x40
[ 1033.544861]  [<ffffffff816080ce>] rt_read_lock_irqsave+0xe/0x20
[ 1033.544867]  [<ffffffffa08a9b89>] __stp_tf_get_map_entry+0x19/0xc0 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544873]  [<ffffffffa08afedd>] __stp_utrace_task_finder_target_syscall_exit+0x5d/0x350 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544889]  [<ffffffffa08a91c5>] utrace_report_syscall_exit+0xc5/0x110 [stap_e40dcb2c46d7c0a2fb8d70ba343e393a_15235]
[ 1033.544893]  [<ffffffff81023ce0>] syscall_trace_leave+0x100/0x130
[ 1033.544896]  [<ffffffff8161090b>] int_check_syscall_exit_work+0x34/0x3d

Replacing rd/wr lock with raw lock supress these bug_on. However more suitable
fix is to replace read/write lock in general with RCU style lock, followed by
use of rcu variant hlist api but current module desing need to go through some
real desing chnages in order of adding and freeing entry to/from free list,
which i choose work upon as separate patch[todo.]

Signed-off-by: Santosh Shukla <sshukla@mvista.com>
This page took 0.079752 seconds and 5 git commands to generate.