This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/17696] Systemtap fails to find kernel tracepoints when kernel is built in a separate directory from source tree
- From: "zhuo at bitoasis dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 09 Jan 2015 12:45:36 +0000
- Subject: [Bug runtime/17696] Systemtap fails to find kernel tracepoints when kernel is built in a separate directory from source tree
- Auto-submitted: auto-generated
- References: <bug-17696-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17696
--- Comment #2 from Zhuo QL <zhuo at bitoasis dot com> ---
(In reply to Josh Stone from comment #1)
> Please let me know if this commit fixed it for you:
>
> commit b19a43768009076de3aea638922dfaebb687e3e9
> Author: Josh Stone <jistone@redhat.com>
> Date: Thu Jan 8 14:47:20 2015 -0800
>
> Use the kernel source symlink for tracepoints
>
> When the source symlink is different than the build symlink, as for
> out-of-tree kernel builds and Debian linux-headers, then we should use
> that path as a prefix for finding tracepoint headers.
Thanks for your work, it works well with the debian system provided kernel!
But, it still does not work with my self-built kernel(built with a seperate
KBUILD_OUTPUT).
I read the lines around your commit and some logs, then found line 11132 of
tapsets.cxx:
const char* name = dwarf_formstring (dwarf_attr (cudie, DW_AT_comp_dir,
&attr));
Here we still get the dir to /lib/modules/${uname -r}/build under this
situation.
----------8<-------------
diff --git a/tapsets.cxx b/tapsets.cxx
index 85fd76b..1b82f55 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -11153,7 +11153,8 @@ tracepoint_builder::init_dw(systemtap_session& s)
}
// find kernel_source_tree from a source link, when different from build
- if (s.kernel_source_tree == "" && endswith(s.kernel_build_tree, "/build"))
+ if ((s.kernel_source_tree == "" || endswith(s.kernel_source_tree, "/build"))
+ && endswith(s.kernel_build_tree, "/build"))
{
string source_tree = s.kernel_build_tree;
source_tree.replace(source_tree.length() - 5, 5, "source");
---------->8--------------
This patch fixes it, could you consider applying it?
Thanks again.
--
You are receiving this mail because:
You are the assignee for the bug.