]> sourceware.org Git - systemtap.git/log
systemtap.git
13 years agoMerge branch 'master' of git://sources.redhat.com/git/systemtap
Frank Ch. Eigler [Thu, 21 Jul 2011 00:54:22 +0000 (20:54 -0400)]
Merge branch 'master' of git://sources.redhat.com/git/systemtap

* 'master' of git://sources.redhat.com/git/systemtap:
  Normalize the arch in systemtap_session::clone
  Improved prcwildcard.exp and cmd_parse.exp tests.

Conflicts:
testsuite/systemtap.base/cmd_parse.exp

13 years agotestsuite: testsuite/net/stap server setup
Frank Ch. Eigler [Thu, 21 Jul 2011 00:51:53 +0000 (20:51 -0400)]
testsuite: testsuite/net/stap server setup

* testsuite/lib/systemtap.exp (start_server): Locate
  stap based on $SYSTEMTAP_PATH; plop in $installed_stap.
  (setup_server): Use that location rather than which(1).

13 years agokernel.trace query: linux 3.0 porting and complaining
Frank Ch. Eigler [Thu, 21 Jul 2011 00:43:53 +0000 (20:43 -0400)]
kernel.trace query: linux 3.0 porting and complaining

* tapsets.cxx (tracepoint_extra_decls): Add another few they-live
  entries for linux 3.0.  Still need something for trace/events/napi.h.

* buildrun.cxx (make_tracequery): Lament the possibility of printing
  warnings that don't make much sense, and a user can't fix.

13 years agotestcase: ptridx
Frank Ch. Eigler [Thu, 21 Jul 2011 00:42:43 +0000 (20:42 -0400)]
testcase: ptridx

The ptridx.exp expect regexps neglected to look for the
output of the ptridx program itself, leading to false FAIL:'s

13 years agotestsuite: bump up cmd_parse.exp #8 timeout, explain why it's slow
Frank Ch. Eigler [Thu, 21 Jul 2011 00:42:11 +0000 (20:42 -0400)]
testsuite: bump up cmd_parse.exp #8 timeout, explain why it's slow

13 years agotestsuite: 3.0 kernel nomenclature
Frank Ch. Eigler [Wed, 20 Jul 2011 23:31:25 +0000 (19:31 -0400)]
testsuite: 3.0 kernel nomenclature

cmd_parse15 falsely kfailed on 3.0 due to naive SUBLEVEL parsing.

13 years agoNormalize the arch in systemtap_session::clone
Josh Stone [Wed, 20 Jul 2011 22:39:57 +0000 (15:39 -0700)]
Normalize the arch in systemtap_session::clone

* session.cxx (systemtap_session::clone): Normalize the incoming arch
  name, so it can be consistently compared to both this->architecture
  and other cloned subsessions.

13 years agoImproved prcwildcard.exp and cmd_parse.exp tests.
David Smith [Wed, 20 Jul 2011 21:32:30 +0000 (16:32 -0500)]
Improved prcwildcard.exp and cmd_parse.exp tests.

* testsuite/systemtap.base/prcwildcard.exp: If we're testing a stripped
  stap, don't bother running the function test, which needs debuginfo.
* testsuite/systemtap.base/cmd_parse.exp: Increase timeout.
* testsuite/lib/systemtap.exp (stripped_p): New function to
  determine if an executable is stripped.

13 years agoFix "Unable to shutdown NSS/NSS is not initialized" on RHEL5.
Dave Brolley [Wed, 20 Jul 2011 17:46:08 +0000 (13:46 -0400)]
Fix "Unable to shutdown NSS/NSS is not initialized" on RHEL5.

Could also occur for any build with HAVE_NSS && ! HAVE_LIBRPMIO.
In this case, the rpm finder must attempt to shutdown NSS (sometimes initialized
by librpm) without knowing if it was actually initialized. In this case we
will now tolerate failure to shut down NSS if the error is
SEC_ERROR_NOT_INITIALIZED.

13 years agoPR 12888 - stap-serverd should be weaned from -k
Dave Brolley [Wed, 20 Jul 2011 14:37:54 +0000 (10:37 -0400)]
PR 12888 - stap-serverd should be weaned from -k

- stap-serverd no longer passes -k to stap.
- -k specified on client no longer passed on to stap on the server side.
- -k specified to stap-serverd on startup instructs the server to save
  its temp dir (contains client request and server response).
- server version 1.6 no longer packs uprobes.ko twice, unless the client
  version is < 1.6.
- client version 1.6 looks for uprobes.ko in <response>/stap000000/uprobes
  unless server version is < 1.6.
- Update/modify testsuite.

13 years agoUpdate po files
Lukas Berk [Wed, 20 Jul 2011 15:50:17 +0000 (11:50 -0400)]
Update po files

13 years agoProperly initialize variables
Lukas Berk [Wed, 20 Jul 2011 15:44:36 +0000 (11:44 -0400)]
Properly initialize variables

Static analysis results showed not all variables had been properly
initialized. They have been addressed here.

* loc2c-test.c : locexpr_len
* loc2c.c : bit_offset and bit_size
* mainloop.c : signum
* stap_merge.c : ofp and fp[]
* staprun.c : unsigned i and globbuf.gl_pathc

13 years agoFactor out code to normalize the architecture names and add arm arch
William Cohen [Wed, 20 Jul 2011 14:52:43 +0000 (10:52 -0400)]
Factor out code to normalize the architecture names and add arm arch

A few tests need to know the generic architecture name rather than
the specific variant. This patch factors out the code into
testsuite/lib/systemtap.exp and add entries for the arm architecture
variants.

13 years agoAlways look for .note.stapsdt sections in the main elf file.
Mark Wielaard [Wed, 20 Jul 2011 14:05:31 +0000 (16:05 +0200)]
Always look for .note.stapsdt sections in the main elf file.

In dwflpp::iterate_over_notes we really want the actual elf file,
not the dwarf .debug file.  Older binutils had a bug where they
mangled the SHT_NOTE type during --keep-debug.

13 years agoAdd tapset/arm/aux_syscalls.stp
William Cohen [Tue, 19 Jul 2011 21:38:52 +0000 (17:38 -0400)]
Add tapset/arm/aux_syscalls.stp

The ARM processor needs to have _arch_ptrace_argstr() function defined
so the kernel-debuginfo smoke test used for the "make installcheck" works.

13 years agoDepend on elfutils 0.142+. Remove various workarounds.
Mark Wielaard [Tue, 19 Jul 2011 20:56:17 +0000 (22:56 +0200)]
Depend on elfutils 0.142+. Remove various workarounds.

We really need at least 0.142 to support quick dwarf unwinding.
Also earlier versions had various bugs that we sometimes worked
around, but not always. Which could lead to misterious failures
when a bias was miscalculated.

13 years agoImprove buildid.exp error handling.
David Smith [Tue, 19 Jul 2011 20:15:45 +0000 (15:15 -0500)]
Improve buildid.exp error handling.

* testsuite/systemtap.base/buildid.exp: Once 'error_handler' is called
  cleanup has occurred, so the following objcopy commands will fail.  Just
  return instead.

13 years agoFix test program to include string.h
David Smith [Tue, 19 Jul 2011 18:03:39 +0000 (13:03 -0500)]
Fix test program to include string.h

* testsuite/systemtap.syscall/rt_signal.c: Add missing include so that
  memset() is properly defined.

13 years agoresolve PR12890 vs PR10854 bunfight
Frank Ch. Eigler [Tue, 19 Jul 2011 17:52:58 +0000 (13:52 -0400)]
resolve PR12890 vs PR10854 bunfight

The PR10854 test case uses a tight loop of staprun and a nexted loop
of pkills, written in a way that counts on staprun's pre-PR12890
"insert; unload; retry insert" module-handling heuristic.  With this
heuristic gone (and error messages properly generated), the PR10854
test case goes woozy and hangs in the while { ... pkill ... } tcl
loop.  Now we don't loop in there any more.

13 years agoImprove s390x test results by specifying parameter types.
David Smith [Tue, 19 Jul 2011 15:52:48 +0000 (10:52 -0500)]
Improve s390x test results by specifying parameter types.

* tapset/s390/aux_syscalls.stp: Help the translator out by specifying
  types on '_ptrace_return_arch_prctl_addr' unused parameters.

13 years agoTo avoid problems on s390x, add a 'softirq_action' cast.
David Smith [Tue, 19 Jul 2011 14:39:42 +0000 (09:39 -0500)]
To avoid problems on s390x, add a 'softirq_action' cast.

* tapset/irq.stp: Add 'softirq_action' casts for s390x in softirq.entry
  and softirq.exit.

13 years agoDefine PTRACE_SYSEMU[_SINGLESTEP] if undefined in aux_syscalls.stp.
Mark Wielaard [Tue, 19 Jul 2011 11:28:06 +0000 (13:28 +0200)]
Define PTRACE_SYSEMU[_SINGLESTEP] if undefined in aux_syscalls.stp.

13 years agoWrap ssl using cscommon code in #if HAVE_NSS.
Mark Wielaard [Tue, 19 Jul 2011 10:41:28 +0000 (12:41 +0200)]
Wrap ssl using cscommon code in #if HAVE_NSS.

13 years agoPR10189 and PR12960 build fix
Frank Ch. Eigler [Mon, 18 Jul 2011 21:36:54 +0000 (17:36 -0400)]
PR10189 and PR12960 build fix

* runtime/transport/control.c (stp_ctl_write): Initialize mesg_on_queue.

13 years agoPR12917: build fix for rhel4
Frank Ch. Eigler [Mon, 18 Jul 2011 21:30:04 +0000 (17:30 -0400)]
PR12917: build fix for rhel4

* stap-serverd.cxx (get_stap_locale): unsigned i=-1; not considered
  kosher, rework as plain for loop.

13 years agoi18n testsuite: drop redundant LANG=C from subtests
Frank Ch. Eigler [Mon, 18 Jul 2011 21:29:46 +0000 (17:29 -0400)]
i18n testsuite: drop redundant LANG=C from subtests

13 years agoPR10189 and PR12960 reserve system cmd messages for delivery.
Mark Wielaard [Mon, 18 Jul 2011 18:55:38 +0000 (20:55 +0200)]
PR10189 and PR12960 reserve system cmd messages for delivery.

runtime/transport/control.c kept one pool for all cmd messages that
the module had to deliver to staprun/io.  This pool could become
empty.  This meant essential control message would not be delivered.
Leading to the module not properly starting and/or exiting.

We now set aside buffers for one time messages (STP_START, STP_EXIT,
STP_TRANSPORT, STAP_REQUEST_EXIT) and "overflow" messages that get
delivered whenever one of the dynamically allocated messages cannot
get a free slot from the pool (STP_OOB_DATA - warnings and errors,
STP_SYSTEM and STP_REALTIME_DATA).

The type field is used to mark whether or not a special pre-allocated
buffer is currently unused. This needs careful locking using a new
&_stp_ctl_special_msg_lock that is used in the new helper functions
_stp_ctl_get_buffer and _stp_ctl_free_buffer.

Now when we run out of message buffers we just drop the message and
printk. stapio will have received either the one time message or an
overflow message, there is nothing more we can do.

The STP_DEFAULT_BUFFERS for debugfs.c got decreased again to allow
8 pre-allocated and 32 dynamic (pending) cmd messages.

A new testcase testsuite/systemtap.base/warn_overflow.exp was added.

13 years agoLTTng TMF Custum Text Parser Example
Chris Meek [Mon, 18 Jul 2011 20:39:44 +0000 (16:39 -0400)]
LTTng TMF Custum Text Parser Example

Added proc_snoop_parser to
    src/testsuite/systemtap.examples/process/
Follow the instructions in:
     src/testsuite/systemtap.examples/process/proc_snoop_parser_instructions.txt
to try out the eclipse plugin tracefile parser.

13 years agoPR 13001 - !HAVE_NSS build failures
Dave Brolley [Mon, 18 Jul 2011 20:07:26 +0000 (16:07 -0400)]
PR 13001 - !HAVE_NSS build failures

- Exclude entire functions and classes where possible.
- Reorder items within source files in order to combine conditional
  compilation blocks.

13 years agostaprun STP_OOB_DATA payload.data "WARNING:" prefix shouldn't be translated.
Mark Wielaard [Mon, 18 Jul 2011 14:11:11 +0000 (16:11 +0200)]
staprun STP_OOB_DATA payload.data "WARNING:" prefix shouldn't be translated.

The STP_OOB_DATA payload data prefix "WARNING:" or "ERROR:" is part of
the module cmd protocol.

13 years agoPR12960 Don't msleep in _stp_ctl_send when out of memory.
Mark Wielaard [Fri, 15 Jul 2011 21:54:47 +0000 (23:54 +0200)]
PR12960 Don't msleep in _stp_ctl_send when out of memory.

This is mainly a documentation patch to better explain the transport
layers and the interaction between _stp_ctl_read_cmd, _stp_ctl_send and
_stp_ctl_write.

It also contains the first step to resolve PR12960. The msleep() in
_stp_ctl_send() has been replaced with a loop that checks whether there
are messages on the queue, tries to wake up _stp_ctl_read_cmd so stapio
has a change to read some of the pending messages and a small mdelay
(which is save, because it doesn't actually sleep or schedule). It
only prevents the crash and makes the possibility of loosing control
messages slightly less. A followup patch will introduce special buffers
to hold cannot be lost messages so the module will always be able to
properly shut down.

STP_DEFAULT_BUFFERS for debugfs also got increased a little from 50 to 64.

13 years agosyscall.*execve: Fix argv access on newer kernels
Josh Stone [Fri, 15 Jul 2011 20:47:45 +0000 (13:47 -0700)]
syscall.*execve: Fix argv access on newer kernels

Kernel commits ba2d0162 and 0e028465, merged in 3.0, refactored the
arguments of do_execve and compat_do_execve, such that "__argv"
is now the name of the incoming pointer, and "argv" is a local
struct user_arg_ptr.  Our tapset must adapt to the new names.

* tapset/syscalls.stp (syscall.execve, syscall.compat_execve): Use
  @defined to set an internal local __argv to either $__argv or $argv,
  then use that for the other __get_argv calls.
* testsuite/buildok/twentyseven.stp: Update for $__argv vs. $argv.
* testsuite/systemtap.base/pointer_array.stp: Ditto.

13 years agorhbz717136: Fix SDT relocations in prelinked modules
Josh Stone [Thu, 14 Jul 2011 22:32:42 +0000 (15:32 -0700)]
rhbz717136: Fix SDT relocations in prelinked modules

* tapsets.cxx (sdt_query::handle_probe_entry): The debuginfoless SDT
  addresses are relative to the ELF file, so get only that bias.  The
  DWARF bias is not interesting here.
  (sdt_query::setup_note_probe_entry): Add the ELF bias to the semaphore
  address too, so record_semaphore can completely relocate it.
  (sdt_query::record_semaphore): SDT V3 semaphores need relocation too,
  now removing both the bias and prelinking effects.

13 years agoMove the stapgraph man page to the correct rpm.
David Smith [Fri, 15 Jul 2011 20:16:41 +0000 (15:16 -0500)]
Move the stapgraph man page to the correct rpm.

* systemtap.spec: Move the stapgraph man page to the systemtap-grapher
  sub-rpm.

13 years agoPR 13001 - !HAVE_NSS build failures
Dave Brolley [Fri, 15 Jul 2011 18:42:15 +0000 (14:42 -0400)]
PR 13001 - !HAVE_NSS build failures

Fix the immediate errors.

13 years agoserver_locale.exp: Fixed env setting
Chris Meek [Fri, 15 Jul 2011 15:59:07 +0000 (11:59 -0400)]
server_locale.exp: Fixed env setting

server_locale.exp no longer changes dejagnu's own env vars, only stap's

13 years agoPR12890 cont'd: Added 3 test cases
Chris Meek [Fri, 15 Jul 2011 15:23:09 +0000 (11:23 -0400)]
PR12890 cont'd: Added 3 test cases

1. Basic Stap call
2. Direct Staprun call without -R
3. Direct Staprun call with -R

13 years agotestsuite: more environment setup
Frank Ch. Eigler [Fri, 15 Jul 2011 15:24:27 +0000 (11:24 -0400)]
testsuite: more environment setup

Unload uprobes at beginning to make sure we exercise that
part too.  Set LANG=C for the runtest process hierarchy.

13 years agoCreate dropped file with mode 0400 in relay_v2.c to make it not world readable.
Mark Wielaard [Fri, 15 Jul 2011 15:06:52 +0000 (17:06 +0200)]
Create dropped file with mode 0400 in relay_v2.c to make it not world readable.

13 years agoDocument stp control channel command values under runtime/transport.
Mark Wielaard [Fri, 15 Jul 2011 13:11:41 +0000 (15:11 +0200)]
Document stp control channel command values under runtime/transport.

13 years agostaprun: Only rename the script module, not uprobes
Josh Stone [Thu, 14 Jul 2011 21:03:55 +0000 (14:03 -0700)]
staprun: Only rename the script module, not uprobes

* runtime/staprun/staprun_funcs.c (insert_module): Compare the current
  module to the global modpath to decide if this is one to rename.

13 years agoMerge branch 'master' of git://sourceware.org/git/systemtap
Lukas Berk [Thu, 14 Jul 2011 16:18:07 +0000 (12:18 -0400)]
Merge branch 'master' of git://sourceware.org/git/systemtap

13 years agoAdd cast to function to avoid return check error
Lukas Berk [Thu, 14 Jul 2011 16:14:42 +0000 (12:14 -0400)]
Add cast to function to avoid return check error

* runtime/staprun/staprun.c : add (void) cast

13 years agoUpdate server_locale.exp with newly expected messages.
Dave Brolley [Thu, 14 Jul 2011 15:16:56 +0000 (11:16 -0400)]
Update server_locale.exp with newly expected messages.

13 years agoMerge branch 'master' of git://sourceware.org/git/systemtap
Lukas Berk [Thu, 14 Jul 2011 14:13:45 +0000 (10:13 -0400)]
Merge branch 'master' of git://sourceware.org/git/systemtap

13 years agoRemove unused variable shdr
Lukas Berk [Thu, 14 Jul 2011 14:08:22 +0000 (10:08 -0400)]
Remove unused variable shdr

* runtime/staprun/staprun_funcs.c : removed shdr variable

13 years agoruntime: correct reference to undefined i18n text variable
Frank Ch. Eigler [Thu, 14 Jul 2011 13:37:24 +0000 (09:37 -0400)]
runtime: correct reference to undefined i18n text variable

13 years agoMove non-common items out of nsscommon.cxx and into cscommon.cxx, csclient.cxx and...
Dave Brolley [Wed, 13 Jul 2011 18:46:09 +0000 (14:46 -0400)]
Move non-common items out of nsscommon.cxx and into cscommon.cxx, csclient.cxx and stap-serverd.cxx.

13 years agoupdate-po
Frank Ch. Eigler [Wed, 13 Jul 2011 21:16:46 +0000 (17:16 -0400)]
update-po

13 years agousage message: fix missing \n before --tmpdir=FOO
Frank Ch. Eigler [Wed, 13 Jul 2011 21:16:02 +0000 (17:16 -0400)]
usage message: fix missing \n before --tmpdir=FOO

13 years agostap-serverd.cxx: fix memory and resource leaks
Petr Muller [Wed, 13 Jul 2011 16:41:47 +0000 (18:41 +0200)]
stap-serverd.cxx: fix memory and resource leaks

While playing with cppcheck tool, I found few resource leaks in stap-serverd.cxx:
- handleRequest: arg was not freed if opening/reading argfile failed
- handleRequest: argfile was not fclosed when reading from it failed
- spawn_and_wait: dotfd was not closed if chdir fails (macro expanded to accomodate resource release)
- spawn_and_wait: cleaned some whitespace up around the fix itself

13 years agoPR12890 remote: Heed the capabilities of the other side
Josh Stone [Wed, 13 Jul 2011 20:46:29 +0000 (13:46 -0700)]
PR12890 remote: Heed the capabilities of the other side

If the remote side is < 1.6, then it won't know staprun -R, so we'll
have to live without module renaming on that host.

* buildrun.cxx (make_run_command): Add a version parameter, defaulted to
  the current VERSION.  Don't add -R unless >= 1.6.
* remote.cxx (stapsh::set_child_fds): Save the handshake version.
  (stapsh::start): Pass the remote's version to make_run_command.
  (ssh_legacy_remote::start): Pass version 1.3 to make_run_command,
  treating all "legacy" hosts as somewhat old.

13 years agoPR12998: improve error messages for stapusr-only invocations
Frank Ch. Eigler [Wed, 13 Jul 2011 17:59:37 +0000 (13:59 -0400)]
PR12998: improve error messages for stapusr-only invocations

* session.h (automatic_server_mode): New field.
* session.cxx (check_options): Set it.
* main.cxx (passes_0_4): Give better error messages.
* csclient.cxx (passes_0_4): Ditto.

13 years agoPR12890 con't: Added news and man page entry
Chris Meek [Wed, 13 Jul 2011 17:26:35 +0000 (13:26 -0400)]
PR12890 con't: Added news and man page entry

13 years agoconfigury: Regenerate under F15 tools. Add AC_LANG_SOURCE().
Frank Ch. Eigler [Wed, 13 Jul 2011 17:12:57 +0000 (13:12 -0400)]
configury: Regenerate under F15 tools.  Add AC_LANG_SOURCE().

13 years agoPR12890 cont'd: autoconf elfutils usage in staprun
Frank Ch. Eigler [Wed, 13 Jul 2011 17:07:52 +0000 (13:07 -0400)]
PR12890 cont'd: autoconf elfutils usage in staprun

* configure.ac, Makefile.am: Look for system elfutils.
  Check for modern enough version (0.142+), set HAVE_ELF_GETSHDRSTRNDX.
* staprun_funcs.c (rename_module): Conditionally stub out.
* common.c (usage): Conditionally bury -R flag.
* staprun.cxx (init_staprun): Avoid advising people who can't to use -R.
* configure, config.in, aclocal.m4, Makefile.in: Regenerated on F15.

13 years agotweak comment in get_rawdata usage
Frank Ch. Eigler [Wed, 13 Jul 2011 15:07:03 +0000 (11:07 -0400)]
tweak comment in get_rawdata usage

13 years agoPR12890: Renaming modules in Staprun
Chris Meek [Wed, 13 Jul 2011 14:31:47 +0000 (10:31 -0400)]
PR12890: Renaming modules in Staprun

common.c
    Added '-R' option to staprun. This will instruct
    staprun to automatically rename the module.

buildrun.cxx
    Added '-R' to the options passed to staprun.

staprun_funcs.c
    Added rename_module() function to rename the module,
    When requested. This is called in insert_module().

staprun.c
    Replaced the module name in the arguments list
    passed to stapio with the renamed module name,
    if renamed.

session.cxx
    Added modname_given variable to keep track of whether
    stap was called with '-m'.

13 years agostapsh: Check staprun X_OK and increase error verbosity
Josh Stone [Tue, 12 Jul 2011 19:08:46 +0000 (12:08 -0700)]
stapsh: Check staprun X_OK and increase error verbosity

* runtime/staprun/stapsh.c (do_run): Explicitly check that we have
  execute permissions on staprun before spawning, so we can give a
  better error message than just a non-zero status code.
* remote.cxx (stapsh::send_file): Report errors with any verbosity.
  (stapsh::start): Report errors with any verbosity, and close handles
  on failure so we don't try to wait for further activity.

13 years agoAdded news for pr12729
Lukas Berk [Tue, 12 Jul 2011 19:13:09 +0000 (15:13 -0400)]
Added news for pr12729

13 years agoPR12729: Improve stap error message
Lukas Berk [Tue, 12 Jul 2011 19:06:09 +0000 (15:06 -0400)]
PR12729: Improve stap error message

Now report when the user doesn't have permission to run staprun
or if posix_spawnp is unable to launch the process

remote.cxx - finish now reports failure to launch
trycatch.exp - account for the new warning
util.cxx - report if staprun isn't executable or if stap_waitpid failed

13 years agoPR6954 Add a used variables set for use by automatic global printing.
Stan Cox [Tue, 12 Jul 2011 02:25:42 +0000 (22:25 -0400)]
PR6954 Add a used variables set for use by automatic global printing.

* staptree.h (varuse_collecting_visitor::used): New.
* staptree.cxx (varuse_collecting_visitor::visit_symbol): Use previous
  method for setting read and write sets.  Also set used set.
* elaborate.cxx (add_global_var_display): Use the used set.
* global_end.exp (global_end_var): Initialize to non-zero values.
* global_end.stp (global_end_var): Likewise.

13 years agoFix a kernel 2ism in the testsuite
Josh Stone [Tue, 12 Jul 2011 00:11:19 +0000 (17:11 -0700)]
Fix a kernel 2ism in the testsuite

13 years agoPR12729: remove one unneded stap_system invocation
Frank Ch. Eigler [Mon, 11 Jul 2011 21:59:34 +0000 (17:59 -0400)]
PR12729: remove one unneded stap_system invocation

lberk found that this function normally produces failing stap_system
calls, which are not going to be silent for much longer.

* buildrun.cxx (kernel_built_uprobes): Simplify.

13 years ago"const int" should just be "int".
William Cohen [Fri, 8 Jul 2011 15:43:37 +0000 (11:43 -0400)]
"const int" should just be "int".

13 years agoBZ719966: spec file: require matching rpm v-r amongst runtime/server/etc.
Frank Ch. Eigler [Fri, 8 Jul 2011 15:38:06 +0000 (11:38 -0400)]
BZ719966: spec file: require matching rpm v-r amongst runtime/server/etc.

13 years agoPR 12917 - Implement Compile-Server/Client Versioning - Rework
Dave Brolley [Fri, 8 Jul 2011 14:54:38 +0000 (10:54 -0400)]
PR 12917 - Implement Compile-Server/Client Versioning - Rework

- Prefer newer servers when selecting servers from a list.

13 years agoPR 12917 - Implement Compile-Server/Client Versioning - Rework
Dave Brolley [Fri, 8 Jul 2011 14:53:49 +0000 (10:53 -0400)]
PR 12917 - Implement Compile-Server/Client Versioning - Rework

- cscommon.cxx: New file for common function used by client and server.

13 years agoPR 12917 - Implement Compile-Server/Client Versioning - Rework
Dave Brolley [Thu, 7 Jul 2011 16:22:04 +0000 (12:22 -0400)]
PR 12917 - Implement Compile-Server/Client Versioning - Rework

- Use systemtap version number as the client/server protocol version
  number.
- Client and Server will both be backward compaible with the other
  by policy. i.e. both will adapt when connecting to a down-level
  version of the other.

13 years agounwind.c consolidate sanity checking and cie/fde parsing.
Mark Wielaard [Fri, 8 Jul 2011 14:53:10 +0000 (16:53 +0200)]
unwind.c consolidate sanity checking and cie/fde parsing.

Checking and parsing of FDE and CIE data was done in multiple places in
the code, some things were checked/parsed multiple times. Now is_fde()
and cie_for_fde() do the structural/id/version checking of FDEs
and CIEs. parse_fde_cie() parses the content of and checks the internal
consistency the CIEs and FDEs.

unwind.h: Removed now unused fields of struct unwind_state.
And removed unnecessary static function prototype declarations.

13 years agospec: include README.unprivileged and README.security someplace
Frank Ch. Eigler [Fri, 8 Jul 2011 01:36:52 +0000 (21:36 -0400)]
spec: include README.unprivileged and README.security someplace

13 years agoserverd: Fix the locale regex to allow '-' and not a range
Josh Stone [Fri, 8 Jul 2011 01:26:28 +0000 (18:26 -0700)]
serverd: Fix the locale regex to allow '-' and not a range

[.-=] allows all characters from '.' to '=', 0x2E-0x3D
[.=-] allows exactly the characters '.' '=' '-'

The server_locale.exp test is supposed to check that '-' is allowed,
but its failure was incorrectly masked in commit 16560657.  Added a
different disallowed character ';' to test as well.

13 years agotestsuite: CLONE_FOO flags need _GNU_SOURCE
Josh Stone [Fri, 8 Jul 2011 00:44:34 +0000 (17:44 -0700)]
testsuite: CLONE_FOO flags need _GNU_SOURCE

13 years agoPR5163: Cache uprobes.ko as we do with everything else
Josh Stone [Tue, 21 Jun 2011 18:12:36 +0000 (11:12 -0700)]
PR5163: Cache uprobes.ko as we do with everything else

We now build uprobes in our writable tmpdir (rather than directly in
SYSTEMTAP_RUNTIME), and cache the result for reuse.  This relieves the
pain of having to rebuild uprobes after every kernel change, and also
makes it possible to provide uprobes for multiple unique targets, as
needed for the compiler server and for remoting.

* buildrun.cxx (make_make_cmd): New, consolidate repeated code.
  (compile_pass, make_tracequery, make_typequery_kmod): Use it.
  (make_uprobes): Rewrite to build uprobes.ko under the tmpdir, just
  using a #include to the main uprobes.c in the runtime.
  (get_cached_uprobes, set_cached_uprobes): Read/write uprobes cache.
  (uprobes_pass): Try to cache, then build if necessary.
  (may_build_uprobes, verify_uprobes_uptodate, copy_uprobes_symbols):
  Removed.
* hash.cxx (find_uprobes_hash): Prepare a hashed name for uprobes.
* main.cxx (passes_0_4): If the script was cached, make sure we still
  find or build uprobes if needed too.
* stap-serverd.cxx (handleRequest): Get uprobes from the tmpdir rather
  than from the runtime path, and sign it directly if needed.
* testsuite/lib/systemtap.exp (uprobes_p): Don't build uprobes here.
* testsuite/systemtap.base/buildid.exp: Launch a dummy pass-5 run, so we
  don't have to worry about providing a path to staprun -u.

13 years agoPR6954 Do automatic global printing for RMW operands.
Stan Cox [Fri, 8 Jul 2011 01:41:14 +0000 (21:41 -0400)]
PR6954 Do automatic global printing for RMW operands.

* staptree.h (current_lvalue_read):  New.
* staptree.cxx (varuse_collecting_visitor::visit_symbol): Do not
   treat an RMW symbol as read if the value is not a real rvalue.
  (varuse_collecting_visitor::visit_print_format): Handle current_lvalue_read.
  (varuse_collecting_visitor::visit_assignment): Likewise.
  (varuse_collecting_visitor::visit_delete_statement): Likewise.

* global_end.exp (global_end_var): Test RMW cases.
* global_end.stp (global_end_var): Likewise.

13 years agounwind.h remove unused struct unwind_table root_table.
Mark Wielaard [Thu, 7 Jul 2011 12:02:23 +0000 (14:02 +0200)]
unwind.h remove unused struct unwind_table root_table.

13 years agounwind.c remove unused structs and code.
Mark Wielaard [Thu, 7 Jul 2011 11:46:18 +0000 (13:46 +0200)]
unwind.c remove unused structs and code.

Removed struct eh_frame_hdr_table_entry, cmp_eh_frame_hdr_table_entries
and swap_eh_frame_hdr_table_entries.

13 years agoFixed BZ709190 to avoid crashes during NFS tracing.
David Smith [Thu, 7 Jul 2011 16:39:44 +0000 (11:39 -0500)]
Fixed BZ709190 to avoid crashes during NFS tracing.

* runtime/addr-map.c: Changed 'addr_map_lock' from a spinlock to a rwlock
  to allow more simultaneous readers.

13 years agoMake the messages clearer for hw_watch_sym.stp and hw_watch_addr.stp.
William Cohen [Thu, 7 Jul 2011 14:15:12 +0000 (10:15 -0400)]
Make the messages clearer for hw_watch_sym.stp and hw_watch_addr.stp.

13 years agoSilence sys/sdt.h comparison of unsigned expression < 0 is always false.
Mark Wielaard [Wed, 6 Jul 2011 21:07:51 +0000 (23:07 +0200)]
Silence sys/sdt.h comparison of unsigned expression < 0 is always false.

Some arm g++ setups would complain about the wchar_t "signedness detection":
sys/sdt.h:102: error: comparison of unsigned expression < 0 is always false

jistone said: "((T)(-1) < 1)" would still get the right boolean value,
and shouldn't trigger range errors like "unsigned is never < 0".

13 years agoUpdate the examples list
William Cohen [Wed, 6 Jul 2011 15:56:15 +0000 (11:56 -0400)]
Update the examples list

13 years agoPR12947 - Add some examples to execise the probes for hardware breakpoints
William Cohen [Wed, 6 Jul 2011 15:52:33 +0000 (11:52 -0400)]
PR12947 - Add some examples to execise the probes for hardware breakpoints

13 years agoPR 12955 - unprivileged mode elaboration in man pages etc
Dave Brolley [Wed, 6 Jul 2011 14:26:52 +0000 (10:26 -0400)]
PR 12955 - unprivileged mode elaboration in man pages etc

Document the actual restrictions enforced at translation time and at
run time for unprivileged users.

13 years agoPR12947 Properly track the creation of probes using hardware breakpoints
William Cohen [Wed, 6 Jul 2011 14:06:42 +0000 (10:06 -0400)]
PR12947 Properly track the creation of probes using hardware breakpoints

The logic for creation of probes using hardware breakpoints was incorrect.
The register_wide_hw_breakpoint() can return error codes in place of the
pointer. The value of the pointer needs to be checked to determine
whether it is the range of values indicating an error. The setup
code also needs to properly track whether the registration was completed
on a probe, so the shutdown code only calls unregister_wide_breakpoint()
for the probes that are actually registered.

13 years agounwind.c fde_pointer_type fix (fake) 'P' encoding type value reading.
Mark Wielaard [Wed, 6 Jul 2011 10:56:46 +0000 (12:56 +0200)]
unwind.c fde_pointer_type fix (fake) 'P' encoding type value reading.

We are not actually interested in the personality routine value,
so don't try to deref (which will usually fail). Mask off DW_EH_PE_indirect.

13 years agoruntime/unwind split fde/cie parsing.
Mark Wielaard [Tue, 5 Jul 2011 21:06:52 +0000 (23:06 +0200)]
runtime/unwind split fde/cie parsing.

Split parsing/sanity checking of fde and cie. This removes the bad_cie
and not_fde statics. is_fde will just return NULL and produce a warning.

13 years agounwind.c Only do a linear search if there isn't a search header.
Mark Wielaard [Tue, 5 Jul 2011 15:25:23 +0000 (17:25 +0200)]
unwind.c Only do a linear search if there isn't a search header.

There always should be one, we create it in the translator
if it didn't exist. Only if we are using elfutils < 0.142
should these ever be missing. If the binary search fails,
either because the unwind data is bad, or the address isn't
covered, don't fall back to linear searching. Add extra
checks and warning about bad debug frame header.

13 years agoREADME updates
Frank Ch. Eigler [Tue, 5 Jul 2011 21:01:05 +0000 (17:01 -0400)]
README updates

include new utrace URL, switch away from sudo, clarify stapusr/unprivileged mode

13 years agosome README additions
Daniel Migault [Tue, 5 Jul 2011 20:58:35 +0000 (16:58 -0400)]
some README additions

13 years agoPR13419: update rep_ret test case
Frank Ch. Eigler [Mon, 4 Jul 2011 20:41:42 +0000 (16:41 -0400)]
PR13419: update rep_ret test case

repnz;ret has been accepted since commit 9ee518c4d

13 years agounwind.c fix CIE augmentation parsing.
Mark Wielaard [Fri, 1 Jul 2011 17:33:02 +0000 (19:33 +0200)]
unwind.c fix CIE augmentation parsing.

fde_pointer_type and unwind_frame didn't handle the "S" augmentation
properly. This augmentation doesn't cary any extra data and so does
not need to be preceded by "z". Also added more sanity checking,
plus _stp_warn explanations when things go wrong/doesn't parse.

13 years agoHandle CIE and FDE CFI sequentially in unwind.c instead of recursively.
Mark Wielaard [Thu, 30 Jun 2011 12:14:14 +0000 (14:14 +0200)]
Handle CIE and FDE CFI sequentially in unwind.c instead of recursively.

Another simple unwind.c cleanup to make reasoning about the unwind state
easier, and to remove another (useless) recursive call. Also fixes CIE/FDE
comment mixup.

13 years agoRefactor DW_CFA_remember/restore_state handling in unwind.c.
Mark Wielaard [Wed, 29 Jun 2011 15:20:30 +0000 (17:20 +0200)]
Refactor DW_CFA_remember/restore_state handling in unwind.c.

The old way of handling DW_CFA_restore_state involved recursively
calling processCFI() to replay the whole CFI stream up till the last
DW_CFA_remember_state instruction. This made it hard to reason about
the actual unwind state and could lead to processing the CFI stream
multiple times. In exchange for a little extra memory allocated upfront
to keep a small stack of register states we now just process all CFI in
one go. This change also splits out the unwind_reg_state from the
general unwind_state struct.

13 years agoSlightly improved runtime/unwind.c debug output.
Mark Wielaard [Mon, 27 Jun 2011 13:12:04 +0000 (15:12 +0200)]
Slightly improved runtime/unwind.c debug output.

13 years agoProperly report the return code (rc) for registered hw breakpoint (PR12947)
William Cohen [Wed, 29 Jun 2011 19:32:41 +0000 (15:32 -0400)]
Properly report the return code (rc) for registered hw breakpoint (PR12947)

In the case of an error, the return code (rc) was not set when
registering a hw breakpoint. This lead to the the SystemTap instrumentation
module trying to unregister a non-existant hw breakpoint and causing a
kernel oops.  This patch ensure that the return code (rc) is set
and errors in hw breakpoint registration are handled correctly.

13 years agocheck_groups cleanup in staprun.
Dave Brolley [Tue, 28 Jun 2011 21:33:48 +0000 (17:33 -0400)]
check_groups cleanup in staprun.

- Remove unused extern "unprivileged_user'
- Correct error messages about which group memberships are necessary.
  - Messages did not specify that stapusr is required if not root.

13 years agoUpdate client/server actions for protocol version 1.1.
Dave Brolley [Tue, 28 Jun 2011 18:21:07 +0000 (14:21 -0400)]
Update client/server actions for protocol version 1.1.

13 years agoPR 12917 - Implement Compile-Server/Client Versioning: Part 2
Dave Brolley [Tue, 28 Jun 2011 18:10:26 +0000 (14:10 -0400)]
PR 12917 - Implement Compile-Server/Client Versioning: Part 2

- Compile server advertises its protocol version using avahi.
- Client will not automatically choose an incompatible server.

13 years agoAllow the compile-server server to return error messages to the client.
Dave Brolley [Mon, 27 Jun 2011 21:01:28 +0000 (17:01 -0400)]
Allow the compile-server server to return error messages to the client.

- Update affacted test cases.

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
Dave Brolley [Mon, 27 Jun 2011 16:34:52 +0000 (12:34 -0400)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

Conflicts:
stap-serverd.cxx

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