]> sourceware.org Git - systemtap.git/log
systemtap.git
14 years agoPR 11338 (partial): Used '@defined()' in inet_sock tapsets.
David Smith [Fri, 26 Mar 2010 19:17:48 +0000 (14:17 -0500)]
PR 11338 (partial): Used '@defined()' in inet_sock tapsets.

* tapset/inet_sock.stp (inet_get_local_port): Used '@defined' instead of a
  kernel version check.  Added RHEL4 support.
  (inet_get_ip_source): Now calls __ip_sock_daddr() to get daddr.

14 years agoPR 9871/11338 fix in tcpmib.stp by removing embedded-C and using @defined.
David Smith [Fri, 26 Mar 2010 18:24:38 +0000 (13:24 -0500)]
PR 9871/11338 fix in tcpmib.stp by removing embedded-C and using @defined.

* tapset/tcpmib.stp (tcpmib_get_state): Changed from embedded-C to script
  code.
  (tcpmib_local_addr): Instead of an embedded-C function, now calls
  function from ip.stp/tcp.stp.
  (tcpmib_remote_addr): Ditto.
  (tcpmib_local_port): Ditto.
  (tcpmib_remote_port): Ditto.
  (tcpmib.OutRsts.A): Used '@defined' instead of a kernel version check.
* tapset/ip.stp (__ip_sock_saddr): Used '@defined' instead of a kernel
  version check.  Added RHEL4 support.
  (__ip_sock_daddr): Ditto.
* tapset/tcp.stp (__tcp_sock_dport): Ditto.
  (__tcp_sock_sport): Ditto.

14 years agoRemove probe_point code duplication
Josh Stone [Fri, 26 Mar 2010 02:35:53 +0000 (19:35 -0700)]
Remove probe_point code duplication

* staptree.cxx (probe_point::str): Don't duplicate ::print -- reuse it.

14 years agoPrint probepoint addresses in hex
Josh Stone [Fri, 26 Mar 2010 02:32:46 +0000 (19:32 -0700)]
Print probepoint addresses in hex

* staptree.h (literal_number): Add a bool "print_hex".
* staptree.cxx (literal_number::print): Switch to hex if needed.
* tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Write the
  statement number component with a hex literal_number.
  (sdt_query::convert_location): Ditto
  (kprobe_derived_probe::kprobe_derived_probe): Ditto.
  (hwbkpt_derived_probe::hwbkpt_derived_probe): Ditto for data addr.

14 years agoMention ** in NEWS and stapprobes.3stap
Josh Stone [Fri, 26 Mar 2010 01:50:16 +0000 (18:50 -0700)]
Mention ** in NEWS and stapprobes.3stap

14 years agoPR11399: Allow '**' to match tapsets across '.'
Josh Stone [Thu, 25 Mar 2010 21:31:45 +0000 (14:31 -0700)]
PR11399: Allow '**' to match tapsets across '.'

Normally wildcards are constrained to matching a single probe point
component between the '.' separator.  This patch enables '**' to match
across the separator.

Probe point parameters are still absolute separators though, as there's
not really a meaningful semantic we could use to cross them with '**'.

* elaborate.cxx (isdoubleglob): Check for '**'.
  (match_node::find_and_build): Recurse '**' to cross separators.
* testsuite/semok/doubleglob.stp: New test of broad wildcards.
* testsuite/semko/doubleglob.stp: New negative test.

14 years agoPR11427: port sdt.h to sparc
Tom Callaway [Wed, 24 Mar 2010 16:06:22 +0000 (12:06 -0400)]
PR11427: port sdt.h to sparc

* includes/sys/sdt.h (STAP_NOP): Add __sparc__ to list of "nop" users.

14 years agoSmall cleanup of context.exp.
David Smith [Wed, 24 Mar 2010 16:04:16 +0000 (11:04 -0500)]
Small cleanup of context.exp.

* testsuite/systemtap.context/context.exp: Used "make -C $build_dir" to
  avoid using 'cd'.  Added error handling.

14 years agoImproved atomic.exp testcase by removing the need for an external module.
David Smith [Wed, 24 Mar 2010 15:57:01 +0000 (10:57 -0500)]
Improved atomic.exp testcase by removing the need for an external module.

* testsuite/systemtap.base/atomic.exp: Removed the need for the external
  module by putting the atomic_long_t inside the stap module.
* testsuite/systemtap.base/atomic_module.c: Removed.
* testsuite/systemtap.base/atomic_module.makefile: Ditto.
* testsuite/lib/stap_run_error.exp (stap_run_error): Better error handling.

14 years agoFix pipe syscall name in return probe.
Mark Wielaard [Wed, 24 Mar 2010 08:24:06 +0000 (09:24 +0100)]
Fix pipe syscall name in return probe.

* tapset/syscalls2.stp (syscall.pipe.return): If @defined($flags) then use
  it to determine correct name.

14 years agoRemoved unneeded convenience variables in syscall.pipe.return.
David Smith [Tue, 23 Mar 2010 22:34:33 +0000 (17:34 -0500)]
Removed unneeded convenience variables in syscall.pipe.return.

* tapset/syscalls2.stp: Removed unneeded 'flags' and 'flag_str'
  convenience variables in syscall.pipe.return probe.

14 years agoFixed PR 11425 by fixing probefunc() when used with kprobe.function.
David Smith [Tue, 23 Mar 2010 21:37:59 +0000 (16:37 -0500)]
Fixed PR 11425 by fixing probefunc() when used with kprobe.function.

* tapset/context-symbols.stp: Fixed probefunc() by looking for '"' as the
  end of the function name along with '@'.

14 years agoPartial fix for pr 11414. Fixed several 32-bit probe points.
David Smith [Tue, 23 Mar 2010 19:40:43 +0000 (14:40 -0500)]
Partial fix for pr 11414.  Fixed several 32-bit probe points.

* tapset/nd_syscalls2.stp: Updated/fixed rt_sigaction32, compat_select,
  and sigaction32 probes.

14 years agoPR10913: Fix error messages when unable to close certain tokens
Charley Wang [Tue, 23 Mar 2010 15:55:56 +0000 (11:55 -0400)]
PR10913: Fix error messages when unable to close certain tokens

14 years agoreleng: bump to version 1.2 release-1.2
Frank Ch. Eigler [Mon, 22 Mar 2010 21:35:02 +0000 (17:35 -0400)]
releng: bump to version 1.2

14 years agoFixed nd_syscalls 'sys32_mmap2' problem on newer kernels.
David Smith [Mon, 22 Mar 2010 21:49:03 +0000 (16:49 -0500)]
Fixed nd_syscalls 'sys32_mmap2' problem on newer kernels.

* tapset/x86_64/nd_syscalls.stp: Made 'sys32_mmap2' probe point optional,
  since it doesn't exist on newer kernels.

14 years agoFixed cut-and-paste error for sys_ia64_pipe.
David Smith [Mon, 22 Mar 2010 21:37:15 +0000 (16:37 -0500)]
Fixed cut-and-paste error for sys_ia64_pipe.

* tapset/nd_syscalls2.stp: Removed '.call' from
  'kprobe.function("sys_ia64_pipe")'.

14 years agoIfdef out atomic_long_read() body on older kernels where the type doesn't exist.
David Smith [Mon, 22 Mar 2010 18:41:02 +0000 (13:41 -0500)]
Ifdef out atomic_long_read() body on older kernels where the type doesn't exist.

* tapset/atomic.stp: If we don't have ATOMIC_LOGN_INIT(), ifdef out the
  function.

14 years agoPartial fix for pr 11388 by adding 'sys_mmap_pgoff' support.
David Smith [Mon, 22 Mar 2010 18:14:18 +0000 (13:14 -0500)]
Partial fix for pr 11388 by adding 'sys_mmap_pgoff' support.

* tapset/i386/nd_syscalls.stp: Add support for 'sys_mmap_pgoff' (which is
  what the mmap syscall uses).
* tapset/x86_64/nd_syscalls.stp: Ditto.

14 years agoPartial fix for pr 11388 by adding 'sys_mmap_pgoff' support.
David Smith [Mon, 22 Mar 2010 15:43:20 +0000 (10:43 -0500)]
Partial fix for pr 11388 by adding 'sys_mmap_pgoff' support.

* tapset/i386/syscalls.stp: Add support for 'sys_mmap_pgoff' (which is
  what the mmap syscall uses).
* tapset/x86_64/syscalls.stp: Ditto.

14 years agoFix syscall tapset on older kernels (RHEL4).
David Smith [Mon, 22 Mar 2010 15:34:34 +0000 (10:34 -0500)]
Fix syscall tapset on older kernels (RHEL4).

* tapset/aux_syscalls.stp: On systems where inotify isn't supported, don't
  include inotify.h.

14 years agoImprove handling of O_NONBLOCK and O_CLOEXEC.
David Smith [Mon, 22 Mar 2010 15:05:14 +0000 (10:05 -0500)]
Improve handling of O_NONBLOCK and O_CLOEXEC.

* tapset/aux_syscalls.stp (_sys_pipe2_flag_str): Separate O_NONBLOCK and
  O_CLOEXEC support.
  (_sys_open_flag_str): Added O_CLOEXEC support.

14 years agoSupport signalfd4 in syscalls2.stp tapset.
Mark Wielaard [Sun, 21 Mar 2010 16:23:17 +0000 (17:23 +0100)]
Support signalfd4 in syscalls2.stp tapset.

* tapset/aux_syscalls.stp (_signalfd4_flags_str): New utility function.
* tapset/syscalls2.stp (syscall.signalfd[.return]): Handle signalfd4 variant
  when available.
* testsuite/systemtap.syscall/signalfd.c: New test.

14 years agoAdd inotify_init1() and inotify_add_watch() mask string support.
Mark Wielaard [Sun, 21 Mar 2010 08:55:10 +0000 (09:55 +0100)]
Add inotify_init1() and inotify_add_watch() mask string support.

* tapset/aux_syscalls.stp (_inotify_watch_mask_str): New helper function.
  (_inotify_init1_flag_str): Likewise.
* tapset/syscalls.stp (inotify_add_watch): Stringify watch mask.
  (syscall.inotify_init[.return]): Add inotify_init1() support.
* testsuite/systemtap.syscall/inotify.c: New test.

14 years agoAdd support for eventfd2 to syscall.stp tapset.
Mark Wielaard [Sat, 20 Mar 2010 21:43:51 +0000 (22:43 +0100)]
Add support for eventfd2 to syscall.stp tapset.

* tapset/aux_syscalls.stp (_eventfd2_flag_str): New utility function.
* tapset/syscalls.stp (syscall.eventfd[.return]): Add alternatives to
  handle eventfd2.
* testsuite/systemtap.syscall/eventfd.c: New test.

14 years agoExplicitly test first kernel version in utimensat syscall test.
Mark Wielaard [Sat, 20 Mar 2010 19:53:18 +0000 (20:53 +0100)]
Explicitly test first kernel version in utimensat syscall test.

* testsuite/systemtap.syscall/futimes.c: utimensat was only available since
  2.6.22, but libc headers might already define __NR_utimensat.

14 years agoMatch syscall.pipe32 with regular syscall.pipe[2] output.
Mark Wielaard [Sat, 20 Mar 2010 19:20:39 +0000 (20:20 +0100)]
Match syscall.pipe32 with regular syscall.pipe[2] output.

* tapset/x86_64/syscalls.stp (syscall.pipe32[.return]): Define same
  variables and match argstr with regular syscall.pipe.

14 years agoAdd support for dup3 to syscall.stp tapset.
Mark Wielaard [Sat, 20 Mar 2010 18:58:29 +0000 (19:58 +0100)]
Add support for dup3 to syscall.stp tapset.

* tapset/aux_syscalls.stp (_dup3_flag_str): New helper function.
* tapset/syscalls.stp (syscall.dup2): Add alternatives to handle dup3 also.
* testsuite/systemtap.syscall/dup.c: New testcase.

14 years agoAdd F_DUPFD_CLOEXEC to _fcntl_cmd_str().
Mark Wielaard [Sat, 20 Mar 2010 13:59:11 +0000 (14:59 +0100)]
Add F_DUPFD_CLOEXEC to _fcntl_cmd_str().

14 years agoAdd MSG_CMSG_CLOEXEC to _recvflags_str.
Mark Wielaard [Sat, 20 Mar 2010 13:49:05 +0000 (14:49 +0100)]
Add MSG_CMSG_CLOEXEC to _recvflags_str.

14 years agoSupport epoll_create1 syscall.
Mark Wielaard [Fri, 19 Mar 2010 22:19:19 +0000 (23:19 +0100)]
Support epoll_create1 syscall.

* tapset/aux_syscalls.stp (_epoll_create1_flag_str): New helper function.
* tapset/syscalls.stp (syscall.epoll_create[.return]): Match epoll_creat1
  if available.

14 years agorobustness: add special_mapping_* to blacklist for 2.6.32ish
Frank Ch. Eigler [Sat, 20 Mar 2010 23:25:27 +0000 (19:25 -0400)]
robustness: add special_mapping_* to blacklist for 2.6.32ish

* dwflpp.cxx (build_blacklist): Add special_mapping_*

14 years agoPR11405: Warn and continue for parsing errors in tapsets
Josh Stone [Sat, 20 Mar 2010 19:29:37 +0000 (12:29 -0700)]
PR11405: Warn and continue for parsing errors in tapsets

When we start seeing tapsets provided by third parties, any errors in
their files should not be fatal to us.  Since we don't really know which
tapsets are our own, this leniency applies to all.

* main.cxx (main): Warn on tapset errors, but continue unless -W.
* testsuite/parseko/bad_tapset/foo.stp: New bogus tapset.
* testsuite/parseko/bad_tapset.stp: Check that "-W -I bad_tapset" fails.
* testsuite/parseok/bad_tapset.stp: Check that "-I bad_tapset" succeeds.
* testsuite/parseok/all_tapsets.stp: Check -W with the default tapsets.

14 years agoBump the sample indexes
Josh Stone [Sat, 20 Mar 2010 02:00:49 +0000 (19:00 -0700)]
Bump the sample indexes

14 years agoAdd ia64 pipe result support. Relax pipe syscall test a little.
Mark Wielaard [Fri, 19 Mar 2010 19:57:01 +0000 (20:57 +0100)]
Add ia64 pipe result support. Relax pipe syscall test a little.

* tapset/syscalls2.stp (syscall.pipe.return): ia64 provides pipe0, pipe1
  results through (user) registers.
* testsuite/systemtap.syscall/pipe.c: Only expect zero as input fildes.

14 years agoLet try_block contain any statement
Josh Stone [Fri, 19 Mar 2010 19:04:39 +0000 (12:04 -0700)]
Let try_block contain any statement

We still require the block for parsing, but the optimizer likes to fold
singleton blocks away, so any statement is possible.  PR11341 masks such
issues at compile time, but I'm a little surprised that we've gotten
away with this at runtime...

14 years agoPR909: add a baby test case
Frank Ch. Eigler [Fri, 19 Mar 2010 18:58:16 +0000 (14:58 -0400)]
PR909: add a baby test case

* testsuite/systemtap.examples/profiling/thread-times.stp: Prefer
  perf.sw.cpu_clock to timer.profile.  Prettify output by including
  comm string.

14 years agotapset: port addr_to_node() to rhel4
Frank Ch. Eigler [Fri, 19 Mar 2010 18:57:45 +0000 (14:57 -0400)]
tapset: port addr_to_node() to rhel4

14 years agoAdd testcase for syscall.pipe.
Mark Wielaard [Fri, 19 Mar 2010 15:55:10 +0000 (16:55 +0100)]
Add testcase for syscall.pipe.

14 years agoMerge syscall.pipe and syscall.pipe2 to get around "nesting".
Mark Wielaard [Fri, 19 Mar 2010 15:53:19 +0000 (16:53 +0100)]
Merge syscall.pipe and syscall.pipe2 to get around "nesting".

* tapset/syscalls2.stp (syscall.pipe[2][.return]): Merge into syscall.pipe
  and syscall.pipe.return. Set name according to flags.

14 years agoReindent syscall2.stp pipe[2][.return] to follow unify formatting rules.
Mark Wielaard [Fri, 19 Mar 2010 13:35:15 +0000 (14:35 +0100)]
Reindent syscall2.stp pipe[2][.return] to follow unify formatting rules.

See commit c0c1cc.

14 years agoPR11402 Support pipe2 syscall.
Mark Wielaard [Fri, 19 Mar 2010 12:00:50 +0000 (13:00 +0100)]
PR11402 Support pipe2 syscall.

The pipe2() was added to Linux in version 2.6.27. It is a variant of the
normal pipe syscall, but takes an extra flags argument which can be the
ORed value of O_NONBLOCK and O_CLOEXEC.

* tapset/aux_syscalls.stp (_sys_pipe2_flag_str:string): New helper function.
* tapset/syscalls2.stp (syscall.pipe2, syscall.pipe2.return): New probes.

14 years agoRecognize O_CLOEXEC in _sys_open_flag_str.
Mark Wielaard [Fri, 19 Mar 2010 11:30:44 +0000 (12:30 +0100)]
Recognize O_CLOEXEC in _sys_open_flag_str.

* tapset/aux_syscalls.stp (_sys_open_flag_str): If O_CLOEXEC is defined
  recognize and return it.

14 years agoMake pipe file descriptors available in syscall.pipe[.return].
Mark Wielaard [Fri, 19 Mar 2010 10:55:57 +0000 (11:55 +0100)]
Make pipe file descriptors available in syscall.pipe[.return].

The actual value of the pipe file descriptors can be interesting,
especially in the syscall.pipe.return probe. This can be done without
any embedded C now using @cast. So don't use _fildes_u() anymore.
_fildes_u in aux_syscall.stp is still retained because it is used in
nd_syscalls2.stp for pipe.

* tapset/syscalls2.stp (syscall.pipe, syscall.pipe.return): Add pipe1
  pipe2 convenience variables. Don't use _fildes_u for argstr anymore.

14 years agoUse @defined() in syscall.pipe to select whether fildes_uaddr is available.
Mark Wielaard [Fri, 19 Mar 2010 10:32:22 +0000 (11:32 +0100)]
Use @defined() in syscall.pipe to select whether fildes_uaddr is available.

* tapset/aux_syscalls.stp (syscall.pipe): Remove architecture dependent
  probe definitions. Newer gcc make $fildes available on more arches.
  Use @defined($fildes) to select on which ones.

14 years agoSprinkle static to prevent unnecessary inclusion
Josh Stone [Fri, 19 Mar 2010 01:59:57 +0000 (18:59 -0700)]
Sprinkle static to prevent unnecessary inclusion

* runtime/stack.c (_stp_stack_print_tsk): Static.
  (_stp_stack_snprint_tsk): Static.
* runtime/task_finder.c (__stp_utrace_task_finder_ops): Static.

14 years agoSimplify the perf entry handlers
Josh Stone [Fri, 19 Mar 2010 01:57:10 +0000 (18:57 -0700)]
Simplify the perf entry handlers

* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls):
  Just pass an index from the individual entry handlers, and let
  handle_perf_probe figure out the pp and ph.

14 years agoCreate one perf structure to rule them all
Josh Stone [Fri, 19 Mar 2010 01:54:18 +0000 (18:54 -0700)]
Create one perf structure to rule them all

* perf.h (stap_perf_probe): Define one structure for all our needs.
* perf.c (_stp_perf_init): Use the new struct, return errors directly.
  (_stp_perf_exit): Use the new struct.
* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls): Use
  the stap_perf_probe definition from perf.h now.
  (perf_derived_probe_group::emit_module_init): Adapt.
  (perf_derived_probe_group::emit_module_exit): Adapt.

14 years agoPR11346: Move the skip-badvars logic into const-folding
Josh Stone [Thu, 18 Mar 2010 22:39:42 +0000 (15:39 -0700)]
PR11346: Move the skip-badvars logic into const-folding

The const_folder is where we prune constant expressions, like
conditionals based on a @defined($foo), so we want to give this a chance
to work before skip-badvars comes in and throws a warning.

As an added bonus, this makes skip-badvars more generic, so it will work
even for non-dwarf $target variables.

* elaborate.cxx (const_folder::visit_target_symbol): Enact skip-badvars.
* tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't
  worry about badvars here anymore.  Save the error now, clean up later.
* testsuite/semok/badvar_undefined.stp: Test that @defined with
  skip-badvars doesn't throw any warnings.

14 years agotweak perf.* probe blurbage re. constrained hw pcl
Frank Ch. Eigler [Thu, 18 Mar 2010 22:17:16 +0000 (18:17 -0400)]
tweak perf.* probe blurbage re. constrained hw pcl

14 years agoPR909: add perf.hw_cache.* aliases
Frank Ch. Eigler [Thu, 18 Mar 2010 21:54:29 +0000 (17:54 -0400)]
PR909: add perf.hw_cache.* aliases

* tapset/perf.stp: Add 'em.
* man/tapset::perf.3stap: Document 'em a little.
* stapprobes.3stap.in: Fix .sample (not .samples) probe point typo.

14 years agoFixed BZ 568032 by adding support for sys_ia64_pipe.
David Smith [Thu, 18 Mar 2010 21:26:14 +0000 (16:26 -0500)]
Fixed BZ 568032 by adding support for sys_ia64_pipe.

* tapset/nd_syscalls2.stp:  Added support for 'sys_ia64_pipe' so that the
  syscall.pipe probe works correctly under RHEL5.5.

14 years agoFixed BZ 568032 by adding support for sys_ia64_pipe.
David Smith [Thu, 18 Mar 2010 21:21:15 +0000 (16:21 -0500)]
Fixed BZ 568032 by adding support for sys_ia64_pipe.

* tapset/syscalls2.stp: Added support for 'sys_ia64_pipe' so that the
  syscall.pipe probe works correctly under RHEL5.5.

14 years agoPR909: baby documentation for perf.* probes
Frank Ch. Eigler [Thu, 18 Mar 2010 21:03:48 +0000 (17:03 -0400)]
PR909: baby documentation for perf.* probes

14 years agooptimizer diagnostics: identify taken branch of optimizations
Frank Ch. Eigler [Thu, 18 Mar 2010 20:39:32 +0000 (16:39 -0400)]
optimizer diagnostics: identify taken branch of optimizations

* elaborate.cxx (const_folder::visit_if_statement, visit_binary_expression,
  visit_ternary_expression): Print constant value in -vvv diagnostics.

14 years agoRemove <asm/segment.h> inclusion to fix ppc build.
David Smith [Thu, 18 Mar 2010 15:37:51 +0000 (10:37 -0500)]
Remove <asm/segment.h> inclusion to fix ppc build.

* runtime/sym.c: Removed <asm/segment.h> include.  That file doesn't exist
  on ppc, and it appears to be empty everywhere else.

14 years agoautoconf: standardize CPU_KHZ based on session kernel_exports
Frank Ch. Eigler [Thu, 18 Mar 2010 14:18:47 +0000 (10:18 -0400)]
autoconf: standardize CPU_KHZ based on session kernel_exports

* buildrun.cxx (output_cpu_khz): Replace with generalized
  output_exportconf().

14 years agotestuite: modargs.exp shouldn't execute things without installcheck
Frank Ch. Eigler [Thu, 18 Mar 2010 13:56:18 +0000 (09:56 -0400)]
testuite: modargs.exp shouldn't execute things without installcheck

14 years agoPR909: store kernel exported symbols in session object
Frank Ch. Eigler [Thu, 18 Mar 2010 13:35:28 +0000 (09:35 -0400)]
PR909: store kernel exported symbols in session object

* session.h (kernel_exports): New field.
* main.cxx (parse_kernel_exports): Fill it.
* tapset-perfmon.cxx (perf_builder::build): Check it for our pal
  perf_event_create_kernel_counter.

14 years agoPR909: reject perf.* probes later
Frank Ch. Eigler [Thu, 18 Mar 2010 12:45:16 +0000 (08:45 -0400)]
PR909: reject perf.* probes later

* tapset-perfmon.cxx (perf_builder::build): Check for CONFIG_PERF_EVENTS here.
  (register_tapset_perf): ... instead of here.

14 years agoPR909: switch to tapset-based attr/type resolution
Frank Ch. Eigler [Thu, 18 Mar 2010 12:04:21 +0000 (08:04 -0400)]
PR909: switch to tapset-based attr/type resolution

* tapset/perf.stp: New file.
* tapset-perfmon.cxx (perf_derived_probe): Drop event_name field throughout.
  Listen to type(N).config(M) instead.

14 years agoPR909: filter out offline cpus from perfctr registration loop
Frank Ch. Eigler [Thu, 18 Mar 2010 03:08:26 +0000 (23:08 -0400)]
PR909: filter out offline cpus from perfctr registration loop

* runtime/perf.c (_stp_perf_init): If cpu_is_offline(), don't.

14 years agoPreserve perf initialization errors
Josh Stone [Thu, 18 Mar 2010 02:06:56 +0000 (19:06 -0700)]
Preserve perf initialization errors

* runtime/perf.c (_stp_perf_init): Pass through ERR_PTRs, and create our
  own -ENOMEM for allocation failures.
* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_init): Check
  IS_ERR for registration status.

14 years agoAssign the perf probe_point on registration failure
Josh Stone [Thu, 18 Mar 2010 01:41:21 +0000 (18:41 -0700)]
Assign the perf probe_point on registration failure

14 years agoAUTHORS bump
Josh Stone [Thu, 18 Mar 2010 00:40:27 +0000 (17:40 -0700)]
AUTHORS bump

* AUTHORS: Add Steve Dickson.
* .mailmap: Squash William Cohen's twin Will.

14 years agoPR909: Emit proper decls for perf probes
Josh Stone [Thu, 18 Mar 2010 00:30:06 +0000 (17:30 -0700)]
PR909: Emit proper decls for perf probes

While I still have some TODOs, it's now in a usable state for others to
start testing...

* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls):
  Implement the code to hook up real stap handlers.
  (perf_derived_probe_group::emit_module_init): Register for real.
  (perf_derived_probe_group::emit_module_exit): Unregister.

14 years agoTranslate perf events names into kernel names
Josh Stone [Wed, 17 Mar 2010 21:07:56 +0000 (14:07 -0700)]
Translate perf events names into kernel names

* tapset-perfmon.cxx (perf_builder::translate_event): New.  The event
  mapping is hard-copied from the current state of perf.
  (perf_builder::build): Call it.

14 years agoRename perf probe points
Josh Stone [Tue, 16 Mar 2010 23:53:48 +0000 (16:53 -0700)]
Rename perf probe points

These are now the available points:
  perf.event("NAME")
  perf.event("NAME").sample(NUM)

* tapset-perfmon.cxx (perf_derived_probe::perf_derived_probe): Add
  fields for the event name, type, and config.  Rewrite the probe_point
  to match the derived components
  (perf_builder::build): Parse the new fields.
  (register_tapset_perf): Adapt the match_nodes.

14 years agoMove the perf CONFIG check
Josh Stone [Wed, 17 Mar 2010 19:28:11 +0000 (12:28 -0700)]
Move the perf CONFIG check

IMO, it's better to contain the CONFIG check inside the perf code.

* tapsets.cxx (register_standard_tapsets): Always call perf register.
* tapset-perfmon.cxx (register_tapset_perf): Do the CONFIG check here.

14 years agoStart of perf tapset parsing
Will Cohen [Wed, 17 Mar 2010 15:15:24 +0000 (11:15 -0400)]
Start of perf tapset parsing

14 years agoRemove the old performance monitoring code.
Will Cohen [Wed, 17 Feb 2010 18:06:51 +0000 (13:06 -0500)]
Remove the old performance monitoring code.

14 years agoModify the systemtap perf sampling internal api
Will Cohen [Wed, 17 Feb 2010 16:28:36 +0000 (11:28 -0500)]
Modify the systemtap perf sampling internal api

The only information available in the overflow interrupt is the event.
Need to group other pieces of information needed by systemtap, so they
can be found based on the the location of the event information.

14 years agoPR909: Runtime for Performance Event Sampling
Will Cohen [Wed, 17 Feb 2010 15:30:15 +0000 (10:30 -0500)]
PR909: Runtime for Performance Event Sampling

Implements a very simple sampling runtime to using the performance
events kernel API. An perf event attribute describing the setup and a
function to handle the counter overflows are passed into
_stp_perf_init(). This function sets up the event on each processor.
If successfully initialized, a pointer data structure is
returned. When the sampling is no longer needed _stp_perf_del() is
called to shutdown the sampling.

 * runtime/perf.h: Add declarations for data structures and functions
 * runtime/perf.c: Remove old perfmon runtime runtime.
       Add  _stp_perf_init() and _stp_perf_del() functions.

14 years agoPR11364 sdt.h volatile for args isn't needed with gcc 4.5 or rh 4.4.3-10+
Mark Wielaard [Wed, 17 Mar 2010 14:41:02 +0000 (15:41 +0100)]
PR11364 sdt.h volatile for args isn't needed with gcc 4.5 or rh 4.4.3-10+

14 years agoFixed PR 11372 by removing (most) embedded-C from proc_mem.stp.
David Smith [Tue, 16 Mar 2010 20:47:36 +0000 (15:47 -0500)]
Fixed PR 11372 by removing (most) embedded-C from proc_mem.stp.

* tapset/proc_mem.stp: Tried to remove as much embedded-C as possible.
* tapset/atomic.stp: New file.
* testsuite/buildok/atomic.stp: New file.
* testsuite/systemtap.base/atomic.exp: Ditto.
* testsuite/systemtap.base/atomic_module.c: Ditto.
* testsuite/systemtap.base/atomic_module.makefile: Ditto.

14 years agoFixed regexp typo in stap_run_error.exp.
David Smith [Tue, 16 Mar 2010 20:19:25 +0000 (15:19 -0500)]
Fixed regexp typo in stap_run_error.exp.

* testsuite/lib/stap_run_error.exp: Fixed regexp typo.

14 years agoMove common code from {maxmemory.exp,overload.exp} into stap_run_error.exp.
David Smith [Tue, 16 Mar 2010 20:10:06 +0000 (15:10 -0500)]
Move common code from {maxmemory.exp,overload.exp} into stap_run_error.exp.

* testsuite/lib/stap_run_error.exp: New file.
* testsuite/config/unix.exp: Loads stap_run_error.exp.
* testsuite/systemtap.base/maxmemory.exp: Uses stap_run_error function
  instead of local code.
* testsuite/systemtap.base/overload.exp: Ditto.

14 years agoPR10812: make build-id checking somewhat more robust w.r.t. bad addresses
Frank Ch. Eigler [Tue, 16 Mar 2010 18:41:11 +0000 (14:41 -0400)]
PR10812: make build-id checking somewhat more robust w.r.t. bad addresses

* runtime/sym.c (_stp_module_check): Use a failure-tolerant
  get_user() loop instead of memcmp() for buildid binary strings.

14 years agoPR10831: Remember derived "aliases" in the probe chain
Josh Stone [Tue, 16 Mar 2010 18:11:26 +0000 (11:11 -0700)]
PR10831: Remember derived "aliases" in the probe chain

SDT and label probes are not really final probe types themselves, but
rather they get translated into some other final type.  This patch
preserves this relationship as if SDT and label probes were dynamically
generated aliases.

* elaborate.cxx (probe::create_alias): New, fake an alias_derived_probe.
* tapsets.cxx (query_label): Append the label name as an alias.
  (sdt_query::handle_query_module): Let convert_location do the alias.
  (sdt_query::convert_location): Translate the location using an alias.
* main.cxx (printscript): Elaborate the derivation debug dump.

14 years agoThe rpc buildok test suite probe breaks with new kernels
Steve Dickson [Tue, 16 Mar 2010 12:23:14 +0000 (08:23 -0400)]
The rpc buildok test suite probe breaks with new kernels

With newer kernels the rpc_release_task() routine is not defined
because it becomes inline since its only called once. Plus the
task allocation routines have changed so the arguments no longer
match up with previous routines. So this patch uses the kernel_v
clauses to allow the original functionality with older kernels
and not to break on new kernels.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdate the nfsd buildok test suite probes
Steve Dickson [Tue, 16 Mar 2010 10:04:04 +0000 (06:04 -0400)]
Update the nfsd buildok test suite probes

The __get_fh() is no longer exists due to the use
of the @cast defines, so its removed

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoBackport recently added probes to RHEL5(U5)
Steve Dickson [Thu, 4 Mar 2010 20:35:12 +0000 (15:35 -0500)]
Backport recently added probes to RHEL5(U5)

Ensured the recent additions of v4 probes and supporting
routines worked or at least don't break with RHEL5 U5 kernels
(this time without kernel version checks).

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoRevert "Backport recently added probes to RHEL5(U5)"
Steve Dickson [Thu, 4 Mar 2010 20:23:39 +0000 (15:23 -0500)]
Revert "Backport recently added probes to RHEL5(U5)"

This reverts commit 35f22bd95cea2fb75573a27282f2a5edea84f2d7
beause kernel_v kernel checks should not be used.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoBackport recently added probes to RHEL5(U5)
Steve Dickson [Thu, 4 Mar 2010 14:18:47 +0000 (09:18 -0500)]
Backport recently added probes to RHEL5(U5)

Ensured the recent additions of v4 probes and supporting
routines worked or at least don't break with RHEL5 U5 kernel.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoRevert "Backport recent changes to RHEL5 (U5)"
Steve Dickson [Wed, 3 Mar 2010 19:40:04 +0000 (14:40 -0500)]
Revert "Backport recent changes to RHEL5 (U5)"

This commit causes the 2.6.33 probes to break

This reverts commit 3ca4e3f2f5a7a615d0aed00a242f4e30864deaa8.

14 years agoBackport recent changes to RHEL5 (U5)
Steve Dickson [Wed, 3 Mar 2010 17:06:22 +0000 (12:06 -0500)]
Backport recent changes to RHEL5 (U5)

Ensured the recent additions of v4 probes and
supporting routines worked with RHEL5 U5 kernel.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoIncorporated comments from code review
Steve Dickson [Tue, 2 Mar 2010 20:03:53 +0000 (15:03 -0500)]
Incorporated comments from code review

- Fixed a couple typos
- To allow better optimization, removed the used of
 "convenience variables"

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoAllow better filtering with IP address and File handle
Steve Dickson [Tue, 23 Feb 2010 16:58:16 +0000 (11:58 -0500)]
Allow better filtering with IP address and File handle

To allow filtering by the client's IP address,
the addr_from_rqst_str() function was added which
extracts the IP address from incoming procedures
and converts them into a character string. Calls to
addr_from_rqst_str() were added to the top of each
probe so callers of the probes can use the IP addresses
as a filter.

Calls to __svc_fh() were also sprinkled were needed
so callers can also filter on file handles

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoGeneral clean up on the upper level probes
Steve Dickson [Tue, 23 Feb 2010 16:56:15 +0000 (11:56 -0500)]
General clean up on the upper level probes

Added the ftype() function which converts file types
into character strings

Added calls nfsderror() to the return probes that will display
errors in character strings

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoRemoved the nfsd.proc4.compound and nfsd.proc.compound.return probes
Steve Dickson [Tue, 23 Feb 2010 16:52:17 +0000 (11:52 -0500)]
Removed the nfsd.proc4.compound and nfsd.proc.compound.return probes

Either probes displayed anything that was useful, plus
there are other ways to display similar information.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.remove probes
Steve Dickson [Tue, 23 Feb 2010 16:51:19 +0000 (11:51 -0500)]
Updated nfsd.proc.remove probes

Converted the nfsd.proc.remove probes to used
the @cast() mechanism.

Created the nfsd.proc4.remove probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.remove probes
Steve Dickson [Tue, 23 Feb 2010 16:50:38 +0000 (11:50 -0500)]
Updated nfsd.proc.remove probes

Converted the nfsd.proc.remove probes to used
the @cast() mechanism.

Created the nfsd.proc4.remove probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.create probes
Steve Dickson [Tue, 23 Feb 2010 16:48:57 +0000 (11:48 -0500)]
Updated nfsd.proc.create probes

Converted the nfsd.proc.create probes to used
the @cast() mechanism.

Created the nfsd.proc4.create probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.write probes
Steve Dickson [Tue, 23 Feb 2010 16:48:15 +0000 (11:48 -0500)]
Updated nfsd.proc.write probes

Converted the nfsd.proc.write probes to used
the @cast() mechanism.

Created the nfsd.proc4.write probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.read probes
Steve Dickson [Tue, 23 Feb 2010 16:47:19 +0000 (11:47 -0500)]
Updated nfsd.proc.read probes

Converted the nfsd.proc.read probes to used
the @cast() mechanism.

Created the nfsd.proc4.read probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUpdated nfsd.proc.lookup probes
Steve Dickson [Tue, 23 Feb 2010 16:29:06 +0000 (11:29 -0500)]
Updated nfsd.proc.lookup probes

Converted the nfsd.proc.lookup probes to used
the @cast() mechanism.

Created the nfsd.proc4.lookup probes

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoAdded new nfsderror() function
Steve Dickson [Tue, 23 Feb 2010 16:15:05 +0000 (11:15 -0500)]
Added new nfsderror() function

The nfsderror() function takes the error numbers used
by the NFS server and converts them into a text representation
of the given error number.

Signed-off-by: Steve Dickson <steved@redhat.com>
14 years agoUse the @defined rather than kernel_v in the inode-watch.stp
William Cohen [Fri, 12 Mar 2010 22:44:28 +0000 (17:44 -0500)]
Use the @defined rather than kernel_v in the inode-watch.stp

14 years agoMinor corrections to inode-watch.stp example.
William Cohen [Fri, 12 Mar 2010 22:36:02 +0000 (17:36 -0500)]
Minor corrections to inode-watch.stp example.

14 years agoGet d_path's root natively with @cast
Josh Stone [Fri, 12 Mar 2010 19:39:52 +0000 (11:39 -0800)]
Get d_path's root natively with @cast

As mjw's aborted commit 5ab0b1b6 attempted, we can use a @cast to get
the filesystem root for the current task instead of embedded-C.  I've
left it using the kernel debuginfo instead of headers for now, because
all of the neighboring @casts are doing the same.

* tapset/dentry.stp (d_path): Use @cast to get the root.
  (__dentry_get_current_root): Remove, no longer needed.
* testsuite/buildok/dentry.stp: Test that dentry's functions all build.

This page took 0.065797 seconds and 5 git commands to generate.