]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years agoPR14781: use kmem_cache_create with unique name
Frank Ch. Eigler [Mon, 29 Oct 2012 00:53:11 +0000 (20:53 -0400)]
PR14781: use kmem_cache_create with unique name

* runtime/stp_utrace.c (utrace_init): Instead of using the KMEM_CACHE macro,
  invoke kmem_cache_create directly, with cache names that are going to be
  unique across concurrent systemtap sessions.

11 years agoPR14781 part 1: don't panic
Frank Ch. Eigler [Mon, 29 Oct 2012 00:16:55 +0000 (20:16 -0400)]
PR14781 part 1: don't panic

* runtime/stp_utrace.stp (utrace_init): Don't SLAB_PANIC on duplicate
  kmem_cache names, as is sadly likely for concurrent inode-uprobes
  scripts running on CONFIG_DEBUG_VM kernels.
* runtime/linux/task_finder2.c (stap_start_task_finder): Deign to check
  the utrace_init return code, and fail with a touch of grey grace.

11 years agoUpdated locking comments in _stp_stat_get().
David Smith [Wed, 24 Oct 2012 18:02:50 +0000 (13:02 -0500)]
Updated locking comments in _stp_stat_get().

11 years agoAdd spin-rawhide script for automated rawhide releases
Lukas Berk [Wed, 24 Oct 2012 16:08:22 +0000 (12:08 -0400)]
Add spin-rawhide script for automated rawhide releases

* scripts/spin-rawhide: freshly clones systemtap.git and fedpkg git
  repositories, update the .spec file accordingly and submit new build to
  bodhi

11 years agoLog the command being executed in testsuite/lib/stap_run_exact.exp.
David Smith [Tue, 23 Oct 2012 21:29:26 +0000 (16:29 -0500)]
Log the command being executed in testsuite/lib/stap_run_exact.exp.

11 years ago(PR14571 partial fix) Rework dyninst stat/map data storage.
David Smith [Tue, 23 Oct 2012 21:21:10 +0000 (16:21 -0500)]
(PR14571 partial fix) Rework dyninst stat/map data storage.

* runtime/map.c: Switched from TLS to just an array of map data for
  dyninst mode. Pushed most of the kernel vs. dyninst code down to
  runtime/{linux,dyninst}/map_runtime.h.
* runtime/map-stat.c (_stp_map_new_hstat_log): Ditto.
* runtime/map.h: Ditto.
* runtime/pmap-gen.c: Ditto.
* runtime/stat.c (_stp_stat_add): Switched from TLS to just an array of
  stat data for dyninst mode. Pushed most of the kernel vs. dyninst code
  down to runtime/{linux,dyninst}/stat_runtime.h.
* runtime/stat-common.c: Ditto.
* runtime/stat.h: Ditto.
* runtime/dyninst/map_runtime.h: New file.
* runtime/dyninst/stat_runtime.h: New file.
* runtime/linux/map_runtime.h: New file.
* runtime/linux/stat_runtime.h: New file.
* runtime/dyninst/tls_data.c: Deleted file.

11 years agoruntime: fix timers for old kernels
Josh Stone [Mon, 22 Oct 2012 23:35:19 +0000 (16:35 -0700)]
runtime: fix timers for old kernels

This is a regression from commit 2b5ecaf, which split the hrtimer code
into the runtime.  The kernel portion needs to vary the return type of
the callback function for old kernels, using int instead of the enum.
This patch defines hrtimer_return_t to abstract the difference.

11 years agotapset: Add the macro @choose_defined and use it
Josh Stone [Mon, 22 Oct 2012 20:55:49 +0000 (13:55 -0700)]
tapset: Add the macro @choose_defined and use it

This returns the first parameter if it's @defined, otherwise it returns
the second parameter, replacing the common @defined(x)?x:y pattern.

I only updated the tapsets to use this, as I feel that's where we should
show off good code practice.  There are opportunities in the testsuite
that could use it too, but it's not necessary, and probably better to
leave existing tests undisturbed when possible.

11 years agoNEWS: retroactively note previous probefunc() is available as --compatible=1.8
Frank Ch. Eigler [Mon, 22 Oct 2012 13:22:13 +0000 (09:22 -0400)]
NEWS: retroactively note previous probefunc() is available as --compatible=1.8

11 years agofix i18n whitespace nit
Frank Ch. Eigler [Mon, 22 Oct 2012 13:12:52 +0000 (09:12 -0400)]
fix i18n whitespace nit

* main.cxx (passes_0_4): Drop extra space inside " foo " in listings
  of files parsed within tapset directories.

11 years agoAdjust buildok/xtime.stp for kernel commit 1e75f.
Mark Wielaard [Sun, 21 Oct 2012 23:37:51 +0000 (01:37 +0200)]
Adjust buildok/xtime.stp for kernel commit 1e75f.

time: Condense timekeeper.xtime into xtime_sec.

11 years agoPR14742 - more complete dwz / DW_TAG_partial_unit support
Mark Wielaard [Sun, 21 Oct 2012 23:00:40 +0000 (01:00 +0200)]
PR14742 - more complete dwz / DW_TAG_partial_unit support

Don't use DW_TAG_partial_units directly in dwflpp::iterate_over_cus
and dwarf_var_expanding_visitor::getcuscope. Descent into imported_units
in has_only_decl_members, dwflpp::iterate_over_globals,
dwflpp::iterate_over_types, dwflpp::iterate_over_labels
dwflpp::inner_die_containing_pc, dwflpp::print_locals,
dwflpp::print_members, dwflpp::find_struct_member and
dwarf_pretty_print::recurse_struct_members.

11 years agoPR14745: note possibility of probe registration failure for timer.profile
Frank Ch. Eigler [Sun, 21 Oct 2012 01:53:57 +0000 (21:53 -0400)]
PR14745: note possibility of probe registration failure for timer.profile

11 years agoAdded a bug fix in _stp_stat_init()'s error handling code.
David Smith [Fri, 19 Oct 2012 19:21:11 +0000 (14:21 -0500)]
Added a bug fix in _stp_stat_init()'s error handling code.

* runtime/stat.c (_stp_stat_init): Be sure to free memory allocated with
  _stp_alloc_percpu() with _stp_free_percpu() - not _stp_kfree().

11 years agosamples: add baby-ltrace example for .plt probes
Frank Ch. Eigler [Thu, 18 Oct 2012 02:13:53 +0000 (22:13 -0400)]
samples: add baby-ltrace example for .plt probes

11 years agodocumentation: elaborate slightly on .plt probes
Frank Ch. Eigler [Wed, 17 Oct 2012 21:46:33 +0000 (17:46 -0400)]
documentation: elaborate slightly on .plt probes

11 years agoFix .exported typo in stapprobes manpage.
Stan Cox [Wed, 17 Oct 2012 15:36:00 +0000 (11:36 -0400)]
Fix .exported typo in stapprobes manpage.

11 years agoFixed PR14735 by adding timing ('-t') mode support for dyninst.
David Smith [Wed, 17 Oct 2012 14:52:13 +0000 (09:52 -0500)]
Fixed PR14735 by adding timing ('-t') mode support for dyninst.

* tapsets.cxx (common_probe_entryfn_prologue): Added dyninst support for
  timing ("-t") mode. Disable overload processing for dyninst mode.
  (common_probe_entryfn_epilogue): Change funcion signature. Add dyninst
  support for timing ("-t") mode. Disable overload processing for dyninst
  mode.
  (dwarf_derived_probe_group::emit_module_decls): Update
  common_probe_entryfn_epilogue() call.
  (uprobe_derived_probe_group::emit_module_utrace_decls): Ditto.
  (kprobe_derived_probe_group::emit_module_decls): Ditto.
  (hwbkpt_derived_probe_group::emit_module_decls): Ditto.
  (tracepoint_derived_probe_group::emit_module_decls): Ditto.
* tapset-been.cxx (be_derived_probe_group::emit_module_decls): Ditto.
* tapset-itrace.cxx (itrace_derived_probe_group::emit_module_decls):
  Ditto.
* tapset-mark.cxx (mark_derived_probe_group::emit_module_decls): Ditto.
* tapset-netfilter.cxx (netfilter_derived_probe_group::emit_module_decls):
  Ditto.
* tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls): Ditto.
* tapset-procfs.cxx (procfs_derived_probe_group::emit_module_decls): Ditto.
* tapset-timers.cxx (timer_derived_probe_group::emit_module_decls): Ditto.
  (hrtimer_derived_probe_group::emit_module_decls): Ditto.
  (profile_derived_probe_group::emit_module_decls): Ditto.
* tapset-utrace.cxx (utrace_derived_probe_group::emit_module_decls): Ditto.
* runtime/dyninst/runtime.h: Added NSEC_PER_SEC and _stp_timespec_sub
  macros. Always include stat.c, as runtime/linux/runtime.h does.

11 years agostapdyn: Big refactoring
Josh Stone [Tue, 16 Oct 2012 23:11:07 +0000 (16:11 -0700)]
stapdyn: Big refactoring

The main additions are the "mutator" class working with the overall
session, and the "mutatee" class working with the individual targets.
This is a bit of code churn, with no functional change, but it should
make it easier to keep track of our current state and add new features.

11 years agoPR14731: fix PR12022 regression for synthetic foreach()
Frank Ch. Eigler [Tue, 16 Oct 2012 18:43:52 +0000 (14:43 -0400)]
PR14731: fix PR12022 regression for synthetic foreach()

* elaborate.cxx (add_global_var_display): For foreach_loop created
  for otherwise-unused global, initialize sort_aggr => sc_none, the
  same way the parser would.

11 years agodocumentation: mention non-semaphore mode for dtrace(1) headers
Frank Ch. Eigler [Tue, 16 Oct 2012 15:12:52 +0000 (11:12 -0400)]
documentation: mention non-semaphore mode for dtrace(1) headers

11 years agoFixed PR14701 by adding dyninst timer probe support.
David Smith [Mon, 15 Oct 2012 21:28:28 +0000 (16:28 -0500)]
Fixed PR14701 by adding dyninst timer probe support.

* tapset-timers.cxx (hrtimer_derived_probe_group::emit_interval): Removed
  function.
  (hrtimer_derived_probe_group::emit_module_decls): Pushed some code down
  to the runtime and added dyninst support.
  (hrtimer_derived_probe_group::emit_module_init): Ditto.
  (hrtimer_derived_probe_group::emit_module_exit): Ditto.
  (timer_builder::build): Throw semantic errors if 'timer.jiffies' or
  'timer.profile' probes are used in dyninst mode.
  (register_tapset_timers): Add fake privilege for 'timer.profile' probes
  when in dyninst mode (so we get a semantic error, not a privilege error).
* buildrun.cxx (compile_dyninst): Added '-lrt' for timer functions.
* testsuite/systemtap.pass1-4/buildok-dyninst.exp: Move some tests to the
  kfail list.
* runtime/timer.c: New file.
* runtime/dyninst/timer.c: Ditto.
* runtime/linux/timer.c: Ditto.

11 years agoPR14712: Correct the bug number in a comment
Josh Stone [Mon, 15 Oct 2012 17:46:05 +0000 (10:46 -0700)]
PR14712: Correct the bug number in a comment

I mixed this up in the log too; commits 529c7eae and 3df148cb
are really for PR14712, not PR14172.

11 years agotestsuite: chmod a+x some semok testcases
Frank Ch. Eigler [Sat, 13 Oct 2012 16:30:29 +0000 (12:30 -0400)]
testsuite: chmod a+x some semok testcases

11 years agoPR12022 test cases for foreach (... @aggr ...) sorting
Frank Ch. Eigler [Sat, 13 Oct 2012 16:33:06 +0000 (12:33 -0400)]
PR12022 test cases for foreach (... @aggr ...) sorting

11 years agoPR12022: lightly document new foreach (@aggr) sorting option
Frank Ch. Eigler [Sat, 13 Oct 2012 16:22:56 +0000 (12:22 -0400)]
PR12022: lightly document new foreach (@aggr) sorting option

11 years agoPR12022: support foreach sorting by user-selected aggregate operator
Frank Ch. Eigler [Sat, 13 Oct 2012 16:13:35 +0000 (12:13 -0400)]
PR12022: support foreach sorting by user-selected aggregate operator

The syntax goes:

    foreach ([x,y] in array @avg -)  { }

inserting the desired sorting aggregator between the array name and
the +/- The runtime has been ready for this for a long time (see the
runtime/map.c SORT_* macros), finally time for the translator to let
users enjoy it.

* staptree.h (stat_component_type): Add sc_none possibility.
  (foreach_loop): Add sort_aggr field.
* parse.cxx (parse_foreach_loop): Parse optional statistics @ops.
* staptree.cxx (stat_op::print): Reject sc_none.
  (foreach_loop::print): Print statistics @ops.
* elaborate.cxx (typeresolution_info::visit_foreach_loop): Mark
  invalid @op sorting on non-statistics arrays.
* translate.cxx (c_unparser::visit_foreach_loop): Map sort_aggr
  to runtime SORT_* value, emitted as strings.
  (c_unparser::visit_stat_op): Reject sc_none.

11 years agoman pages: elaborate more on probe syntax/semantics in stapprobes.3stap
Frank Ch. Eigler [Sat, 13 Oct 2012 14:48:30 +0000 (10:48 -0400)]
man pages: elaborate more on probe syntax/semantics in stapprobes.3stap

11 years agostap.1 man page: take probe point syntax details back out
Frank Ch. Eigler [Sat, 13 Oct 2012 14:32:34 +0000 (10:32 -0400)]
stap.1 man page: take probe point syntax details back out

Seeing that stapprobes.3stap is fine, replace with a better cross-reference.

11 years agostap.1: mention a little about the probe point !/? operators
Frank Ch. Eigler [Sat, 13 Oct 2012 03:40:28 +0000 (23:40 -0400)]
stap.1: mention a little about the probe point !/? operators

... even though they're listed in stapprobes.3stap also.

11 years agolangref: add a sentence identifying the 'any' meaning of probe-point lists
Frank Ch. Eigler [Sat, 13 Oct 2012 03:27:01 +0000 (23:27 -0400)]
langref: add a sentence identifying the 'any' meaning of probe-point lists

11 years agoPR14172: Fix the include order so vma tracking works
Josh Stone [Sat, 13 Oct 2012 00:16:07 +0000 (17:16 -0700)]
PR14172: Fix the include order so vma tracking works

In commit 529c7eae, by moving the sym.c include, I broke the order
between #define HAVE_TASK_FINDER and the #ifdef in vma.c.

Reported-by: Yichun Zhang <agentzh@gmail.com>
11 years agoPR14172: Fix for kernels without VM_EXECUTABLE
Josh Stone [Fri, 12 Oct 2012 21:45:55 +0000 (14:45 -0700)]
PR14172: Fix for kernels without VM_EXECUTABLE

We were using VM_EXECUTABLE in two ways:

1) In task_finder for locating the process executable among all the
vmas.  Since around 2.6.26 there is also mm->exe_file, which will serve
this purpose just fine.

2) In uprobes to avoid relocation offset for semaphores in ET_EXEC
files.  This is actually incorrect, but harmless, because the callback
path for ET_EXEC targets already sets relocation=offset=0 anyway.  So we
can just remove the special case for VM_EXECUTABLE altogether.

* runtime/task_finder_vma.c (stap_find_exe_file): New, locate the
  process executable either by VM_EXECUTABLE or mm->exe_file.
* runtime/linux/task_finder.c (__stp_get_mm_path): Use stap_find_exe_file.
* runtime/linux/task_finder2.c (__stp_get_mm_path): Ditto.
* runtime/linux/uprobes-common.c (stap_uprobe_change_plus): Don't
  special case for VM_EXECUTABLE (and add a comment why).
* runtime/linux/uprobes-inode.c (stapiu_change_plus): Ditto.
  (stapiu_get_task_inode): Use stap_find_exe_file.

11 years agobump up SYSTEMTAP_CACHE_CLEAN_DEFAULT_INTERVAL_S to 300 (5 minutes)
Frank Ch. Eigler [Fri, 12 Oct 2012 21:34:03 +0000 (17:34 -0400)]
bump up SYSTEMTAP_CACHE_CLEAN_DEFAULT_INTERVAL_S to 300 (5 minutes)

11 years agotestsuite: tweak net-sanity.exp test
Frank Ch. Eigler [Fri, 12 Oct 2012 16:27:42 +0000 (12:27 -0400)]
testsuite: tweak net-sanity.exp test

It shouldn't use stap -vv, ashat creates too much noise in the .log file.
It shouldn't use 0xd34db33f as a known-bad address, because sometimes it's good.
Really good.  Mmmm, tasty, BBQ goodness good.  Honey, time to warm up the burners!

11 years agoPR14245 stapio should not pass inherited relay_basedir_fd
Frank Ch. Eigler [Fri, 12 Oct 2012 03:31:28 +0000 (23:31 -0400)]
PR14245 stapio should not pass inherited relay_basedir_fd

jistone reported that new fd passing should be suppressed for stapio-spawned
child processes like target_cmd or function::system().

* staprun/stapio.c (main): Set CLOEXEC on relay_basedir_fd (if any).

11 years agoPR14245 clean up error messages for staprun -d SOMETHING_AWFUL
Frank Ch. Eigler [Fri, 12 Oct 2012 03:28:30 +0000 (23:28 -0400)]
PR14245 clean up error messages for staprun -d SOMETHING_AWFUL

jistone reported that the previously moved
"ERROR: no access to debugfs; try "chmod 0755 /sys/kernel/debug" as root"
message was appearing for erroneous staprun -d FOOBAR cases.

* ctl.c (init_ctl_channel): Print a more general error for any .ctl-file
  opening failure.

11 years agoPR14245: fix staprun->stapio -F<fd> passing for -A (attach) mode
Frank Ch. Eigler [Fri, 12 Oct 2012 03:26:31 +0000 (23:26 -0400)]
PR14245: fix staprun->stapio -F<fd> passing for -A (attach) mode

jistone reported that the recent -F<fd> code was not passing on
a suitable basedir fd to stapio's forked for re-attach (-A) mode.
Make it so.

* staprun.c (init_staprun): In attach_mode, do a dummy
  init_ctl_channel, just to gather a relay_basedir_fd .

11 years agostapdyn: remove the TODO in favor of bugzilla
Josh Stone [Thu, 11 Oct 2012 19:58:47 +0000 (12:58 -0700)]
stapdyn: remove the TODO in favor of bugzilla

11 years agostaprun: let stap -vv (= staprun -v) print original/renamed module name before load
Frank Ch. Eigler [Thu, 11 Oct 2012 19:38:27 +0000 (15:38 -0400)]
staprun: let stap -vv (= staprun -v) print original/renamed module name before load

11 years agoBZ863832 part 2, add stap-server home directory into %install too
Frank Ch. Eigler [Thu, 11 Oct 2012 18:06:21 +0000 (14:06 -0400)]
BZ863832 part 2, add stap-server home directory into %install too

11 years agostapdyn: Fixed the verbose logging of probes found
Josh Stone [Thu, 11 Oct 2012 17:47:36 +0000 (10:47 -0700)]
stapdyn: Fixed the verbose logging of probes found

* stapdyn/stapdyn.cxx (find_uprobes): Use j to index the inner loop.

11 years agoSet staprun's verbosity one less than stap
Josh Stone [Thu, 11 Oct 2012 17:42:10 +0000 (10:42 -0700)]
Set staprun's verbosity one less than stap

Prior to commit e520ea8, staprun would get one -v for s.verbosity>1 and
a second -v for s.verbosity>2.  That commit unbounded the number of -v
for staprun, but changed the off-by-one, and staprun and stapio are too
chatty for that.

This also now sets stapdyn verbosity the same way.

* buildrun.cxx (make_run_command): Give one less -v flag.
  (make_dyninst_run_command): Set stapdyn -v flags the same way.

11 years agoFixed PR14659 so that ptrace can be used on tasks probed with systemtap.
David Smith [Thu, 11 Oct 2012 15:55:58 +0000 (10:55 -0500)]
Fixed PR14659 so that ptrace can be used on tasks probed with systemtap.

* runtime/stp_utrace.c (utrace_set_events): No longer set
  TIF_SYSCALL_TRACE on the target task.
  (utrace_reset): No longer clear TIF_SYSCALL_TRACE on the target task.
* testsuite/systemtap.base/ptrace.exp: New testcase.

11 years agoBZ863832 add stap-server home directory to our rpm payload
Frank Ch. Eigler [Thu, 11 Oct 2012 14:25:46 +0000 (10:25 -0400)]
BZ863832 add stap-server home directory to our rpm payload

dwalsh advises that doing so may make selinux more compliant with
our need for an unusually placed home directory for stap-server.

* systemtap.spec (-server %files): Add %dir /var/lib/stap-server.

11 years agoPR14245: support /sys/kernel/debug mounted 0700
Frank Ch. Eigler [Wed, 10 Oct 2012 22:10:40 +0000 (18:10 -0400)]
PR14245: support /sys/kernel/debug mounted 0700

This is done by staprun passing a file descriptor for the
/sys/kernel/debug/systemtap/stap_MODULE directory from staprun
(running setuid) to stapio (running unprivileged, previously unable to
traverse to that path itself). This FD passing is done with a new
option -F<fd> for stapio (though by accident staprun also accepts (and
rejects) this option).

Since openat(2) is relatively recent, autoconf macros are used to back
down to graceful failure on older kernels, and to hide the new code.
New staprun always uses -F<fd> to stapio, even if permissions on
/sys/kernel/debug do not require it.

* staprun/common.c (relay_basedir_fd): New variable.
  (parse_args): Parse new -F: option.
  (usage): Document it.
* staprun/staprun.h: Corresponding changes.
* staprun/ctl.c (init_ctl_channel): Reorganize to try an incoming
  relay_basedir_fd first (with a faccessat cross-user check) first.
  Try to compute a relay_basedir_fd if not already set.
* staprun/mainloop.c (read_buffer_info): Note ignoring of this PR facility on
  RHEL4-era old_transport.
* staprun/relayfs.c (init_relayfs): Attempt to open relay_fd[] using
  relay_basedir_fd if specified.
* staprun/stapio.c: Top secret.
* staprun/staprun.c (main): Don't allow staprun itself to take -F, for it
  could be misused by a very bad person (tm).  However, arrange to pass
  it to stapio, if we have incidentally discovered a good relay_basedir_fd.
* staprun/staprun_funcs.c (mountfs): Drop access_debugfs() check at this
  point, as init_ctl_channel() will do the check later.

11 years agoPR14245: have configury look for openat(2) syscall
Frank Ch. Eigler [Wed, 10 Oct 2012 22:09:21 +0000 (18:09 -0400)]
PR14245: have configury look for openat(2) syscall

... since it will be used for fd passing between staprun & stapio

11 years agostaprun: arrange -v params commeasurate with stap -v
Frank Ch. Eigler [Wed, 10 Oct 2012 21:43:53 +0000 (17:43 -0400)]
staprun: arrange -v params commeasurate with stap -v

* buildrun.cxx (make_run_command): Instead of a meager zero-to-two
  -v's for staprun, add just as many as s.verbose currently indicates.

11 years agoPR14555: tweak & simplify warning messages for _stext=0 message handling
Frank Ch. Eigler [Wed, 10 Oct 2012 16:44:03 +0000 (12:44 -0400)]
PR14555: tweak & simplify warning messages for _stext=0 message handling

11 years agoPR14555: handle 0 _stext relocs from userspace by kallsyms_lookup_name fallback
Alexander Lochmann [Wed, 10 Oct 2012 15:13:33 +0000 (11:13 -0400)]
PR14555: handle 0 _stext relocs from userspace by kallsyms_lookup_name fallback

* runtime/transport/symbols.c (_stp_do_relocation): For an incoming
  _stext=0 relocation (such as for /proc/sys/kernel/kptr_restrict = 2),
  fall back to kallsyms_lookup_name.

11 years agostap.1: note dyninst alternative to lkm in first paragraph
Frank Ch. Eigler [Wed, 10 Oct 2012 15:08:52 +0000 (11:08 -0400)]
stap.1: note dyninst alternative to lkm in first paragraph

11 years agopost-release version bump: 2.1 coming down the line
Frank Ch. Eigler [Wed, 10 Oct 2012 02:01:35 +0000 (22:01 -0400)]
post-release version bump: 2.1 coming down the line

11 years agoAdd 2.0 release dates to NEWS and systemtap.spec release-2.0
Josh Stone [Wed, 10 Oct 2012 00:08:59 +0000 (17:08 -0700)]
Add 2.0 release dates to NEWS and systemtap.spec

11 years agoMake the tapcheck.sh look for all .stp files in the tapset directory
William Cohen [Tue, 9 Oct 2012 20:30:48 +0000 (16:30 -0400)]
Make the tapcheck.sh look for all .stp files in the tapset directory

With the reorganization of the tapset directory there were some tapsets
multiple directories down.  tapcheck.sh was only checking the top level
of the tapset directory.  This meant that is was missing a many of the
tapsets that were in subdirectories.  This change makes the results more
accurate.

11 years agoNEWS - prose tweak for %( systemtap_privilege ... entry
Serguei Makarov [Tue, 9 Oct 2012 20:34:06 +0000 (16:34 -0400)]
NEWS - prose tweak for %( systemtap_privilege ... entry

11 years agoAUTHORS bump
Serguei Makarov [Tue, 9 Oct 2012 20:30:57 +0000 (16:30 -0400)]
AUTHORS bump

11 years agoFix docs for %( systemtap_privilege tweak
Serguei Makarov [Tue, 9 Oct 2012 20:11:37 +0000 (16:11 -0400)]
Fix docs for %( systemtap_privilege tweak

11 years agochange %( systemtap_privilege check to use stapdev/stapsys/stapusr names
Serguei Makarov [Tue, 9 Oct 2012 19:47:28 +0000 (15:47 -0400)]
change %( systemtap_privilege check to use stapdev/stapsys/stapusr names

11 years agoPR14655: more politely fail if kallsyms_lookup_name unexported
Frank Ch. Eigler [Tue, 9 Oct 2012 18:44:26 +0000 (14:44 -0400)]
PR14655: more politely fail if kallsyms_lookup_name unexported

* buildrun.cxx (compile_pass): Look for said export.
* runtime/sym.c: Provide a _stp_error()-laden backup.

11 years agoPR14632: Some typos in documents
Robin Lee [Tue, 9 Oct 2012 18:11:08 +0000 (14:11 -0400)]
PR14632: Some typos in documents

There were some articles duplicated in the SystemTap Beginners
Guide and typos the systemtap tutorial.

11 years agoRename session::is_usermode to runtime_usermode_p
Josh Stone [Tue, 9 Oct 2012 17:50:44 +0000 (10:50 -0700)]
Rename session::is_usermode to runtime_usermode_p

Just appeasing the aesthetic sensibilities of a heckler...

11 years agoPR14572: Set s.privilege = unprivileged for stapdyn
Josh Stone [Tue, 9 Oct 2012 16:43:34 +0000 (09:43 -0700)]
PR14572: Set s.privilege = unprivileged for stapdyn

When running under Dyninst, we are effectively unprivileged by nature,
so setting s.privilege to reflect that helps restrict the available
probe types.

However, we still want to allow guru mode for setting target variables
and using embedded-C, so let systemtapr_:session::is_usermodea() pass.

* session.cxx (systemtap_session::parse_cmdline): For --runtime=dyninst,
  set the privilege level too.
  (systemtap_session::check_options): Allow -g for is_usermode().
* staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Allow
  embedded-C unrestricted for is_usermode().
  (varuse_collecting_visitor::visit_embedded_expr): Ditto.

11 years agoChange NEWS to conform to added relnotes announcements.
Serguei Makarov [Tue, 9 Oct 2012 14:34:06 +0000 (10:34 -0400)]
Change NEWS to conform to added relnotes announcements.

11 years agoPR14682: fix _stp_pmap_agg error exit path
Frank Ch. Eigler [Mon, 8 Oct 2012 00:01:37 +0000 (20:01 -0400)]
PR14682: fix _stp_pmap_agg error exit path

commit 82523f19 changed the error-exit path of _stp_pmap_agg, but was
confused by the multiple (three!) levels of nested loops in effect at
the point of failure.  While the prior "return;" skipped an overall
(newly needed) aggregate-unlock; the current "break;" skipped too
little.  Switch to a proper simple goto to almost but not quite
return;.

11 years agotestsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes
Frank Ch. Eigler [Mon, 8 Oct 2012 00:01:03 +0000 (20:01 -0400)]
testsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes

11 years agospec: lament the need for a few other -m32 prereqs that are hard to name
Frank Ch. Eigler [Sun, 7 Oct 2012 19:42:48 +0000 (15:42 -0400)]
spec: lament the need for a few other -m32 prereqs that are hard to name

11 years agostapdyn: Boost the comment ratio
Josh Stone [Sat, 6 Oct 2012 00:57:38 +0000 (17:57 -0700)]
stapdyn: Boost the comment ratio

There's no functional change here, just a lot of words...

11 years agostapdyn: Limit functions searches to the stap module
Josh Stone [Sat, 6 Oct 2012 00:02:56 +0000 (17:02 -0700)]
stapdyn: Limit functions searches to the stap module

This is slightly more efficient because we already know which object we
expect to have the functions, so we don't need to search the whole app.

* stapdyn/stapdyn.cxx (call_inferior_function): Take the BPatch_object
  in which we're searching for functions as a parameter.
  (instrument_uprobe_target, instrument_uprobes): Ditto.
  (dynamic_library_callback): Pass the stap dso from global.
  (main): Save the stap dso into a global, and pass it as needed.

11 years agostapdyn: track dlopened objects for probes
Josh Stone [Fri, 5 Oct 2012 23:27:27 +0000 (16:27 -0700)]
stapdyn: track dlopened objects for probes

* stapdyn/stapdyn.cxx (instrument_uprobe_target): New, factored out the
  code to write all the probes from one target to one object.
  (instrument_uprobes): Use instrument_uprobe_target for each.
  (dynamic_library_callback): New, identify if a new object is a target,
  and call instrument_uprobe_target if so.
  (find_uprobes): Fill the vector as a parameter, and then return a
  success status directly instead of floating the exception.
  (main): Register the dynamic_library_callback for dlopens.

11 years agoAUTHORS bump
Frank Ch. Eigler [Fri, 5 Oct 2012 23:38:54 +0000 (19:38 -0400)]
AUTHORS bump

11 years agostapdyn: implement more of dyninst/context.stp
Josh Stone [Fri, 5 Oct 2012 21:28:26 +0000 (14:28 -0700)]
stapdyn: implement more of dyninst/context.stp

Added cpu(), registers_valid(), uaddr(), and addr().

11 years agostapdyn: move the dumb lock inside c->busy checks
Josh Stone [Fri, 5 Oct 2012 20:45:51 +0000 (13:45 -0700)]
stapdyn: move the dumb lock inside c->busy checks

11 years agostapdyn: Give better -c example in NEWS
Josh Stone [Fri, 5 Oct 2012 18:30:09 +0000 (11:30 -0700)]
stapdyn: Give better -c example in NEWS

... better in that it doesn't show Dyninst breaking exceptions.
https://lists.cs.wisc.edu/archive/dyninst-api/2012/msg00096.shtml

11 years agoNEWS for stapdyn : kinda mention that -x is not yet actually supported for 2.0
Serguei Makarov [Fri, 5 Oct 2012 18:11:56 +0000 (14:11 -0400)]
NEWS for stapdyn : kinda mention that -x is not yet actually supported for 2.0

11 years agoPut the 'stapdyn_big_dumb_lock' back.
David Smith [Fri, 5 Oct 2012 18:15:17 +0000 (13:15 -0500)]
Put the 'stapdyn_big_dumb_lock' back.

* runtime/dyninst/runtime.h: Put the 'stapdyn_big_dumb_lock' back until
  the print buffers are properly multithreaded.

11 years ago(PR14637 partial fix) Improve stapdyn locking.
David Smith [Fri, 5 Oct 2012 17:52:43 +0000 (12:52 -0500)]
(PR14637 partial fix) Improve stapdyn locking.

* runtime/dyninst/runtime.h: Remove the 'stapdyn_big_dumb_lock' and make
  preempt_disable() and preempt_enable_no_resched() do nothing for
  dyninst.
* runtime/dyninst/tls_data.c: Change the mutex in tls_data_container_t to
  a rwlock.
  (_stp_tls_free_per_thread_ptr): Write lock the container before remove
  the object from the list (and reduce the amount of time the container is
  locked).
  (_stp_tls_get_per_thread_ptr): Write lock the container before adding
  the object from the list (and reduce the amount of time the container is
  locked).
* runtime/map.c (_stp_pmap_agg): Be sure to unlock the map in error
  conditions.
* runtime/pmap-gen.c (KEYSYM(_stp_pmap_get)): Be sure to unlock the
  container in an error condition.

11 years agodocumentation: mention .maxactive(NNN) / -DKRETACTIVE=NNN for .return probes
Frank Ch. Eigler [Fri, 5 Oct 2012 16:25:21 +0000 (12:25 -0400)]
documentation: mention .maxactive(NNN) / -DKRETACTIVE=NNN for .return probes

11 years agotapset: tweak function::tokenize man page to refer to "" rather than NULL
Frank Ch. Eigler [Fri, 5 Oct 2012 14:57:40 +0000 (10:57 -0400)]
tapset: tweak function::tokenize man page to refer to "" rather than NULL

11 years agoPR14573 (partial): Pass some registers into stapdyn
Josh Stone [Fri, 5 Oct 2012 02:04:14 +0000 (19:04 -0700)]
PR14573 (partial): Pass some registers into stapdyn

There doesn't seem to be a way to create and pass the pt_regs structure
from the Dyninst API, but we can still get most registers.  This patch
adds a new enter_dyninst_uprobe_regs() to receive registers and fill
them into a pt_regs from there.

XXX Dyninst is currently limited in how many individual function
arguments it can pass, so for now I'm cutting it down to the first 8.

* runtime/dyninst/stapdyn.h: Declare enter_dyninst_uprobe_regs.
* runtime/dyninst/uprobes.c: Implement it, filling all dwarf registers
  into a local struct pt_regs.
* runtime/dyninst/regs.c: Include regs.h to get SET_REG_IP.
* stapdyn/stapdyn.cxx (get_dwarf_registers): Create BPatch_snippets for
  as many of the DWARF registers as possible (bug-limited to 8).
  (instrument_uprobes): Look for the new entry function and use it.

11 years agostapdyn: Add a copy of the kernel's clamp_t
Josh Stone [Thu, 4 Oct 2012 23:42:26 +0000 (16:42 -0700)]
stapdyn: Add a copy of the kernel's clamp_t

This is used in a number of places for bounds checking.

11 years agostapdyn: #define simple_strtol strtol
Josh Stone [Thu, 4 Oct 2012 23:41:02 +0000 (16:41 -0700)]
stapdyn: #define simple_strtol strtol

... needed for tapset/string.stp:strtol()

11 years agoPR14179: Split up loc2c-runtime.h for linux|dyninst
Josh Stone [Thu, 4 Oct 2012 23:19:10 +0000 (16:19 -0700)]
PR14179: Split up loc2c-runtime.h for linux|dyninst

* runtime/loc2c-runtime.h: Remove deref functions and special register
  handling from this shared base, and rename k_dwarf_register_N to
  pt_dwarf_register_N to be more neutral.
* runtime/linux/loc2c-runtime.h: Move the deref functions and special
  register handling here.  Nothing new, just transplanted.
* runtime/dyninst/loc2c-runtime.h: Add deref and register functions.
* runtime/dyninst/copy.c (__copy_from_user, __copy_to_user): Move from
  linux_def.h, since these are custom implementations, not kernel copies.
  (_stp_strncpy_from_user, _stp_copy_from_user): New implementations.

11 years agoUse uread() in __STP_GET_USER
Josh Stone [Thu, 4 Oct 2012 23:03:23 +0000 (16:03 -0700)]
Use uread() in __STP_GET_USER

With uread, splitting 64-bit is already handled for ix86/arm, so we
don't have to repeat that code in user_int64().

11 years agoNEWS entry for PR11659 (being definitely noteworthy for 2.0)
Serguei Makarov [Thu, 4 Oct 2012 18:58:45 +0000 (14:58 -0400)]
NEWS entry for PR11659 (being definitely noteworthy for 2.0)

For the other plausible 2.0 news entries, going to wait a bit
for confirmation of noteworthiness.

11 years agoMark some tests as KFAIL.
Dave Brolley [Thu, 4 Oct 2012 16:56:30 +0000 (12:56 -0400)]
Mark some tests as KFAIL.

11 years agoCorrect the expected output of some tests.
Dave Brolley [Thu, 4 Oct 2012 16:56:08 +0000 (12:56 -0400)]
Correct the expected output of some tests.

11 years agoReport details of child exits due to signals
Josh Stone [Wed, 3 Oct 2012 20:55:37 +0000 (13:55 -0700)]
Report details of child exits due to signals

Our stap_waitpid reports signals as 128+n (like most shells).  We can
use that to recover the signal number and print strsignal too.

* util.cxx (stap_system): Split the exit notice for signals.
* remote.cxx (direct::finish): Ditto.

11 years agostapdyn: nullify the pagefault machinations for derefs
Josh Stone [Wed, 3 Oct 2012 19:59:15 +0000 (12:59 -0700)]
stapdyn: nullify the pagefault machinations for derefs

We don't need to care about pagefault safety in userspace, but the
definitions making those into preempt_disable led to recursing on
stapdyn_big_dumb_lock (going away in PR14571).  We can just #define
the pagefault_enable/disable away for the dyninst runtime.

11 years agolicense: change smileytap.svg's embedded license to GPLv2 + EPL1.0
Frank Ch. Eigler [Wed, 3 Oct 2012 19:17:47 +0000 (15:17 -0400)]
license: change smileytap.svg's embedded license to GPLv2 + EPL1.0

(This file is not actually packaged in systemtap RPMs.)

11 years agoPR13814: Note the relevant kernel commits, and allow >=3.4
Josh Stone [Wed, 3 Oct 2012 17:56:42 +0000 (10:56 -0700)]
PR13814: Note the relevant kernel commits, and allow >=3.4

11 years agocleanup -- proper version check for daddr_to_string() deprecation
Serguei Makarov [Wed, 3 Oct 2012 17:37:36 +0000 (13:37 -0400)]
cleanup -- proper version check for daddr_to_string() deprecation

11 years agoPR6580: properly-properly non-deprecate print_stack() et al.
Serguei Makarov [Wed, 3 Oct 2012 17:31:15 +0000 (13:31 -0400)]
PR6580: properly-properly non-deprecate print_stack() et al.

After consultation, the previous patch is probably a bit hasty.

11 years agoPR6580: properly deprecate print_stack() et al
Serguei Makarov [Wed, 3 Oct 2012 16:04:13 +0000 (12:04 -0400)]
PR6580: properly deprecate print_stack() et al

11 years agoPR13814: presume PR13193-override for kernel >3.4
Frank Ch. Eigler [Wed, 3 Oct 2012 00:55:10 +0000 (20:55 -0400)]
PR13814: presume PR13193-override for kernel >3.4

https://lkml.org/lkml/2012/3/5/124 fixed a kprobes bug, so we don't
have to pessimize kprobes on kernels that include that patch.

* staprun/staprun.c (disable_kprobes_optimization):
  Don't, on uname -r > 3.4.

11 years ago(PR14571 partial fix) Add dyninst pmap stat fixes.
David Smith [Tue, 2 Oct 2012 21:27:55 +0000 (16:27 -0500)]
(PR14571 partial fix) Add dyninst pmap stat fixes.

* runtime/pmap-gen.c (KEYSYM(_stp_pmap_tls_object_init)): Initialize the
  histogram parameters, in case this pmap contains a histogram.
  (KEYSYM(_stp_pmap_new)): For dyninst, override the tls data object init
  function.

11 years agoNEWS entry for %( systemtap_privilege %? ...
Serguei Makarov [Tue, 2 Oct 2012 20:32:52 +0000 (16:32 -0400)]
NEWS entry for %( systemtap_privilege %? ...

11 years agoPR13693 groundwork: basic testcase for %( systemtap_privilege
Serguei Makarov [Tue, 2 Oct 2012 20:29:18 +0000 (16:29 -0400)]
PR13693 groundwork: basic testcase for %( systemtap_privilege

11 years agoBug 860750 - stapusr user not able to run modules compiled and signed by the server
Dave Brolley [Tue, 2 Oct 2012 19:39:09 +0000 (15:39 -0400)]
Bug 860750 - stapusr user not able to run modules compiled and signed by the server

- When #ifndef HAVE_ELF_GETSHDRSTRNDX is true, then there is insufficient
  ELF support to examine a signed systemtap module in order to determine the
  privilege credentials required to run it. In this case, staprun should behave
  like an older, multi-privilege-level-unaware, staprun and load the module for
  stapusr and above. Since we know that it has been correctly signed, the module
  is either an old dual-privilege module compiled fopr stapusr (ok), or it is
  a new multi-privilege-enabled module compiled for stapusr or stapsys. In this
  case, the module's internal self check will determine whether the user actually has
  the required credentials. The module will abort if the user does not have the
  required credentials.

- Small bug in translating the user's privilege credential mask to a string.

11 years agoEnsure that all err() messages end in a newline.
Dave Brolley [Wed, 26 Sep 2012 19:49:32 +0000 (15:49 -0400)]
Ensure that all err() messages end in a newline.

11 years agostapdyn: Make sure dyninst probes have a pt_regs
Josh Stone [Tue, 2 Oct 2012 19:00:39 +0000 (12:00 -0700)]
stapdyn: Make sure dyninst probes have a pt_regs

loc2c-generated code assumes pt_regs are available, so use a dummy
struct to make sure we always have *something* for it to dereference.

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