]> sourceware.org Git - systemtap.git/log
systemtap.git
12 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.

12 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.

12 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.

12 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

12 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.

12 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.

12 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

12 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

12 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

12 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.

12 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

12 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.

12 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.

12 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

12 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>
12 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.

12 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)

12 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!

12 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).

12 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.

12 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 .

12 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

12 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

12 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

12 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.

12 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.

12 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.

12 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.

12 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.

12 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

12 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.

12 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

12 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.

12 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

12 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

12 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

12 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.

12 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

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

12 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

12 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

12 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.

12 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.

12 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...

12 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.

12 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.

12 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;.

12 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

12 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

12 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...

12 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.

12 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.

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

12 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().

12 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

12 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

12 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

12 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.

12 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.

12 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

12 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

12 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.

12 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.

12 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()

12 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.

12 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().

12 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.

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

12 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.

12 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.

12 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.

12 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.)

12 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

12 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

12 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.

12 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

12 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.

12 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.

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

12 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

12 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.

12 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.

12 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.

12 years agostapdyn: Fork output from stdout/stderr
Josh Stone [Tue, 2 Oct 2012 18:23:48 +0000 (11:23 -0700)]
stapdyn: Fork output from stdout/stderr

We're still using the target's stdio (PR14491), but we're now using
separate FILE handles to do it, so we're not affected by the target
closing its own stdout early.

* runtime/dyninst/io.c (_stp_out, _stp_err): Private FILE handles.
  (_stp_clone_file): Clone a FILE handle, also setting FD_CLOEXEC.
  (_stp_warn, _stp_error, _stp_softerror, _stp_dbug): Use _stp_err.
* runtime/dyninst/print.c )_stp_print_flush): Use _stp_err and _stp_out.
* runtime/dyninst/runtime.h (stp_dyninst_ctor): Clone stderr and stdout.
  (stp_dyninst_dtor): Close _stp_err and _stp_out.

12 years agostapdyn: Don't silence pass-4 gcc errors
Josh Stone [Tue, 2 Oct 2012 17:55:26 +0000 (10:55 -0700)]
stapdyn: Don't silence pass-4 gcc errors

* buildrun.cxx (compile_dyninst): Just as compile_pass() always shows
  error output from Kbuild, we should always show gcc errors from
  compiling dyninst modules too.

12 years agostapdyn: Use FD_CLOEXEC on _stp_mem_fd instead of O_CLOEXEC
Josh Stone [Tue, 2 Oct 2012 17:55:19 +0000 (10:55 -0700)]
stapdyn: Use FD_CLOEXEC on _stp_mem_fd instead of O_CLOEXEC

O_CLOEXEC is only available since Linux 2.6.23, which is fairly old, but
we may still care to run on such systems.  Using fcntl FD_CLOEXEC can
accomplish the same thing, and we don't need to worry about the race of
other threads calling exec at the same time as our module load, because
the whole process will be frozen.

12 years agoFix stap.1 typo in aggregate example.
David Smith [Tue, 2 Oct 2012 18:33:51 +0000 (13:33 -0500)]
Fix stap.1 typo in aggregate example.

12 years agoPR11424: remove obsolete nodwf tests, now that nodwf works better
Frank Ch. Eigler [Tue, 2 Oct 2012 16:02:06 +0000 (12:02 -0400)]
PR11424: remove obsolete nodwf tests, now that nodwf works better

12 years agoPR14650: combine more userspace-deref functions
Frank Ch. Eigler [Tue, 2 Oct 2012 13:53:54 +0000 (09:53 -0400)]
PR14650: combine more userspace-deref functions

* runtime/linux/copy.c: Move out _stp_read_address definition.
  (__stp_strncpy_from_user): Simply accept vicarious protection
  from caller _stp_strncpy_from_user.
  (_stp_copy_from_user): Protect more.
* runtime/stp_string.c (_stp_text_str): Use _stp_read_address
  instead of barenaked __stp_get_user.
* runtime/stp_string.h (__stp_get_user): Simplify; now only for
  use by ...
  (_stp_read_address): Moved here.

12 years agotestsuite: make sure conversions.exp test cases don't fail due to MAXSKIPPED
Frank Ch. Eigler [Tue, 2 Oct 2012 13:53:24 +0000 (09:53 -0400)]
testsuite: make sure conversions.exp test cases don't fail due to MAXSKIPPED

12 years ago(PR14574 partial fix) Make the systemtap.maps/*.exp tests use dyninst also.
David Smith [Tue, 2 Oct 2012 15:04:05 +0000 (10:04 -0500)]
(PR14574 partial fix) Make the systemtap.maps/*.exp tests use dyninst also.

* testsuite/systemtap.maps/absentstats.exp: Added dyninst testing.
* testsuite/systemtap.maps/elision.exp: Ditto.
* testsuite/systemtap.maps/exists.exp: Ditto.
* testsuite/systemtap.maps/foreach_fail.exp: Ditto.
* testsuite/systemtap.maps/foreach_limit.exp: Ditto.
* testsuite/systemtap.maps/foreach_limit2.exp: Ditto.
* testsuite/systemtap.maps/hist_in_string.exp: Ditto.
* testsuite/systemtap.maps/ii.exp: Ditto.
* testsuite/systemtap.maps/iiiiii.exp: Ditto.
* testsuite/systemtap.maps/is.exp: Ditto.
* testsuite/systemtap.maps/ix.exp: Ditto.
* testsuite/systemtap.maps/ix_clear.exp: Ditto.
* testsuite/systemtap.maps/ix_clear2.exp: Ditto.
* testsuite/systemtap.maps/ix_clear3.exp: Ditto.
* testsuite/systemtap.maps/ix_hist.exp: Ditto.
* testsuite/systemtap.maps/linear.exp: Ditto.
* testsuite/systemtap.maps/linear_0.exp: Ditto.
* testsuite/systemtap.maps/linear_bad.exp: Ditto.
* testsuite/systemtap.maps/linear_empty.exp: Ditto.
* testsuite/systemtap.maps/linear_large.exp: Ditto.
* testsuite/systemtap.maps/linear_large_neg.exp: Ditto.
* testsuite/systemtap.maps/linear_nearlyempty.exp: Ditto.
* testsuite/systemtap.maps/linear_neg.exp: Ditto.
* testsuite/systemtap.maps/linear_over.exp: Ditto.
* testsuite/systemtap.maps/linear_overunder.exp: Ditto.
* testsuite/systemtap.maps/linear_under.exp: Ditto.
* testsuite/systemtap.maps/log.exp: Ditto.
* testsuite/systemtap.maps/log_edge.exp: Ditto.
* testsuite/systemtap.maps/map_hash.exp: Ditto.
* testsuite/systemtap.maps/map_wrap.exp: Ditto.
* testsuite/systemtap.pass1-4/debugtypes.exp: Ditto.

12 years agoNEWS entry for PR13693
Serguei Makarov [Tue, 2 Oct 2012 14:57:42 +0000 (10:57 -0400)]
NEWS entry for PR13693

12 years agoNEWS entry for PR6580
Serguei Makarov [Tue, 2 Oct 2012 14:48:20 +0000 (10:48 -0400)]
NEWS entry for PR6580

12 years ago(PR14571 partial fix) Correctly handle maps with limited entries.
David Smith [Tue, 2 Oct 2012 14:56:42 +0000 (09:56 -0500)]
(PR14571 partial fix) Correctly handle maps with limited entries.

* translate.cxx (mapvar::init): Remove hardcoded 'wrap' initialization and
  let _stp_map_new() initialize 'wrap'.
* runtime/map.c (_stp_map_init): Set new 'wrap' parameter in map itself.
  (_stp_map_new): Pass new 'wrap' parameter down to _stp_map_init().
  (_stp_map_tls_object_init): Pass cached 'wrap' field to _stp_map_init().
  (_stp_pmap_new): Pass new 'wrap' parameter down to _stp_map_init().
* runtime/map.h: Update function prototypes with new 'wrap' parameter.
* runtime/map-gen.c (KEYSYM(_stp_map_new)): Pass new 'wrap' parameter down
  to the correct _stp_map_new* function.
* runtime/pmap-gen.c (KEYSYM(_stp_pmap_new)): Pass new 'wrap' parameter
  down to the correct _stp_pmap_new* function
* runtime/map-stat.c (_stp_map_new_hstat_log): Pass new 'wrap' parameter
  down to _stp_map_new().
  (_stp_map_new_hstat_linear): Ditto.
  (_stp_pmap_new_hstat_linear): Ditto.
  (_stp_pmap_new_hstat_log): Ditto.

12 years agoPR14555, replace kernel symbol "_stext" by a macro in runtime/k_syms.h
Alexander Lochmann [Mon, 1 Oct 2012 22:42:15 +0000 (18:42 -0400)]
PR14555, replace kernel symbol "_stext" by a macro in runtime/k_syms.h

The macro is used by the runtime as well as the compilation
components. It is not guaranteed that this symbol is always called
"_stext" on all archtitectures. On powerpc64 for example its name is
".__start". Stap will not run on other architectures where this symbol
has a different name because the lookup for "_stext" will fail.

Adjusted by <fche> to leave _stext as the relocation pseudo-section
name as used by relocation basis code, and parametrizing only
symbol names.

12 years agostap.1 - get rid of inevitably-outdated list of unprivileged functions
Serguei Makarov [Mon, 1 Oct 2012 21:12:03 +0000 (17:12 -0400)]
stap.1 - get rid of inevitably-outdated list of unprivileged functions

12 years agostap.1 - document myproc-unprivileged PR6580 tapset functions
Serguei Makarov [Mon, 1 Oct 2012 19:06:22 +0000 (15:06 -0400)]
stap.1 - document myproc-unprivileged PR6580 tapset functions

12 years agoPR6580: transition to new print_syms() functions
Serguei Makarov [Mon, 1 Oct 2012 18:14:44 +0000 (14:14 -0400)]
PR6580: transition to new print_syms() functions

12 years agoPR6580: more descriptive names for psyms() et al.
Serguei Makarov [Mon, 1 Oct 2012 15:01:34 +0000 (11:01 -0400)]
PR6580: more descriptive names for psyms() et al.

12 years agoFix the return value of get_self_path()
Josh Stone [Mon, 1 Oct 2012 05:26:43 +0000 (22:26 -0700)]
Fix the return value of get_self_path()

The 'buf' only has a good value if readlink succeeded, but the 'file'
also still points to the fallback original value on failure.

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