Merge commit 'origin/master' into pr6429-comp-unwindsyms
* commit 'origin/master':
fix shutdown race condition for scripts that might exit during begin probes
Fix PR 6732: Add runtime/autoconf-real-parent.c check for task_struct field.
clarify dejagnu test case name for empty-struct changes
add changelog entries for last two changes
Add test suite for declaration resolution
Fix semantic error: empty struct
Add hack to support git 1.6 in git_version.sh
Sync latest fix for git_version.sh from RadeonHD's tree
Slightly cleanup code of translate.cxx
PR2111: add general blurbage to stapprobes.5 on syscalls tapset
Use `uname -rvm` for checking system compatibility. Generate
Add section to stapex manual page on how installed examples are documented.
Install examples, demos and samples.
Install tutorial and langref manuals.
James Bottomley [Tue, 8 Jul 2008 17:38:58 +0000 (12:38 -0500)]
Add test suite for declaration resolution
This adds the test declaration.exp which checks that specific named
declarations inside the kernel both fail and succeed. We get the
failure by only using a single compile unit which is currently known
to have the structure stubbed. We get exactly the same declaration to
succeed by adding a CU that is known to have the declaration.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James Bottomley [Tue, 8 Jul 2008 21:45:16 +0000 (16:45 -0500)]
Fix semantic error: empty struct
On Tue, 2008-07-08 at 14:57 -0400, Frank Ch. Eigler wrote:
> Hi -
>
> > you need a global cache for resolution ... it's not tied to any local
> > class instance. For class dwflpp it probably doesn't matter, since that
> > class is effectively static (by its survival for a session) but
> > logically because the DW_AT_declaration resolution is global, so should
> > the cache that does it.
>
> .. except it's not actually global, in that the kernel is not the only
> code that will go through the dwarf family of probe processors -
> user-space dwarf files are coming its way soon. Plus, if in the
> future the systemtap frontend attempts distributed probing of multiple
> target systems concurrently, "global" will be even more local.
In that context its as global as a lot of the other static data in that
structure (like this_session) which would also have to be fixed to do a
multiple target system.
Regardless, it can become per instance: it will only screw up if dwflpp
moves to being short lived.
This is needed now for people who are running the "master" branch of
git, which is currently in development for git version 1.6.0.
This is a kludge to support hyphenated git commands (i.e.,
git-diff-files), but this form is explicitly deprecated, and doesn't
work in git 1.6 unless you put git's execdir (obtained via git
--exec-path) in your PATH environment variable. Even then, these
programs may no longer exist future versions of git. It would be
better to change the script to use "git diff-files", et. al., but I
assume upstream had some vaguely justifiable reason for not writing
the script that way. I'll let them decide when they are willing to
fix the script the right way, even if it means breaking compatibility
for some ancient version of git. n.b., git 1.5.0 was released
February 2007, and git 1.4.0 was released June, 2006.
Merge commit 'origin/master' into pr6429-comp-unwindsyms
* commit 'origin/master':
ubuntu (2.6.24-16-server) kernel compatibility fix
client/server take 2. See bz6565.
Add functioncallcount.meta and functioncallcount.stp.
Add para-callgraph.stp and para-callgraph.meta.
Fixed __stp_get_mm_path() error return code.
diagnostics improvement: print arch/mach at top if -vv
Make _vfs.generic_commit_write only for kernel<=2.6.25
Handles "mortally wounded" threads correctly when detaching.
further clarify that elfutils need not be absolutely freshest, nor rebuilt every time
point out releases/ directory; clarify optionality of elfutils bundling
Add auto_free_ref to auto_free stuff; bug 6694
David Smith [Mon, 30 Jun 2008 18:23:58 +0000 (13:23 -0500)]
Handles "mortally wounded" threads correctly when detaching.
2008-06-30 David Smith <dsmith@redhat.com>
* task_finder.c (stap_utrace_detach_ops): Removed check to see if
thread has a mm (in the case where a thread isn't quite dead
yet).
(stap_utrace_attach): Minor error handling improvement.
(__stp_utrace_attach_match_tsk): Ditto.
Frank Ch. Eigler [Sat, 28 Jun 2008 01:45:37 +0000 (21:45 -0400)]
Merge commit 'origin/master' into pr6429-comp-unwindsyms
* commit 'origin/master':
Always include libdw using link groups.
Fix bug in handling process(PID) probes.
Added tests for 'process(PID)' variants.
This commit makes changes to the VFS tapset. The changes include deprecation of
syscalls2.stp: Add sys_renameat.
Only probe lines once for the :* wildcard line pattern.
Revert checking address in runtime
bz451707: fix conversions.exp test $name
Cleanup in tapsets.cxx
Added powerpc support to runtime/syscall.h.
Remove validating _stext due to many aliased symbols
PR6646: Add checking address in runtime
Fixed offset argument to vm_callback.
Josh Stone [Fri, 27 Jun 2008 23:19:19 +0000 (16:19 -0700)]
Always include libdw using link groups.
This is necessary for distros that ship static libdw, Roland suggested
that it shouldn't hurt to do it this way on other distros too. It's
nicer now not to require the extra "--enable-staticdw" configure flag.
root [Fri, 27 Jun 2008 08:27:52 +0000 (13:57 +0530)]
This commit makes changes to the VFS tapset. The changes include deprecation of
some old probe points to older versions of kernel, adding new helper C functions
and probe points for the VFS subsystem. A new testcase is created for the VFS
tapset which performs a compile test (i.e. up4) on the probe points to verify
sanity. These details can also be found in the ChangeLog.
Frank Ch. Eigler [Mon, 23 Jun 2008 21:50:40 +0000 (17:50 -0400)]
Merge commit 'origin/pr6429-comp-unwindsyms' into pr6429-comp-unwindsyms
* commit 'origin/pr6429-comp-unwindsyms':
utrace process("PATH") also populate session unwindsym_modules
populate sess.unwindsym_modules set from dwarf probes
add module-name vector to session object, command line arguments
David Smith [Mon, 23 Jun 2008 19:42:03 +0000 (14:42 -0500)]
Made RHEL5 changes.
2008-06-23 David Smith <dsmith@redhat.com>
* task_finder_vma.c (__stp_tf_vma_hash): Improved determination of
whether this is a 64-bit platform.
* syscall.h: Handles kernels with older style register
definitions.
David Smith [Mon, 23 Jun 2008 17:41:45 +0000 (12:41 -0500)]
Major update to memory map change notification code.
2008-06-23 David Smith <dsmith@redhat.com>
* tapsets.cxx (utrace_derived_probe_group::emit_probe_decl):
Handles UDPF_NONE value.
(utrace_derived_probe_group::emit_vm_callback_probe_decl): New
function.
(utrace_derived_probe_group::emit_module_decls): Calls
emit_vm_callback_probe_decl() to set up vm_callbacks.
2008-06-23 David Smith <dsmith@redhat.com>
* task_finder.c (__stp_tf_vm_cb): New function.
(stap_register_task_finder_target): Sets up syscall entry and
syscall exit handlers.
(__stp_find_file_based_vma): New function.
(__stp_utrace_task_finder_target_syscall_entry): New function.
Saves vma information off at syscall entry.
(__stp_target_call_vm_callback): New function.
(__stp_utrace_task_finder_target_syscall_exit): New function.
Handles changes to memory maps based on information saved at
syscall entry.
* syscall.h: New file containing syscall function.
* task_finder_vma.c: New file containing saved vma information
handling functions.
Josh Stone [Thu, 19 Jun 2008 00:07:15 +0000 (17:07 -0700)]
New optimization to break up statements in void contexts.
PR 6644
* elaborate.cxx (dead_stmtexpr_remover::visit_block): Flatten nested
block statements into a single block.
(dead_stmtexpr_remover::visit_if_statement): Remove the possibility
of if_statements with a null thenblock. When an if lacks both then
and else, either remove it completely or reduce it to a simple
statment evaluating the condition. With an else and no then, invert
the condition and else becomes then.
(void_statement_reducer): New optimization visitor that breaks
statements in void context into smaller pieces, to expose more
optimization opportunities.
(semantic_pass_opt5, semantic_pass_opt6): Bump opt5 to opt6, and
create a new opt5 that runs through void_statement_reducer.
David Smith [Tue, 17 Jun 2008 14:19:24 +0000 (09:19 -0500)]
Got smarter on which utrace events to set on a newly found thread.
2008-06-17 David Smith <dsmith@redhat.com>
* task_finder.c (__stp_utrace_attach_match_filename): Uses new
__STP_ATTACHED_TASK_EVENTS macro to determine which events to set
on a newly found process based on whether the
stap_task_finder_target structure has a vm_callback defined.
(stap_start_task_finder): Ditto.