]> sourceware.org Git - systemtap.git/log
systemtap.git
11 years agostapregex -- placate the gods of coverity (UNINIT_CTOR)
Serguei Makarov [Fri, 26 Jul 2013 19:35:47 +0000 (15:35 -0400)]
stapregex -- placate the gods of coverity (UNINIT_CTOR)

11 years agosession.cxx: add assert statement for benchmark opts
Jonathan Lebon [Fri, 26 Jul 2013 17:58:21 +0000 (13:58 -0400)]
session.cxx: add assert statement for benchmark opts

11 years agostaprun/common.c: add assert statement for -C, -S, -r
Jonathan Lebon [Fri, 26 Jul 2013 17:22:34 +0000 (13:22 -0400)]
staprun/common.c: add assert statement for -C, -S, -r

11 years agosystemtap.spec: prefer with_systemd on recent OS
Frank Ch. Eigler [Fri, 26 Jul 2013 14:35:03 +0000 (10:35 -0400)]
systemtap.spec: prefer with_systemd on recent OS

11 years agoversion bump for 2.4 development
David Smith [Fri, 26 Jul 2013 02:03:44 +0000 (21:03 -0500)]
version bump for 2.4 development

11 years agoRevert "testsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes" release-2.3
Frank Ch. Eigler [Thu, 25 Jul 2013 20:21:14 +0000 (16:21 -0400)]
Revert "testsuite: set -B CONFIG_DEBUG_INFO=y in testsuite rc to help debug crashes"

This reverts commit 6bb6bf29ae.....
                and f1d4f4313.....

11 years agoRevert "PR15782 cont'd: PR_Read_Complete should initialize vars more"
Frank Ch. Eigler [Thu, 25 Jul 2013 20:03:25 +0000 (16:03 -0400)]
Revert "PR15782 cont'd: PR_Read_Complete should initialize vars more"

This reverts commit 59331ea0de1f10d0694b3389e0b4710db4da0798.

11 years agoPR15782 cont'd: PR_Read_Complete should initialize vars more
Frank Ch. Eigler [Thu, 25 Jul 2013 20:01:31 +0000 (16:01 -0400)]
PR15782 cont'd: PR_Read_Complete should initialize vars more

Use a clearer looping/accumulation structure.

11 years agoImplement PR_Read_Complete() in nsscommon.cxx.
Dave Brolley [Thu, 25 Jul 2013 19:20:50 +0000 (15:20 -0400)]
Implement PR_Read_Complete() in nsscommon.cxx.

A wrapper for PR_Read which ensures that all of the requested data
is read.
Updates callers of PR_Read() as appropriate.

11 years agoregex: warning cleanup as per gcc 3.4.6 on i686
Frank Ch. Eigler [Thu, 25 Jul 2013 18:30:02 +0000 (14:30 -0400)]
regex: warning cleanup as per gcc 3.4.6 on i686

11 years agostapregex rewrite: appropriate NEWS items
Serguei Makarov [Wed, 24 Jul 2013 21:30:30 +0000 (17:30 -0400)]
stapregex rewrite: appropriate NEWS items

11 years agostapregex rewrite: regenerate autoconf
Serguei Makarov [Wed, 24 Jul 2013 21:19:00 +0000 (17:19 -0400)]
stapregex rewrite: regenerate autoconf

11 years agostapregex rewrite -- prepare for rebase onto main branch for 2.3 release
Serguei Makarov [Wed, 24 Jul 2013 20:50:03 +0000 (16:50 -0400)]
stapregex rewrite -- prepare for rebase onto main branch for 2.3 release

11 years agostapregex REWRITE -- fixes for 100% (existing, non-subexpression) testsuite pass
Serguei Makarov [Wed, 24 Jul 2013 18:52:20 +0000 (14:52 -0400)]
stapregex REWRITE -- fixes for 100% (existing, non-subexpression) testsuite pass

11 years agostapregex REWRITE -- further bug fixes for engine (2 testsuite errors remaining)
Serguei Makarov [Wed, 24 Jul 2013 16:06:06 +0000 (12:06 -0400)]
stapregex REWRITE -- further bug fixes for engine (2 testsuite errors remaining)

11 years agostapregex REWRITE -- further bug fixes (esp. dealing with infinite loops)
Serguei Makarov [Tue, 23 Jul 2013 21:01:50 +0000 (17:01 -0400)]
stapregex REWRITE -- further bug fixes (esp. dealing with infinite loops)

11 years agostapregex REWRITE -- rudimentary emit implementation (no tags yet)
Serguei Makarov [Tue, 23 Jul 2013 16:01:25 +0000 (12:01 -0400)]
stapregex REWRITE -- rudimentary emit implementation (no tags yet)

11 years agostapregex REWRITE -- bug fix progress (fix deallocation with ^, fix duplicate-state...
Serguei Makarov [Mon, 22 Jul 2013 20:41:02 +0000 (16:41 -0400)]
stapregex REWRITE -- bug fix progress (fix deallocation with ^, fix duplicate-state-check, ditch debug output)

11 years agostapregex REWRITE -- bug fix progress (failure alternative, ^ anchoring)
Serguei Makarov [Mon, 22 Jul 2013 19:55:15 +0000 (15:55 -0400)]
stapregex REWRITE -- bug fix progress (failure alternative, ^ anchoring)

11 years agostapregex REWRITE -- bug fix progress (range creation off-by-one error)
Serguei Makarov [Mon, 22 Jul 2013 19:02:50 +0000 (15:02 -0400)]
stapregex REWRITE -- bug fix progress (range creation off-by-one error)

11 years agostapregex REWRITE -- bug fix progress (get rid of infinite looping)
Serguei Makarov [Mon, 22 Jul 2013 18:49:00 +0000 (14:49 -0400)]
stapregex REWRITE -- bug fix progress (get rid of infinite looping)

11 years agostapregex REWRITE -- bug fix progress in existing code (up to infinite-loop error)
Serguei Makarov [Mon, 22 Jul 2013 15:57:56 +0000 (11:57 -0400)]
stapregex REWRITE -- bug fix progress in existing code (up to infinite-loop error)

11 years agostapregex REWRITE - rig test suite to work with new code
Serguei Makarov [Mon, 22 Jul 2013 15:56:50 +0000 (11:56 -0400)]
stapregex REWRITE - rig test suite to work with new code

11 years agostapregex REWRITE PROGRESS -- Delete irrelevant pre-rewrite code
Serguei Makarov [Thu, 18 Jul 2013 16:19:15 +0000 (12:19 -0400)]
stapregex REWRITE PROGRESS -- Delete irrelevant pre-rewrite code

11 years agostapregex REWRITE PROGRESS: ADD PARTIAL stapregex-dfa.cxx & related (missing emit...
Serguei Makarov [Thu, 18 Jul 2013 16:17:56 +0000 (12:17 -0400)]
stapregex REWRITE PROGRESS: ADD PARTIAL stapregex-dfa.cxx & related (missing emit data, some tag-reordering stuff)

11 years agooops: add stapregex-tree.cxx mention to README.stapregex
Serguei Makarov [Thu, 11 Jul 2013 15:36:14 +0000 (11:36 -0400)]
oops: add stapregex-tree.cxx mention to README.stapregex

11 years agostapregex REWRITE PROGRESS: ADD stapregex-tree.cxx & related
Serguei Makarov [Tue, 9 Jul 2013 21:07:28 +0000 (17:07 -0400)]
stapregex REWRITE PROGRESS: ADD stapregex-tree.cxx & related

11 years agostapregex: fix guard clauses in stapregex.cxx for nontagged and standalone (testsuite...
Serguei Makarov [Thu, 4 Jul 2013 18:35:01 +0000 (14:35 -0400)]
stapregex: fix guard clauses in stapregex.cxx for nontagged and standalone (testsuite) cases

11 years agostapregex: ADD /* pragma:tagged_dfa */ to make non-subexpression-using programs a...
Serguei Makarov [Thu, 4 Jul 2013 18:31:18 +0000 (14:31 -0400)]
stapregex: ADD /* pragma:tagged_dfa */ to make non-subexpression-using programs a bit more efficient

11 years agostapregex REWRITE PROGRESS: ADD stapregex.cxx & related
Serguei Makarov [Wed, 3 Jul 2013 20:05:23 +0000 (16:05 -0400)]
stapregex REWRITE PROGRESS: ADD stapregex.cxx & related

11 years agostapregex REWRITE PROGRESS: character class handling in stapregex-parse.cxx
Serguei Makarov [Thu, 27 Jun 2013 18:42:29 +0000 (14:42 -0400)]
stapregex REWRITE PROGRESS: character class handling in stapregex-parse.cxx

11 years agostapregex REWRITE PROGRESS: ADD stapregex-parse.cxx & related
Serguei Makarov [Tue, 25 Jun 2013 19:40:07 +0000 (15:40 -0400)]
stapregex REWRITE PROGRESS: ADD stapregex-parse.cxx & related

11 years agofix stapregex rewrite oops: vimline in translator-output.cxx
Serguei Makarov [Tue, 25 Jun 2013 00:17:48 +0000 (20:17 -0400)]
fix stapregex rewrite oops: vimline in translator-output.cxx

11 years agostapregex REWRITE PROGRESS: ADD stapregex.h
Serguei Makarov [Mon, 24 Jun 2013 15:12:43 +0000 (11:12 -0400)]
stapregex REWRITE PROGRESS: ADD stapregex.h

11 years agostapregex cleanup: check miscellaneous TODOXXX
Serguei Makarov [Tue, 11 Jun 2013 19:18:44 +0000 (15:18 -0400)]
stapregex cleanup: check miscellaneous TODOXXX

11 years agoAdd dyninst kfail in systemtap.pass1-4/transok.exp.
David Smith [Wed, 24 Jul 2013 18:48:05 +0000 (13:48 -0500)]
Add dyninst kfail in systemtap.pass1-4/transok.exp.

11 years agoAdded "semok" test improvements.
David Smith [Wed, 24 Jul 2013 18:40:37 +0000 (13:40 -0500)]
Added "semok" test improvements.

* testsuite/systemtap.pass1-4/semok.exp (dyninst_kfails): Kfail more
  tests.
* testsuite/semok/kretprobe-data.stp: Update for newer kernels.

11 years agoUpdate dyninst kfails in systemtap.pass1-4/parseok.exp.
David Smith [Wed, 24 Jul 2013 17:41:44 +0000 (12:41 -0500)]
Update dyninst kfails in systemtap.pass1-4/parseok.exp.

11 years agoSetup more kfails in buildok-dyninst.exp.
David Smith [Wed, 24 Jul 2013 16:48:42 +0000 (11:48 -0500)]
Setup more kfails in buildok-dyninst.exp.

11 years agoAdded "buildok" test improvements.
David Smith [Wed, 24 Jul 2013 16:13:02 +0000 (11:13 -0500)]
Added "buildok" test improvements.

* testsuite/systemtap.pass1-4/buildok.exp: Kfail twentyeightprime.stp if
  we're using inode uprobes, since absolute probes don't work there.
* testsuite/buildok/twenty.stp: Also probe 'iterate_dir', since
  'vfs_readdir' has been renamed.

11 years agoNEWS update for coloring and function suggestion
Jonathan Lebon [Wed, 24 Jul 2013 15:07:04 +0000 (11:07 -0400)]
NEWS update for coloring and function suggestion

11 years agoPR15375: implement function suggestions
Jonathan Lebon [Wed, 24 Jul 2013 12:59:11 +0000 (08:59 -0400)]
PR15375: implement function suggestions

Added dwarf_builder::suggest_functions(), which builds a list of similar
functions from a given function. This is used in dwarf_builder::build()
to suggest functions to the user when the probe point could not be
derived.

11 years agoPR15375: add visited_modules to dwarf_query struct
Jonathan Lebon [Wed, 24 Jul 2013 12:48:47 +0000 (08:48 -0400)]
PR15375: add visited_modules to dwarf_query struct

The visited_modules member of dwarf_query is used to keep track of all
the modules which have been visited during the query. This information
will be used in the function suggestion feature to know from which
modules to pull functions.

11 years agoPR15375: add sym_seen to module_info struct
Jonathan Lebon [Wed, 24 Jul 2013 12:42:11 +0000 (08:42 -0400)]
PR15375: add sym_seen to module_info struct

The sym_tab struct only caches non-inlined functions. The sym_seen set
includes all functions, and is also updated during update_symtab. This
will allow us to give better function suggestions.

11 years agoPR15375: add levenshtein() function to calculate edit distance
Jonathan Lebon [Wed, 24 Jul 2013 12:37:12 +0000 (08:37 -0400)]
PR15375: add levenshtein() function to calculate edit distance

The levenshtein() function added in util.cxx will be used in the new
upcoming function suggestion feature.

11 years agoKfail unsupported inode uprobes tests in unprivileged_probes.exp.
David Smith [Tue, 23 Jul 2013 19:49:26 +0000 (14:49 -0500)]
Kfail unsupported inode uprobes tests in unprivileged_probes.exp.

* testsuite/lib/systemtap.exp (inode_uprobes_p): New function.
* testsuite/systemtap.base/uprobes_filtering.exp: Use 'inode_uprobes_p',
  instead of private code, to know whether to test.
* testsuite/systemtap.unprivileged/unprivileged_probes.exp
  (test_unrestricted_probes): Kfail
  'process(number).statement(number).absolute*' tests if we're using inode
  uprobes, since absolute probes aren't supported.

11 years agoTweak systemtap.examples/process/psig.stp to compile on RHEL6.
David Smith [Tue, 23 Jul 2013 17:27:20 +0000 (12:27 -0500)]
Tweak systemtap.examples/process/psig.stp to compile on RHEL6.

* testsuite/systemtap.examples/process/psig.stp (translate_mask): Tweak
  function to lower stack usage. This avoids the dreaded "the frame size
  of XXX bytes is larger than 256 bytes" error messages.

11 years agoFix a bogus unprivileged_probes.exp perf probe test.
David Smith [Mon, 22 Jul 2013 19:45:54 +0000 (14:45 -0500)]
Fix a bogus unprivileged_probes.exp perf probe test.

* testsuite/systemtap.unprivileged/unprivileged_probes.exp: Fix bogus
  'perf*.counter' probe test. Originally was testing
  "perf.type(number).config(number).sample(number).counter(string)" probe
  type, which doesn't exist.

11 years agoFix testsuite/semok/thirtysix.stp.
David Smith [Mon, 22 Jul 2013 17:55:41 +0000 (12:55 -0500)]
Fix testsuite/semok/thirtysix.stp.

* testsuite/semok/thirtysix.stp: Since not all markers in "stap" have a
  '$arg' parameter, this test was failing (correctly). To fix this, only
  probe the "pass*__*" markers (which all have a '$arg' parameter).

11 years agoAUTHORS bump
David Smith [Mon, 22 Jul 2013 17:20:22 +0000 (12:20 -0500)]
AUTHORS bump

11 years agoThe testsuite now looks for systemtap java support before java testing.
David Smith [Fri, 19 Jul 2013 17:31:23 +0000 (12:31 -0500)]
The testsuite now looks for systemtap java support before java testing.

* testsuite/lib/systemtap.exp (java_p): New function.
  (setup_systemtap_environment): Test for systemtap java functionality.
* testsuite/systemtap.apps/java.exp: Mark as untested if no stap java
  support.
* testsuite/systemtap.unprivileged/unprivileged_probes.exp
  (test_unrestricted_probes): Mark java probe tests as untested if no stap
  java support.

11 years agoImprove the inode-uprobes check in systemtap.base/uprobes_filtering.exp.
David Smith [Fri, 19 Jul 2013 16:31:26 +0000 (11:31 -0500)]
Improve the inode-uprobes check in systemtap.base/uprobes_filtering.exp.

11 years agoMake the systemtap.base/proc_exec.exp test more robust.
David Smith [Thu, 18 Jul 2013 17:32:16 +0000 (12:32 -0500)]
Make the systemtap.base/proc_exec.exp test more robust.

11 years agoUpdated renaming module testcases to handle updated error messages.
David Smith [Wed, 17 Jul 2013 16:42:50 +0000 (11:42 -0500)]
Updated renaming module testcases to handle updated error messages.

* testsuite/systemtap.base/pr13158.exp: Updated testcase with new error
  messages.
* testsuite/systemtap.base/rename_module.exp: Ditto.

11 years agoThe rest of the PR15751 changes.
David Smith [Wed, 17 Jul 2013 16:40:10 +0000 (11:40 -0500)]
The rest of the PR15751 changes.

11 years agoFix PR15751 by adding support for new 'compat' sigaction structures.
David Smith [Wed, 17 Jul 2013 15:55:56 +0000 (10:55 -0500)]
Fix PR15751 by adding support for new 'compat' sigaction structures.

* buildrun.cxx (compile_pass): Added 'compat_sigaction' autoconf test.
* runtime/linux/autoconf-compat_sigaction.c: New file.
* tapset/linux/aux_syscalls.stp (_struct_sigaction32_u): Prefer 'struct
  compat_sigaction' when available (over old 'struct sigaction32').
  (_struct_old_sigaction32_u) Prefer 'struct compat_old_sigaction' when
  available (over old 'struct old_sigaction32').
* testsuite/systemtap.context/usymbols.exp: Update to use
  'compat_sigaction' where available.

11 years agoFix dyninst support in testsuite/systemtap.base/unresolved-struct-typedef.exp.
David Smith [Tue, 16 Jul 2013 15:08:10 +0000 (10:08 -0500)]
Fix dyninst support in testsuite/systemtap.base/unresolved-struct-typedef.exp.

11 years agoImprove stapdyn uprobe error reporting.
David Smith [Tue, 16 Jul 2013 14:57:11 +0000 (09:57 -0500)]
Improve stapdyn uprobe error reporting.

* stapdyn/mutatee.cxx (mutatee::instrument_dynprobe_target): Turn off
  dyninst error messages and add our own if we can't find the uprobe entry
  functions.

11 years agoFix PR15743 by only looking up the dyninst uprobe function if we need to.
David Smith [Tue, 16 Jul 2013 14:11:56 +0000 (09:11 -0500)]
Fix PR15743 by only looking up the dyninst uprobe function if we need to.

* stapdyn/mutatee.cxx (mutatee::instrument_dynprobe_target): Only look up
  the uprobe enter function if we have a uprobe probe.

11 years agoFix testsuite/systemtap.base/setjmp.exp compilation issues.
David Smith [Mon, 15 Jul 2013 18:19:42 +0000 (13:19 -0500)]
Fix testsuite/systemtap.base/setjmp.exp compilation issues.

* testsuite/systemtap.base/setjmp.exp: Add simple optimized ("-O")
  testing. Fix test program compilation.

11 years agostapdyn binaries: also link against -lsymtabAPI
Zifei Tong [Mon, 15 Jul 2013 03:50:28 +0000 (23:50 -0400)]
stapdyn binaries: also link against -lsymtabAPI

11 years agoHelp testsuite/systemtap.base/probefunc.exp pass on newer kernels.
David Smith [Fri, 12 Jul 2013 21:14:00 +0000 (16:14 -0500)]
Help testsuite/systemtap.base/probefunc.exp pass on newer kernels.

11 years agoPR15731: Fix 'syscall.{execve,compat_execve}' on newer kernels.
David Smith [Fri, 12 Jul 2013 19:37:17 +0000 (14:37 -0500)]
PR15731: Fix 'syscall.{execve,compat_execve}' on newer kernels.

* tapset/linux/syscalls.stp (syscall.execve): Use 'sys_execve', since
  'do_execve' can be inlined.
  (syscall.compat_execve): Prefer 'compat_sys_execve', which can't be
  inlined.
* tapset/linux/nd_syscalls.stp: Matching changes from syscalls.stp for
  'nd_syscall.execve' and 'nd_syscall.compat_execve'.
* testsuite/buildok/twentyseven.stp: Updated for change to
  'syscall.execve'.
* testsuite/systemtap.base/pointer_array.stp: Ditto.
* testsuite/systemtap.base/execve.exp: New 'syscall.execve' test.
* testsuite/systemtap.base/execve.stp: Ditto.

11 years agotestsuite/systemtap.base/pr14546.exp: When tests timeout, kill stap.
David Smith [Fri, 12 Jul 2013 19:32:01 +0000 (14:32 -0500)]
testsuite/systemtap.base/pr14546.exp: When tests timeout, kill stap.

11 years agoIncrease test timeout in testsuite/systemtap.base/list.exp.
David Smith [Thu, 11 Jul 2013 20:51:58 +0000 (15:51 -0500)]
Increase test timeout in testsuite/systemtap.base/list.exp.

11 years agoUpdate the systemtap.base/itrace.exp testcase.
David Smith [Thu, 11 Jul 2013 20:22:59 +0000 (15:22 -0500)]
Update the systemtap.base/itrace.exp testcase.

* testsuite/systemtap.base/itrace.exp: Check for original utrace, since
  "fake" utrace doesn't support itrace.

11 years agoKfail known dyninst problems in the at_var_mark* tests.
David Smith [Thu, 11 Jul 2013 19:29:44 +0000 (14:29 -0500)]
Kfail known dyninst problems in the at_var_mark* tests.

* testsuite/systemtap.base/at_var_mark.exp: Add kfail for dyninst without
  VMA-tracking (PR15052).
* testsuite/systemtap.base/at_var_mark_func.exp: Ditto.

11 years agoImprove perf probe warnings and testcase.
David Smith [Thu, 11 Jul 2013 19:17:20 +0000 (14:17 -0500)]
Improve perf probe warnings and testcase.

* runtime/linux/perf.c (_stp_perf_init): Print a better warning for
  unsupported perf probe types.
* testsuite/systemtap.base/perf.exp: Change perf hw probes to sw probes,
  which are more widely available.

11 years agostap --compatible: constrain version parameter to present or past
Frank Ch. Eigler [Thu, 11 Jul 2013 18:58:10 +0000 (14:58 -0400)]
stap --compatible: constrain version parameter to present or past

Fight the Future!

11 years agoEnable 32-bit unwinding on 64bit
Lukas Berk [Wed, 10 Jul 2013 20:52:57 +0000 (16:52 -0400)]
Enable 32-bit unwinding on 64bit

runtime/unwind.c: Add compat_task flag and enable COMPAT_REG_MAP
                  when active
runtime/unwind/unwind.h: Add COMPAT_REG_MAP 1 to 1 mapping in case x86_64.h
                         isn't defined
runtime/unwind/x86_64.h: COMPAT_REG_MAP mapping from 32 DWARF register values
                         to 64 bit register values
testsuite/systemtap.exelib/exelib.exp: enable -m32 flags on x86_64
translate.cxx: Remove warning and check for 32bit unwinding on 64bit

11 years agoImprove buildok-dyninst.exp test results a bit.
David Smith [Tue, 9 Jul 2013 21:16:18 +0000 (16:16 -0500)]
Improve buildok-dyninst.exp test results a bit.

* testsuite/systemtap.pass1-4/buildok-dyninst.exp: Add kfail for
  buildok/fortyseven.stp.
* testsuite/buildok/gtod_init.stp: Only look for 'STAP_NEED_GETTIMEOFDAY'
  when using the kernel runtime.
* testsuite/buildok/gtod_noinit.stp: Ditto.

11 years agoPR14927: change error messages from using warn/x() to staperror()
Jonathan Lebon [Tue, 9 Jul 2013 19:11:23 +0000 (15:11 -0400)]
PR14927: change error messages from using warn/x() to staperror()

There are two main reasons for this:
1. Using staperror() will preface the errors with an "ERROR:" string,
   which may be colored, depending on the coloring mode.
2. The use of warn() and family are not recommended as they are provided
   only for compatibility with BSD.

11 years agotoken colorizer: eschew tok_embedded etc. types
Frank Ch. Eigler [Tue, 9 Jul 2013 19:19:10 +0000 (15:19 -0400)]
token colorizer: eschew tok_embedded etc. types

When printing source context for an error, we don't really know how
many characters from the source to highlight for any given token, as
that only stores the starting column position.

The tok->content.size() is a guide, but not a perfect one, as for some
(tok_string, tok_embedded, ...), the content is processed from the
source characters (with quotation signs removed, etc.), for others,
the tok->content() can be many lines long.  That's a problem because
if we try to source_line.substr(..., long_multiline_token.length()...),
we'll get a SEGV.

So we colorize only those tokens whose type is known to be simple and
literal transcriptions of the source file, starting at
column=tok->column.

11 years agoPR14927: stapdyn: make warning/error string capitalization consistent
Jonathan Lebon [Tue, 9 Jul 2013 13:49:58 +0000 (09:49 -0400)]
PR14927: stapdyn: make warning/error string capitalization consistent

Just like in stap and staprun, where messages that follow the "WARNING:"
and "ERROR:" string are capitalized.

11 years agoPR14927: make more warnings from staprun/stapdyn sensitive to -w
Jonathan Lebon [Tue, 9 Jul 2013 13:50:48 +0000 (09:50 -0400)]
PR14927: make more warnings from staprun/stapdyn sensitive to -w

Before, even with the -w option specified for staprun, some warnings
(such as when the child process exits with a nonzero code) were still
output. Now, all warnings are affected by -w.

A similar operation was carried out in stapdyn, where the use of warnx()
was changed to stapwarn() so that -w now silences them. This changes
also gives those warnings the chance to be colored if necessary.

11 years agoPR14927: stapdyn: add colorization for stapwarn() and staperror()
Jonathan Lebon [Tue, 9 Jul 2013 14:06:38 +0000 (10:06 -0400)]
PR14927: stapdyn: add colorization for stapwarn() and staperror()

The colorize() and parse_stap_color() functions are the same as in
session.cxx.

11 years agoPR14927: fix inheritance of color mode to staprun and stapdyn from stap
Jonathan Lebon [Tue, 9 Jul 2013 14:05:50 +0000 (10:05 -0400)]
PR14927: fix inheritance of color mode to staprun and stapdyn from stap

Added the -C switch in the building of the cmd for stapdyn. Also, since
the default color mode is now auto, we must check if the currently
active mode is anything other than auto before explicitly passing the -C
switch to staprun or stapdyn.

11 years agoPR14927: stapdyn: add -C switch
Jonathan Lebon [Mon, 8 Jul 2013 19:31:04 +0000 (15:31 -0400)]
PR14927: stapdyn: add -C switch

Also clarified usage of -C in staprun to indicate that auto is now the
default coloring mode.

11 years agoparser: print a warning in case of suspicious }% embedded-c non-closer
Frank Ch. Eigler [Tue, 9 Jul 2013 14:53:00 +0000 (10:53 -0400)]
parser: print a warning in case of suspicious }% embedded-c non-closer

11 years agoPR14927: fix indentation and small compare() bug
Jonathan Lebon [Mon, 8 Jul 2013 18:18:15 +0000 (14:18 -0400)]
PR14927: fix indentation and small compare() bug

11 years agoPR14927: add new testcase color_parsing.exp
Jonathan Lebon [Fri, 5 Jul 2013 18:09:00 +0000 (14:09 -0400)]
PR14927: add new testcase color_parsing.exp

To make sure that the parser implemented for PR14927 is correct and
safe, this new testcase sets SYSTEMTAP_COLORS to various erroneous
values and verifies that both stap and staprun react accordingly.

11 years agoPR14927: make stap use same parser as staprun for consistency
Jonathan Lebon [Mon, 8 Jul 2013 15:34:15 +0000 (11:34 -0400)]
PR14927: make stap use same parser as staprun for consistency

In order to ensure that both stap and staprun react the same way to
various values of SYSTEMTAP_COLORS, the parsing method in staprun was
copied to replace the one in stap (with small C++ adjustments).

This will also allow us to test both stap and staprun using the same
test cases (see the next commit).

11 years agoPR14927: protect terminal from invalid vals in SYSTEMTAP_COLORS
Jonathan Lebon [Fri, 5 Jul 2013 18:26:48 +0000 (14:26 -0400)]
PR14927: protect terminal from invalid vals in SYSTEMTAP_COLORS

11 years agoPR14927: enable coloring for stap and staprun/io by default
Jonathan Lebon [Fri, 5 Jul 2013 17:25:10 +0000 (13:25 -0400)]
PR14927: enable coloring for stap and staprun/io by default

The default coloring mode was changed from 'never' to 'auto'.
Additionally, the terminal is now checked to make sure that it is not
dumb (i.e. it understands ANSI codes). Finally, to make sure that the
color sequences don't affect the testsuite, the latter was changed to
impersonate a dumb terminal.

11 years agomake STP_OOB_DATA treatment more stringent
Jonathan Lebon [Thu, 4 Jul 2013 20:55:28 +0000 (16:55 -0400)]
make STP_OOB_DATA treatment more stringent

Since all STP_OOB_DATA originally comes from _stp_vlog() in
runtime/linux/io.c, we can be sure that all warnings will be prefixed
by "WARNING: " and all errors by "ERROR: ", as defined by WARN_STRING
ERR_STRING in io.c.

Therefore, we can be more stringent in control.c and mainloop.c in the
way we identify warnings and errors. Additionally, warnings can instead
use the warn() macro and errors the err() macro so that they benefit
from coloring.

The main effect of this patch is that all calls to _stp_warn() and
_stp_error() will be colored upon reception by stapio.

11 years agoPR14927: adjust testsuite for staprun/io string changes
Jonathan Lebon [Thu, 4 Jul 2013 14:24:08 +0000 (10:24 -0400)]
PR14927: adjust testsuite for staprun/io string changes

11 years agoPR14927: change wording in some call sites to err() and perr()
Jonathan Lebon [Tue, 2 Jul 2013 20:33:30 +0000 (16:33 -0400)]
PR14927: change wording in some call sites to err() and perr()

Following the changes from the previous commit, all calls to err() and
perr() were checked so that they were consistent with the prefix
"ERROR:" added by those macros.

Where err() was used to report non-critical information, it was
replaced by eprintf(), and where it was used for warnings, it was
replaced by the warn() macro.

11 years agoPR14927: add parsing of SYSTEMTAP_COLORS
Jonathan Lebon [Tue, 2 Jul 2013 20:29:51 +0000 (16:29 -0400)]
PR14927: add parsing of SYSTEMTAP_COLORS

Add the parse_stap_color() function to parse out the color sequence of
wanted string types from SYSTEMTAP_COLORS.

11 years agoPR14927: remember original color mode to pass to staprun
Jonathan Lebon [Wed, 3 Jul 2013 15:26:50 +0000 (11:26 -0400)]
PR14927: remember original color mode to pass to staprun

11 years agoPR14927: add -C switch for color in staprun/io
Jonathan Lebon [Tue, 2 Jul 2013 15:04:36 +0000 (11:04 -0400)]
PR14927: add -C switch for color in staprun/io

Also make stap send the -C switch if itself it was called with --color.
As opposed to the --color switch of stap, the WHEN argument was made
mandatory here so that it's consistent with the others, and it doesn't
conflict with the MODULE argument (and users don't have to resort to
using e.g. '-Cauto').

A few formatting fixes in the staprun manual page.

11 years agoPR14927: tweak message coloring logic to simplify
Frank Ch. Eigler [Sat, 29 Jun 2013 23:05:47 +0000 (19:05 -0400)]
PR14927: tweak message coloring logic to simplify

... but whoops, the code is now more c++-y.  For use in
staprun/stapio/stapdyn, it'll need c-ificiation again.

11 years agoPR14927: parse SYSTEMTAP_COLOR on-the-fly
Jonathan Lebon [Fri, 28 Jun 2013 15:55:03 +0000 (11:55 -0400)]
PR14927: parse SYSTEMTAP_COLOR on-the-fly

Colors are no longer stored in memory. Instead, upon each request to
colorize(), the SYSTEMTAP_COLOR env var is parsed and queried for the
value of the key of interest.

This allows colorize() and parse_stap_color() to be more self-contained
and easier to eventually port to other parts of SystemTap, such as
staprun/io.

11 years agoFix 'buildok' testsuite failures on ia32.
David Smith [Fri, 28 Jun 2013 15:18:14 +0000 (10:18 -0500)]
Fix 'buildok' testsuite failures on ia32.

* testsuite/buildok/nd_syscalls-detailed.stp: Mark 'compat' probe alias
  tests as optional, so test will pass on ia32.
* testsuite/buildok/nd_syscalls2-detailed.stp: Dito.
* testsuite/buildok/syscalls-detailed.stp: Ditto.

11 years agoPR14927: enable support for SYSTEMTAP_COLORS env var
Jonathan Lebon [Fri, 28 Jun 2013 13:47:55 +0000 (09:47 -0400)]
PR14927: enable support for SYSTEMTAP_COLORS env var

The new SYSTEMTAP_COLORS environment variable allows users to customize
colors. See the updated man page for more info on the syntax and
behaviour of this new env var.

11 years agoPR14927: elaborate.cxx: change a warning to use print_token()
Jonathan Lebon [Tue, 25 Jun 2013 19:06:41 +0000 (15:06 -0400)]
PR14927: elaborate.cxx: change a warning to use print_token()

To be more consistent with other print_warning() calls in the file,
this warning was changed to use its second overloaded form, in which
the token is given as the second argument. This has for effect to allow
proper pretty printing of the token using print_token(), thus making
sure that the path is not repeated and that output is coloured if
necessary.

11 years agoPR14927: add colorize() functions and colorization mechanism
Jonathan Lebon [Fri, 28 Jun 2013 13:15:08 +0000 (09:15 -0400)]
PR14927: add colorize() functions and colorization mechanism

Added colorization of the following elements:
- Error type (e.g. 'semantic error')
- Source location (e.g. '<input>:1:7')
- Caret ('^')
- Token (the one above the caret)

11 years agoPR14927: lay groundwork for colors
Jonathan Lebon [Fri, 21 Jun 2013 15:34:47 +0000 (11:34 -0400)]
PR14927: lay groundwork for colors

Created a new command-line option '--color' which is capable of taking
in an argument as well. Added a new member 'color_errors' to the
systemtap_session class which gets set upon treating the new switch's
logic. Also created an entry in the man page.

11 years agoPR14927: move parser::print_error() to systemtap_session
Jonathan Lebon [Mon, 24 Jun 2013 18:05:42 +0000 (14:05 -0400)]
PR14927: move parser::print_error() to systemtap_session

The parser::print_error() method was moved from the parser class to the
systemtap_session class in anticipation for colorization. The session
class previously already took care of error printing, except for parser
errors. Making all the error-printing methods part of the same class
will simplify the implementation of colorization.

11 years agoUse explicit sys_utimes functions for at_var.exp
Josh Stone [Fri, 28 Jun 2013 03:01:53 +0000 (20:01 -0700)]
Use explicit sys_utimes functions for at_var.exp

This test wants to access a typed $utimes variable, but on architectures
with HAVE_SYSCALL_WRAPPERS the main sys_utimes has all long arguments.
And starting in 3.10, all archs have syscall wrappers, yay!  For this
test's purposes, it's perfectly fine to use the inline SYSC_utimes where
that exists.

11 years agolinux tapset: new guru-only function raise() to send a signal to current task
Frank Ch. Eigler [Fri, 28 Jun 2013 01:51:40 +0000 (21:51 -0400)]
linux tapset: new guru-only function raise() to send a signal to current task

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