because the compiler will fail with the above semantic error on the
function scsi_end_bidi_request. It seems looking through the dwarf that
this function is fully inlined and thus has no entrypc to catalogue.
The solution therefore seems to simply return DWARF_CB_OK when we find
such functions and continue cataloguing all the ones that do actually
have non-inline versions.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Phil Muldoon [Tue, 22 Jul 2008 12:22:23 +0000 (13:22 +0100)]
Fix sw 6752. Alter condtional to check for >= 2.6.26. This accounts and fixes false positives in kernel_v strings that return xx.xx.xx.xx over xx.xx.xx.
David Smith [Mon, 21 Jul 2008 15:17:19 +0000 (10:17 -0500)]
No longer allocates structure used to save vma information.
2008-07-21 David Smith <dsmith@redhat.com>
* task_finder_vma.c (__stp_tf_vma_initialize): New function to
initialize the free list.
(__stp_tf_vma_put_free_entry): Puts a vma entry back on the free
list.
(__stp_tf_add_vma): Instead of allocating a vma entry, grab one
from the free list by calling __stp_tf_vma_put_free_entry().
(__stp_tf_remove_vma_entry): Instead of freeing a vma entry, call
__stp_tf_vma_put_free_entry() to put it on the free list instead.
* task_finder.c (stap_start_task_finder): Calls
__stp_tf_vma_initialize().
James Bottomley [Mon, 14 Jul 2008 21:49:00 +0000 (16:49 -0500)]
fix missing functions in caches
Both the inline and non inline filtered function caches can lose
functions. This happens because both of these caches are indexed by the
entrypc. However, the vagaries of optimisation can actually cause us to
end up with two functions with apparently the same entrypc (mainly
because for inline functions, the entrypc has to be deduced from the
range of addresses, which is nastily heuristic).
A nice example of this is bsg_io_schedule. In my build of 2.6.26 it's a
static function transformed to an inline by the compiler. The range
deduction of its entrypc ends up being identical to that of bsg_release,
so when I try to place a probe inside it, none of the function
references actually refers to it.
Since nothing ever actually makes use of this index, the fix is simple:
don't use a map indexed on the entrypc, use a simple vector.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
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.