]> sourceware.org Git - systemtap.git/log
systemtap.git
8 years agoImprove tracepoint support.
David Smith [Tue, 22 Dec 2015 21:26:07 +0000 (15:26 -0600)]
Improve tracepoint support.

* tapsets.cxx (tracepoint_extra_decls): Update the extra declarations
  needed to find the tracepoints.

8 years agoPR19216 fix: Do some code renaming.
David Smith [Mon, 21 Dec 2015 17:25:41 +0000 (11:25 -0600)]
PR19216 fix: Do some code renaming.

* runtime/linux/kprobes.c: Rename 'stap_dwarf_kprobe' to 'stap_kprobe' and
  'stap_dwarf_probe' to 'stap_kprobe_probe', since those structures aren't
  just related to dwarf-based kprobes anymore.
* tapsets.cxx: Ditto.

8 years agoFix PR19216 by merging the dwarf and non-dwarf kprobe support code.
David Smith [Mon, 21 Dec 2015 15:30:38 +0000 (09:30 -0600)]
Fix PR19216 by merging the dwarf and non-dwarf kprobe support code.

* tapsets.cxx: Move common kprobe code to the new
  'generic_kprobe_derived_probe' class and make the 'dwarf_derived_probe'
  and 'kprobe_derived_probe' classes derive from it. Replace the
  'dwarf_derived_probe_group' and 'kprobe_derived_probe_group' classes with
  the 'generic_kprobe_derived_probe_group' class.
* session.cxx (systemtap_session): Replaced the 'dwarf_derived_probes' and
  'kprobe_derived_probes' probe groups with the
  'generic_kprobe_derived_probes' probe group.
* session.h: Ditto.
* runtime/linux/kprobes.c (stapkp_prepare_kprobe): Set up the kprobe
  'symbol_name' field.
  (stapkp_prepare_kretprobe): Ditto.
  (stapkp_symbol_callback): Handle symbol_name+offset probes in the kernel
  and modules.
  (stapkp_init): Handle NULL and empty module names.
* testsuite/systemtap.base/modules_out_of_tree.exp: Add dwarfless probing
  tests and relative path tests.

8 years agoRemove extranious line from the generated label.c file for label.exp test
William Cohen [Thu, 17 Dec 2015 21:54:54 +0000 (16:54 -0500)]
Remove extranious line from the generated label.c file for label.exp test

The additional line added by commit 2d703227f41f6625f6041b1354010cf1530099ae
was messing up the matching.  Removed the beginning blank line so that the
line number matched up again.

8 years agoUtilize new probe point expansion.
Felix Lu [Thu, 17 Dec 2015 20:53:11 +0000 (15:53 -0500)]
Utilize new probe point expansion.

Selected sample scripts now use the brace expansion feature to
simplify the probe point specification.

8 years agoPR16672: Support brace expansion for probe points
Felix Lu [Tue, 15 Dec 2015 15:34:14 +0000 (10:34 -0500)]
PR16672: Support brace expansion for probe points

parse_probe_point() modified to parse the entire alias or
location list instead of one at a time. The expansion of
curly braces is done during parsing.

* NEWS: short blurb
* doc/langref.tex: documentation
* man/stapprobes.3stap: documentation
* parse.cxx: parse_probe_point() renamed to parse_probe_points(),
  new functions parse_component() and parse_components() used for
  parsing subsections of probe point.
* testsuite/*: test it

8 years agoIncrease bz1027459.exp timeout to allow slow machines to test this.
William Cohen [Thu, 17 Dec 2015 21:16:22 +0000 (16:16 -0500)]
Increase bz1027459.exp timeout to allow slow machines to test this.

8 years agostapdyn: use the simpler DYNINST_9_1 macro for callback changes
Josh Stone [Tue, 15 Dec 2015 20:26:37 +0000 (12:26 -0800)]
stapdyn: use the simpler DYNINST_9_1 macro for callback changes

8 years agoman error::pass2: mention prologue-searching for unavailable $context
Frank Ch. Eigler [Tue, 15 Dec 2015 02:56:24 +0000 (21:56 -0500)]
man error::pass2: mention prologue-searching for unavailable $context

8 years agoPR19362: fix doubled locations in probe copy-ctor
Josh Stone [Mon, 14 Dec 2015 22:00:01 +0000 (14:00 -0800)]
PR19362: fix doubled locations in probe copy-ctor

Commit 1341a03cc550835d5ddab35bb9333e43bd623714 moved most of the body
of the probe::probe copy constructor to its initializer list.  However,
the push to locations was accidentally left, so this vector was both
initialized and appended, doubling all probes from here.  This showed up
in library.exp SDT probes which counted twice too many matches.

8 years agounwind diagnostic improvements
Frank Ch. Eigler [Sat, 12 Dec 2015 16:01:02 +0000 (11:01 -0500)]
unwind diagnostic improvements

Add a heuristic for missing kernel unwindsyms to the runtime.
Tweak documentation to spell out --ldd is for userspace only.

Reported by: Nikolay Borisov <n.borisov@siteground.com>

8 years agoEnsure use of the function argument values from function entry in lwtools
William Cohen [Fri, 11 Dec 2015 20:49:40 +0000 (15:49 -0500)]
Ensure use of the function argument values from function entry in lwtools

On some machine such as powerpc64 and aarch64 function arguments are
passed using processor registers.  The compiler is free to use those
registers how it sees fit. Thus, the register value on function return
may differ from the original argument value on function entry.  To
ensure using the value from function entry the scripts use the
@entry() in the return probes.

8 years agoFix PR19358 by updating netfilter support for 4.4 kernels.
David Smith [Fri, 11 Dec 2015 20:45:45 +0000 (14:45 -0600)]
Fix PR19358 by updating netfilter support for 4.4 kernels.

* tapset-netfilter.cxx (emit_module_decls): Handle kernel v4.4 netfilter
  changes.
* runtime/linux/autoconf-netfilter-4_4.c: New autoconf test to test for
  kernel v4.4 netfilter changes.
* buildrun.cxx (compile_pass): Add new autoconf test.

8 years agostapdyn: prepare for the dyninst 9.1 library callback change
Josh Stone [Fri, 11 Dec 2015 03:17:56 +0000 (19:17 -0800)]
stapdyn: prepare for the dyninst 9.1 library callback change

The new API uses BPatch_object for the callback, because modules (~=CUs)
are now fully represented in shared objects too.  This is better, but we
need to keep fallback code for the old API too, using module->getObject().

8 years agostapdyn: re-poll dyninst directly before sleeping
Josh Stone [Fri, 11 Dec 2015 03:13:51 +0000 (19:13 -0800)]
stapdyn: re-poll dyninst directly before sleeping

The poll fd comes from proccontrol, but sometimes dyninstAPI pulls events
into its own queue without handling them yet.  If we then sleep in syscall
ppoll, we won't hear about those events until we hit the timeout.  We can
do a quick dyninst poll first to clear those out.

8 years agoFix typos in tapset/linux/arm/nd_syscalls.stp.
David Smith [Thu, 10 Dec 2015 18:58:39 +0000 (12:58 -0600)]
Fix typos in tapset/linux/arm/nd_syscalls.stp.

8 years agoAdd some support for older arm kernels.
Torsten Polle [Thu, 10 Dec 2015 18:56:29 +0000 (12:56 -0600)]
Add some support for older arm kernels.

* tapset/linux/arm/aux_syscalls.stp: Add support for arm kernels less than
  3.7.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/arm/syscalls.stp: Add support for [nd_]syscall.execve for
  arm kernels less than 3.7.
* tapset/linux/arm/nd_syscalls.stp: Ditto.

8 years agoMake 2 small syscall testsuite changes for arm.
David Smith [Thu, 10 Dec 2015 15:06:33 +0000 (09:06 -0600)]
Make 2 small syscall testsuite changes for arm.

* testsuite/systemtap.syscall/stat.c: Mark fstatat64 as covered.
* testsuite/systemtap.syscall/coverage.tcl: Add a few modifications for
  arm-based systems.

8 years agoAdd more arithmetic and map delete test cases.
Zhou Wenjian [Wed, 9 Dec 2015 21:38:52 +0000 (15:38 -0600)]
Add more arithmetic and map delete test cases.

* testsuite/systemtap.base/arith.stp: Add more cases.
* testsuite/systemtap.maps/ii.stp: Ditto.
* testsuite/systemtap.maps/ii.exp: Update for new test case.

8 years agoWorkaround PR19345 by not running the functioncallcount example on s390x.
David Smith [Wed, 9 Dec 2015 15:16:24 +0000 (09:16 -0600)]
Workaround PR19345 by not running the functioncallcount example on s390x.

* testsuite/systemtap.examples/profiling/functioncallcount.tcl: Don't run
  the functioncallcount example on s390x kernels less than 3.11.

8 years agostap-server coverity fix: check stat(2) rc
Frank Ch. Eigler [Tue, 8 Dec 2015 21:49:10 +0000 (16:49 -0500)]
stap-server coverity fix: check stat(2) rc

It's proper, so let's.

8 years agosystemtap.spec: disable py_auto_byte_compile:/usr/lib/rpm/brp-python-bytecompile
Frank Ch. Eigler [Tue, 8 Dec 2015 21:32:05 +0000 (16:32 -0500)]
systemtap.spec: disable py_auto_byte_compile:/usr/lib/rpm/brp-python-bytecompile

Failing python bytecompiles needlessly concern rpmdiff sometimes.

8 years agostap docs: syscalls.xml table to use simpler colwidth
Frank Ch. Eigler [Tue, 8 Dec 2015 20:25:42 +0000 (15:25 -0500)]
stap docs: syscalls.xml table to use simpler colwidth

Apparently some versions of xmlto / pdflatex or whatever choke on
the docbook-xml  colwidth="1*"  construct, so we use linear distances.

8 years agoRewrite and add type mismatch 'semko' tests.
Zhou Wenjian [Tue, 8 Dec 2015 19:18:55 +0000 (13:18 -0600)]
Rewrite and add type mismatch 'semko' tests.

* testsuite/semko/typemismatch.stp: Deleted. Replace by
  typemismatch[123].stp.
* testsuite/semko/typemismatch1.stp: New test case.
* testsuite/semko/typemismatch2.stp: Ditto.
* testsuite/semko/typemismatch3.stp: Ditto.
* testsuite/semko/typemismatch4.stp: Ditto.

8 years agosystemtap.spec: define empty dracut macro => %{nil}
Frank Ch. Eigler [Tue, 8 Dec 2015 16:20:51 +0000 (11:20 -0500)]
systemtap.spec: define empty dracut macro => %{nil}

RPM likes to have -some- macro body.

8 years agoi18n update
Frank Ch. Eigler [Tue, 8 Dec 2015 14:11:23 +0000 (09:11 -0500)]
i18n update

8 years agoAdd RHEL7.2 fixes for PR18889 so that we can probe module initializers.
David Smith [Fri, 4 Dec 2015 20:23:17 +0000 (14:23 -0600)]
Add RHEL7.2 fixes for PR18889 so that we can probe module initializers.

* runtime/linux/kprobes.c (stapkp_prepare_kprobe): If we have
  kallsyms_on_each_symbol(), just return if we don't have an address.
  (stapkp_prepare_kretprobe): Ditto.
  (stapkp_symbol_callback): New callback function for
  kallsyms_on_each_symbol() to convert symbol_name+offset probes into
  address probes. This works around a kernel bug and should be faster as
  well.
  (stapkp_init): Call kallsyms_on_each_symbol() when needed.
  (stapkp_refresh): Ditto.
* runtime/transport/symbols.c (_stp_module_notifier): Change to the new
  module refresh logic if the kernel version is 3.10 or higher.
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Ditto.
* testsuite/systemtap.base/kmodule.exp: Only run the subtests that load
  the test kernel module after the systemtap module is loaded on systems
  that support module refreshes.

8 years agoAdd vim syntax highlight for new private keyword
Felix Lu [Fri, 4 Dec 2015 15:59:36 +0000 (10:59 -0500)]
Add vim syntax highlight for new private keyword

8 years agoAdd a comment about perf probes .hz field.
Felix Lu [Fri, 4 Dec 2015 15:18:37 +0000 (10:18 -0500)]
Add a comment about perf probes .hz field.

8 years agoAdd testcase for function definitions.
Zhou Wenjian [Fri, 4 Dec 2015 13:41:55 +0000 (07:41 -0600)]
Add testcase for function definitions.

* testsuite/systemtap.base/func_definition.exp: New test case.
* testsuite/systemtap.base/func_definition.stp: New test file.

8 years agoPR13820: timer.profile(NNN) variant using perf probes
Felix Lu [Wed, 2 Dec 2015 19:55:11 +0000 (14:55 -0500)]
PR13820: timer.profile(NNN) variant using perf probes

Add a probe point for profiling at given frequency.
The rate is only accurate up to 100 hertz since it is
implemented as an alias to perf probes.

* tapset-perfmon.cxx: new .hz(N) component
* tapset/timers.stp: timer.profile.freq alias for pattern matching

8 years agoUse main ELF file path if there is no separate debugfile in error messages.
Mark Wielaard [Tue, 1 Dec 2015 14:28:08 +0000 (15:28 +0100)]
Use main ELF file path if there is no separate debugfile in error messages.

* dwflpp.cxx (dwflpp::die_location_as_string): Use main ELF file if there
  is no debugfile to show the file path that the DIE came from.

8 years agoAdd more test cases to testsuite/systemtap.base/timers.exp.
Zhou Wenjian [Mon, 30 Nov 2015 22:44:16 +0000 (16:44 -0600)]
Add more test cases to testsuite/systemtap.base/timers.exp.

* testsuite/systemtap.base/timers.exp: update for new test cases
* testsuite/systemtap.base/timers.stp: add more test cases

8 years agoAdd testcase for "break" and "continue".
Zhou Wenjian [Mon, 30 Nov 2015 22:27:41 +0000 (16:27 -0600)]
Add testcase for "break" and "continue".

* testsuite/systemtap.base/break_and_continue.exp: New test case
* testsuite/systemtap.base/break_and_continue.stp: New test file

8 years agoFixed permissions on new parseko/semko tests.
David Smith [Mon, 30 Nov 2015 22:26:19 +0000 (16:26 -0600)]
Fixed permissions on new parseko/semko tests.

8 years agoperf tapset: add recent uapi/linux/perf_event.h bits
Frank Ch. Eigler [Mon, 30 Nov 2015 21:46:24 +0000 (16:46 -0500)]
perf tapset: add recent uapi/linux/perf_event.h bits

The perf_event_attr uapi has grown a few more predefined
event aliases.

8 years agoAdd 2 parse testcases.
Zhou Wenjian [Mon, 30 Nov 2015 21:36:17 +0000 (15:36 -0600)]
Add 2 parse testcases.

* testsuite/parseko/var_definition1.stp: New test case
* testsuite/parseko/var_definition2.stp: New test case

8 years agoAdd 'semko' testcase for timer probe.
Zhou Wenjian [Mon, 30 Nov 2015 21:25:42 +0000 (15:25 -0600)]
Add 'semko' testcase for timer probe.

* testsuite/semko/timer_hz_randomize.stp: New test case.

8 years agoFix BZ1285348 by updating systemtap's memory flag usage.
Jesper Brouer [Mon, 30 Nov 2015 17:24:29 +0000 (11:24 -0600)]
Fix BZ1285348 by updating systemtap's memory flag usage.

* runtime/linux/runtime_defines.h: Make sure __GFP_WAIT is defined.
* runtime/stp_utrace.c (utrace_task_alloc): Change GFP_IOFS to
  STP_ALLOC_FLAGS.
  (utrace_attach_task): Ditto.

8 years agostap.1: tweak foreach template text
Nan Xiao [Fri, 27 Nov 2015 02:33:37 +0000 (21:33 -0500)]
stap.1: tweak foreach template text

8 years agoAdd a nop_visitor, and use it for expression_is_functioncall
Josh Stone [Thu, 26 Nov 2015 00:31:09 +0000 (16:31 -0800)]
Add a nop_visitor, and use it for expression_is_functioncall

In expression_is_functioncall, it only cares if the immediate expression
is a functioncall, but the expression_visitor it was derived from would
fully traverse all other expressions.  All it really wanted was like a
visitor-patterned dynamic_cast.

The new nop_visitor better enables this.  It does nothing at all for any
node types, and then expression_is_functioncall can override just for the
functioncall it cares about.

(We haven't yet settled whether to prefer a visitor pattern like this,
or more direct virtual calls like expression::is_symbol, or just plain
dynamic_cast<>.  Try to avoid the need for downcasts if possible.)

8 years agoRemove functioncall::var_assigned_to_retval
Josh Stone [Wed, 25 Nov 2015 22:10:17 +0000 (14:10 -0800)]
Remove functioncall::var_assigned_to_retval

It's unusual to have a value specific to one visitor stored in the tree
node itself.  This particular value is only used by c_unparser.  Make it
a c_unparser member instead, saved and restored as necessary to allow
for nested calls.

8 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Josh Stone [Wed, 25 Nov 2015 01:26:03 +0000 (17:26 -0800)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

8 years agoPR18884 bonus: optimize tmps in more places
Josh Stone [Wed, 25 Nov 2015 01:23:25 +0000 (17:23 -0800)]
PR18884 bonus: optimize tmps in more places

Anywhere a tmpvar is subject to a single assignment, use the new
c_assign which can use an override with literal values.

8 years agoPR18884: skip tmps for any literal, not by tok->type
Josh Stone [Wed, 25 Nov 2015 01:12:35 +0000 (17:12 -0800)]
PR18884: skip tmps for any literal, not by tok->type

Some literal expressions get created dynamically, like const-folding an
expression of two literals.  Those will probably not have a tok->type
that looks like a literal, but they're still reasonable candidates to
skip temporary storage and output directly into C.

Add a new c_assign for any tmpvar=expression, which will check for
literals to override the tmp, or else assign them as normal.  Literals
are detected with a dynamic_cast of the expression, without looking at
the token at all.  In many places that were roughly doing this based on
tok->type, use the new c_assign to handle it automatically.

The new test transok/literal_tmp.stp compares the PR18884 examples,
asserting that they now have *exactly* the same generated code.

8 years agoRestrict optimization of literals in "%s\n" to streams only
Josh Stone [Tue, 24 Nov 2015 22:55:56 +0000 (14:55 -0800)]
Restrict optimization of literals in "%s\n" to streams only

This "use_print" optimization is only effective for printing to streams
with _stp_print().  Then a literal string argument to "%s\n" can just
have that literal token-pasted with the newline string.  But when
printing to strings, like sprintln, that optimization isn't actually
taken, so it was getting the newline twice.

Add new tests with sprint and sprintln on string literals, then clean up
the code that does the optimization -- for streams only.

8 years agotestsuite: swap dot.exp and sprint.exp
Josh Stone [Tue, 24 Nov 2015 22:36:02 +0000 (14:36 -0800)]
testsuite: swap dot.exp and sprint.exp

These two test drivers had swapped names for their respective .stp
files.  The contents are unchanged, just rename-swapped.

8 years agoEliminate the use of tex(nomencl.sty) in TeX documentation files
William Cohen [Tue, 24 Nov 2015 01:22:26 +0000 (20:22 -0500)]
Eliminate the use of tex(nomencl.sty) in TeX documentation files

RHEL 7 does not package the nomencl.sty file and having this style
file used in systemtap makes it difficult to build the documentation.
The only place it was being used was in the tutorial.tex and it was
not generating a useful glossary.  The glossary generation of
tutorial.tex has been disabled for the time being.

8 years agoparse: intern keywords
Josh Stone [Mon, 23 Nov 2015 22:47:55 +0000 (14:47 -0800)]
parse: intern keywords

8 years agoparse: check atwords without an explicit '@'
Josh Stone [Mon, 23 Nov 2015 22:38:52 +0000 (14:38 -0800)]
parse: check atwords without an explicit '@'

8 years agoparse: unorder keywords and atwords
Josh Stone [Mon, 23 Nov 2015 22:36:21 +0000 (14:36 -0800)]
parse: unorder keywords and atwords

8 years agoSupport backspace handling in monitor mode for probe toggling.
Felix Lu [Mon, 23 Nov 2015 20:07:51 +0000 (15:07 -0500)]
Support backspace handling in monitor mode for probe toggling.

8 years agoSwap argument order to check for bytes written.
Felix Lu [Mon, 23 Nov 2015 19:47:13 +0000 (14:47 -0500)]
Swap argument order to check for bytes written.

8 years agoFix monitor mode to be compatible with the private global feature.
Felix Lu [Mon, 23 Nov 2015 18:53:26 +0000 (13:53 -0500)]
Fix monitor mode to be compatible with the private global feature.

The synthetic functions and variables did not have a __global_
prefix, causing the symbol resolution to fail at finding them.
Commit 0c7e069fe82 assumes that there is a token for every probe
while two synthetic probes are generated in monitor mode with
null context. parse_synthetic_probe uses "<synthetic>" again
if no token is found for the probe. The __global_ prefix is shown
in monitor mode where global variables are shown so they needed
to be unmangled as done in commit 8f54215ef850c809.

* elaborate.cxx: above changes
* parse.cxx: fall back to "<synthetic>" if token is nullptr
* staprun/monitor.c: use return values of function calls
* staptree.cxx: check for token nullptr in functiondecl::printsig

8 years agoFix undeclared pipe2 problem.
Felix Lu [Mon, 23 Nov 2015 16:10:43 +0000 (11:10 -0500)]
Fix undeclared pipe2 problem.

Use pipe and fcntl instead.

8 years agotestsuite: allow pn to report *both* open and openat
Josh Stone [Fri, 20 Nov 2015 22:27:35 +0000 (14:27 -0800)]
testsuite: allow pn to report *both* open and openat

8 years agotestsuite: add a semicolon in perf.sh function poly()
Josh Stone [Fri, 20 Nov 2015 22:26:41 +0000 (14:26 -0800)]
testsuite: add a semicolon in perf.sh function poly()

8 years agoMerge branch 'funstuff'
Josh Stone [Fri, 20 Nov 2015 20:15:57 +0000 (12:15 -0800)]
Merge branch 'funstuff'

8 years agoFix undeclared F_SETPIPE_SZ error
Felix Lu [Fri, 20 Nov 2015 19:05:45 +0000 (14:05 -0500)]
Fix undeclared F_SETPIPE_SZ error

Removed usage for now. This may be needed later to ensure
pipe does not overflow.

8 years agoFixed PR19275 by updating stap_run.
David Smith [Fri, 20 Nov 2015 16:53:51 +0000 (10:53 -0600)]
Fixed PR19275 by updating stap_run.

* testsuite/lib/stap_run.exp: The stap_run() function now fails if it
  receives any unexpected output. The 'all_pass_string' was modified to be
  only one copy of "systemtap test success" instead of allowing of
  multiple copies.
* testsuite/systemtap.base/array_slicing.exp: Handle stap_run
  changes. Also, fixed the test names so that they aren't '$test_name'.
* testsuite/systemtap.base/at_var_tracepoint.exp: Update for stap_run
  changes.
* testsuite/systemtap.base/at_var_tracepoint.stp: Ditto.
* testsuite/systemtap.base/be_order.stp: Ditto.
* testsuite/systemtap.base/div0.exp: Ditto.
* testsuite/systemtap.base/error_fn.exp: Ditto.
* testsuite/systemtap.base/global_init.stp: Ditto.
* testsuite/systemtap.base/global_var_kernel.exp: Ditto.
* testsuite/systemtap.base/global_vars.stp: Ditto.
* testsuite/systemtap.base/if.exp: Ditto.
* testsuite/systemtap.base/if.stp: Ditto.
* testsuite/systemtap.base/kprobes.exp: Ditto.
* testsuite/systemtap.base/logical_and.stp: Ditto.
* testsuite/systemtap.base/maxactive.exp: Ditto.
* testsuite/systemtap.base/pp.exp: Ditto.
* testsuite/systemtap.base/print.exp: Ditto.
* testsuite/systemtap.base/proc_by_pid.exp: Ditto.
* testsuite/systemtap.base/process_by_pid.exp: Ditto.
* testsuite/systemtap.base/procfs_maxsize.exp: Ditto.
* testsuite/systemtap.base/procfs_umask.exp: Ditto.
* testsuite/systemtap.base/stmt_counting.exp: Ditto.
* testsuite/systemtap.base/stmt_counting_functions.stp: Ditto.
* testsuite/systemtap.base/stmt_counting_straight.stp: Ditto.
* testsuite/systemtap.base/timers.exp: Ditto.
* testsuite/systemtap.base/tri.stp: Ditto.
* testsuite/systemtap.context/context_ns.exp: Ditto.
* testsuite/systemtap.context/pid_ns.stp: Ditto.
* testsuite/systemtap.context/usymfileline.exp: Ditto.
* testsuite/systemtap.printf/memory1.exp: Ditto.
* testsuite/systemtap.stress/current.exp: Ditto.

8 years agoupdate NEWS
Felix Lu [Fri, 20 Nov 2015 15:23:57 +0000 (10:23 -0500)]
update NEWS

8 years agoupdate systemtap.spec
Felix Lu [Thu, 19 Nov 2015 16:36:02 +0000 (11:36 -0500)]
update systemtap.spec

Include build requirements for json-c and ncurses.

8 years agoPR18848: Add manual testing readme guide
Felix Lu [Thu, 19 Nov 2015 15:14:54 +0000 (10:14 -0500)]
PR18848: Add manual testing readme guide

8 years agoPR18848: Only compile monitor mode if json-c and ncurses developer
Felix Lu [Thu, 19 Nov 2015 14:31:08 +0000 (09:31 -0500)]
PR18848: Only compile monitor mode if json-c and ncurses developer
libraries are installed. Updated automake/conf files.

* session.cxx: error if using monitor mode when not compiled with
required libraries

8 years agoPR18848: Fix pipe buffer overflow problem, improve monitor UI
Felix Lu [Tue, 17 Nov 2015 20:32:22 +0000 (15:32 -0500)]
PR18848: Fix pipe buffer overflow problem, improve monitor UI

The pipe used in monitor mode was not being read the moment
data was available, causing an overflow. pselect now watches
the pipe fd for data to read. The UI now cuts off the probe name
if terminal size is not wide enough.

8 years agoPR18848: fix json array string
Felix Lu [Mon, 16 Nov 2015 22:04:51 +0000 (17:04 -0500)]
PR18848: fix json array string

Arrays were not made into key-value pairs when global scalars were
turned into a json object. Currently, only the array sizes are shown.

8 years agoPR18848: add --monitor option in man/stap.1
Felix Lu [Mon, 16 Nov 2015 21:23:43 +0000 (16:23 -0500)]
PR18848: add --monitor option in man/stap.1

Stap man page now provides an overview of the --monitor option
along with the main commands.

8 years agoPR18848: add help page, switch to page scrolling for output
Felix Lu [Mon, 16 Nov 2015 20:05:28 +0000 (15:05 -0500)]
PR18848: add help page, switch to page scrolling for output

Status bar can be toggled to show a manual page describing the
various commands available. Module output now scrolls by pages
instead of lines.

8 years agoPR18848: Fix json parsing error
Felix Lu [Mon, 16 Nov 2015 16:40:36 +0000 (11:40 -0500)]
PR18848: Fix json parsing error

Quotes in the probe names for the json string were not escaped to
form a valid json object. They had to be escaped once for the
systemtap parser and once more for the json parser.

* elaborate.cxx: escape quotes twice when generating json string
* staprun/monitor.c: check for correct parse result

8 years agoPR18848: use a pipe to redirect module output instead of proc file
Felix Lu [Fri, 13 Nov 2015 14:50:54 +0000 (09:50 -0500)]
PR18848: use a pipe to redirect module output instead of proc file

The module output can be written directly into a pipe by the reader
thread for the monitor interface to read.

* runtime/monitor.c: deleted
* runtime/print_flush.c: removed monitor path
* staprun/monitor.c: read output from pipe
* staprun/relay.c: create pipe and redirect output
* translate.cxx: remove proc file creation

8 years agoPR18848: increase history limit of output queue, add more keybindings
Felix Lu [Mon, 9 Nov 2015 16:57:09 +0000 (11:57 -0500)]
PR18848: increase history limit of output queue, add more keybindings
for scrolling probes and output

History size increased to 8192, arrows keys and pageup/pagedown keys
can be used as an alternative for scrolling

8 years agoPR18848: add module output scrollback, status window now refreshed
Felix Lu [Mon, 9 Nov 2015 16:00:48 +0000 (11:00 -0500)]
PR18848: add module output scrollback, status window now refreshed
on input

Users can now use the u and d keys to scroll back and forward through
the output. The scrollback uses a moving window approach over a queue.
The status window is now updated upon input for a smoother experience.

8 years agoPR18848: add probe scrolling capability
Felix Lu [Wed, 4 Nov 2015 16:24:03 +0000 (11:24 -0500)]
PR18848: add probe scrolling capability

Users can now use j and k keys to scroll down and up the probe list
respectively.

8 years agoPR18848: increase timeout timer and remove strsignal
Felix Lu [Wed, 4 Nov 2015 14:49:36 +0000 (09:49 -0500)]
PR18848: increase timeout timer and remove strsignal

8 years agoPR18848: improve keyboard input response time
Felix Lu [Tue, 3 Nov 2015 21:18:01 +0000 (16:18 -0500)]
PR18848: improve keyboard input response time

pselect now watches stdin for input.

8 years agoPR18848: zero pad the uptime
Felix Lu [Tue, 3 Nov 2015 20:59:10 +0000 (15:59 -0500)]
PR18848: zero pad the uptime

Uptime was not padded before if the unit was a single digit value.

8 years agoPR18848: only handle SIGWINCH in monitor mode
Felix Lu [Tue, 3 Nov 2015 20:58:37 +0000 (15:58 -0500)]
PR18848: only handle SIGWINCH in monitor mode

8 years agoPR18848: move resizing functionality out of signal handler
Felix Lu [Tue, 3 Nov 2015 20:16:06 +0000 (15:16 -0500)]
PR18848: move resizing functionality out of signal handler

Calling many functions in signal handler may be unsafe. A global
variable is now set on SIGWINCH.

8 years agoPR18848: handle terminal resizing
Felix Lu [Tue, 3 Nov 2015 19:12:06 +0000 (14:12 -0500)]
PR18848: handle terminal resizing

The curses UI now adjusts it's windows to the new dimensions of the
terminal upon receiving a SIGWINCH.

8 years agoPR18848: display current probe input
Felix Lu [Mon, 2 Nov 2015 20:56:32 +0000 (15:56 -0500)]
PR18848: display current probe input

Input prompt now shows what the user has entered.

8 years agoPR18848: add command line option to specify interval for polling stats
Felix Lu [Mon, 2 Nov 2015 20:10:23 +0000 (15:10 -0500)]
PR18848: add command line option to specify interval for polling stats

Users can display the stats every N seconds with --monitor=N

* buildrun.cxx: append monitor interval.
* cmdline.cxx: --monitor optional argument
* session.cxx: new monitor_interval attribute
* staprun/common.c: parse --monitor optarg
* staprun/mainloop.c: decrease pselect timeout to poll input quicker
* staprun/monitor.c: render monitor stats every N seconds

8 years agoPR18848: improve monitor ui and refactor input function.
Felix Lu [Mon, 2 Nov 2015 14:36:05 +0000 (09:36 -0500)]
PR18848: improve monitor ui and refactor input function.

Improved hint on keyboard mappings. New function to write
to procfs interface.

8 years agoPR18848: add most functionality to curses interface
Felix Lu [Wed, 28 Oct 2015 18:44:35 +0000 (14:44 -0400)]
PR18848: add most functionality to curses interface

Currently, a file is used to redirect stp_print output to curses window.
Previous curses interface code in mainloop got refactored into monitor.c.

* runtime/monitor.c: New file. procfs functions for stp_print redirection
* runtime/print_flush.c: Redirect stp_print to curses interface in
  monitor mode
* staprun/monitor.c: New file implementing curses interface
* staprun/mainloop.c: Move code into monitor.c
* staprun/Makefile.*: Link json-c and curses library, include monitor.c
  to source list
* translate.cxx: Create procfs file for stp_print redirection

8 years agoPR18848: change json format and retain entire probe name.
Felix Lu [Tue, 27 Oct 2015 19:15:43 +0000 (15:15 -0400)]
PR18848: change json format and retain entire probe name.

* elaborate.cxx: global variables are no longer in a list.

8 years agoPR18848: Add json parser and comparators to allow sorting
Felix Lu [Wed, 21 Oct 2015 16:00:48 +0000 (12:00 -0400)]
PR18848: Add json parser and comparators to allow sorting

Probe list will be sorted at runtime based on a user input on
either name, hit count, or cycles.

* staprun/mainloop: include json-c and parse the monitor read interface.

8 years agoPR18848: modify printf format
Felix Lu [Wed, 21 Oct 2015 15:31:09 +0000 (11:31 -0400)]
PR18848: modify printf format

Format changed to %d from %lld

8 years agoPR18848: convert procfs read to json format
Felix Lu [Wed, 21 Oct 2015 13:33:01 +0000 (09:33 -0400)]
PR18848: convert procfs read to json format

Json format allows for easy sorting of probes through json arrays.
This can be done at runtime based on probe attributes.

* elaborate.cxx: convert monitor_mode_read to output json.

8 years agoPR18848: monitor status formatting
Felix Lu [Fri, 16 Oct 2015 20:29:35 +0000 (16:29 -0400)]
PR18848: monitor status formatting

Removed h:m:s indicators in uptime and global scalar values are now
displayed.

* elaborate.cxx: changes in monitor_mode_read()

8 years agoPR18848: output monitor data in stapio event loop
Felix Lu [Fri, 16 Oct 2015 15:50:39 +0000 (11:50 -0400)]
PR18848: output monitor data in stapio event loop

* staprun/mainloop.c: polls procfs monitor interface for data

8 years agoPR18848: remove print statement
Felix Lu [Thu, 15 Oct 2015 19:20:17 +0000 (15:20 -0400)]
PR18848: remove print statement

elaborate.cxx: removed a debug print statement

8 years agoPR18848: new command line argument -M for staprun
Felix Lu [Thu, 15 Oct 2015 18:51:24 +0000 (14:51 -0400)]
PR18848: new command line argument -M for staprun

Pass stap --monitor command to staprun.

* buildrun.cxx: add -M argument to flags
* staprun/common.c: -M option to parse_args
* staprun/mainloop.c: add a timeout to pselect in monitor mode
  to prevent blocking and allow the procfs monitor interface to
  be polled.
* staprun/staprun.h: monitor extern declaration

8 years agoPR18848: refactor functions
Felix Lu [Wed, 7 Oct 2015 18:56:11 +0000 (14:56 -0400)]
PR18848: refactor functions

Renamed the initialization function and removed some redundant
parameters.

8 years agoPR18848: move embedded code for module size into tapset
Felix Lu [Wed, 7 Oct 2015 17:42:24 +0000 (13:42 -0400)]
PR18848: move embedded code for module size into tapset

* elaborate.cxx: remove monitor synthetic function
* tapset/linux/context.stp: new module_size function

8 years agoPR18848: use jiffies tapset function
Felix Lu [Wed, 7 Oct 2015 15:33:59 +0000 (11:33 -0400)]
PR18848: use jiffies tapset function

Switch the implementation of uptime to use the jiffies and hz tapset
functions instead of using embedded C

* elaborate.cxx: remove old embedded C function to get uptime. Added
  a synthetic begin probe to obtain starting time. Synthetic variables
  are now hidden in monitor mode and not reset.
* translate.cxx: remove jiffies inclusion in monitor mode.

8 years agoPR18848: new procfs monitor mode option
Felix Lu [Tue, 6 Oct 2015 20:15:07 +0000 (16:15 -0400)]
PR18848: new procfs monitor mode option

Presents a procfs read interface to obtain data about the running
script and another procfs write interface to control the script

* cmdline.cxx: new "monitor" option
* cmdline.h: new field in enum
* elaborate.cxx: new functions monitor_mode_read and monitor_mode_write
  synthesizes procfs probes for the interfaces
* session.cxx: new monitor flag
* session.h: new monitor flag
* translate.cxx: extra code is generated to provide statistics for
  monitor mode, function emission is delayed to allow stap_probes to
  be first defined

8 years agoUpdate the PR19241 fix so that 'out_fd' gets correctly handled.
Martin Cermak [Fri, 20 Nov 2015 11:22:05 +0000 (12:22 +0100)]
Update the PR19241 fix so that 'out_fd' gets correctly handled.

This is an update to commit d879410b. Before this update, stap
in "stream mode" was using invalid output file descriptor per
https://sourceware.org/bugzilla/show_bug.cgi?id=19241#c2.

8 years agoAllow buildok/{rpc-all-probes,rpc-detailed} to access private var.
Martin Cermak [Fri, 20 Nov 2015 10:00:30 +0000 (11:00 +0100)]
Allow buildok/{rpc-all-probes,rpc-detailed} to access private var.

Tests buildok/rpc-all-probes.stp and buildok/rpc-detailed.stp are
examining '@__private30 global __rpc_create_args' array.  That can
only be accessed using '--compatible=2.9' by the test script.

This approach to testing private stuff will probably need to change
in the future.  For now, this update aligns buildok/{rpc-all-probes,\
rpc-detailed}.stp to other buildok tests examining private variables
or functions.

8 years agoMark c_tmpcounter final
Josh Stone [Fri, 20 Nov 2015 02:25:11 +0000 (18:25 -0800)]
Mark c_tmpcounter final

8 years agoRemove the last visitors from c_tmpcounter
Josh Stone [Fri, 20 Nov 2015 02:01:20 +0000 (18:01 -0800)]
Remove the last visitors from c_tmpcounter

Now c_tmpcounter doesn't doesn't have any duplicated visitors at all.
It only overrides a few key virtual methods in c_unparser to get the
functionality it needs.

8 years agoSubclass c_tmpcounter directly from c_unparser
Josh Stone [Fri, 20 Nov 2015 00:25:22 +0000 (16:25 -0800)]
Subclass c_tmpcounter directly from c_unparser

The c_tmpcounter is meant to be a shadow of c_unparser, walking the same
walk to declare the temps that c_unparser will need.  But this was done
manually in a fragile balancing act, with a lot of duplicated logic and
little to ensure it was correct unless it failed to compile at all.

Now c_tmpcounter is a subclass of c_unparser so it can be a real shadow,
truly walking the same walk via the exact same code.  The normal output
is just dumped into a nulled ostream for this pass.  When a var is
accessed the first time through its value(), c_tmpcounter writes its
declaration to the real ostream.  A var that's created but not used will
be left out automatically, like a tmpvar that gets an override().

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