* Re: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9.8-184-gf982c59
[not found] <20090721012207.17368.qmail@sourceware.org>
@ 2009-07-21 11:19 ` Mark Wielaard
2009-07-22 2:40 ` Josh Stone
0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2009-07-21 11:19 UTC (permalink / raw)
To: systemtap; +Cc: Josh Stone
Hi Josh,
On Tue, 2009-07-21 at 01:22 +0000, jistone@sourceware.org wrote:
> commit 0c16d51256bc77c2b5497b72ec43b7864d2b47a8
> Author: Josh Stone <jistone@redhat.com>
> Date: Mon Jul 20 16:32:33 2009 -0700
>
> Allow dwflpp to take a vector of module names
>
> This will be used to load tracepoint modules as a bunch of little query
> modules into a single dwflpp.
>
> * dwflpp.cxx (setup_user): take a vector instead of a single module
> (dwflpp::dwflpp): form a vector in the singular case, and add a
> variant that takes and passes through a vector of modules.
This breaks user space mark probing. See make installcheck
RUNTESTFLAGS="sdt.exp exelib.exp" for example.
Most stuff will fail with "semantic error: libdwfl failure
(getshdrstrndx): no error while resolving probe point"
Which comes from dwarf_builder::probe_table::probe_table().
What goes wrong is that probe_table will try to fetch the probe table
(initiated through dwarf_builder::build) from the dw module (initialized
through dw = get_user_dw(sess, module_name)), if (get_param(parameters,
TOK_MARK, mark_name)). But at that point dw->module isn't setup yet.
I am not completely sure how to correct this.
The following hack makes things work as before:
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 0bba3f1..38be86b 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -418,6 +418,7 @@ dwflpp::setup_user(const vector<string>& modules, bool debug
module_name.c_str(),
-1);
// XXX: save mod!
+ module = mod;
if (debuginfo_needed)
dwfl_assert (string("missing process ") +
That works, since it mimics what happened before your patch. And because
there is really only one module name in the vector anyway.
I checked it in so things at least work again for now.
But it seems there must be a better/more elegant solution.
Cheers,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9.8-184-gf982c59
2009-07-21 11:19 ` [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9.8-184-gf982c59 Mark Wielaard
@ 2009-07-22 2:40 ` Josh Stone
0 siblings, 0 replies; 2+ messages in thread
From: Josh Stone @ 2009-07-22 2:40 UTC (permalink / raw)
To: Mark Wielaard; +Cc: systemtap
On 07/21/2009 04:18 AM, Mark Wielaard wrote:
> Hi Josh,
>
> On Tue, 2009-07-21 at 01:22 +0000, jistone@sourceware.org wrote:
>> commit 0c16d51256bc77c2b5497b72ec43b7864d2b47a8
>> Author: Josh Stone <jistone@redhat.com>
>> Date: Mon Jul 20 16:32:33 2009 -0700
>>
>> Allow dwflpp to take a vector of module names
>>
>> This will be used to load tracepoint modules as a bunch of little query
>> modules into a single dwflpp.
>>
>> * dwflpp.cxx (setup_user): take a vector instead of a single module
>> (dwflpp::dwflpp): form a vector in the singular case, and add a
>> variant that takes and passes through a vector of modules.
>
> This breaks user space mark probing. See make installcheck
> RUNTESTFLAGS="sdt.exp exelib.exp" for example.
>
> Most stuff will fail with "semantic error: libdwfl failure
> (getshdrstrndx): no error while resolving probe point"
> Which comes from dwarf_builder::probe_table::probe_table().
> What goes wrong is that probe_table will try to fetch the probe table
> (initiated through dwarf_builder::build) from the dw module (initialized
> through dw = get_user_dw(sess, module_name)), if (get_param(parameters,
> TOK_MARK, mark_name)). But at that point dw->module isn't setup yet.
Clearly I didn't test the userspace stuff. :( But as always, thanks for
being an excellent watchdog, Mark!
> I am not completely sure how to correct this.
> The following hack makes things work as before:
>
> diff --git a/dwflpp.cxx b/dwflpp.cxx
> index 0bba3f1..38be86b 100644
> --- a/dwflpp.cxx
> +++ b/dwflpp.cxx
> @@ -418,6 +418,7 @@ dwflpp::setup_user(const vector<string>& modules, bool debug
> module_name.c_str(),
> -1);
> // XXX: save mod!
> + module = mod;
>
> if (debuginfo_needed)
> dwfl_assert (string("missing process ") +
>
> That works, since it mimics what happened before your patch. And because
> there is really only one module name in the vector anyway.
>
> I checked it in so things at least work again for now.
> But it seems there must be a better/more elegant solution.
I just checked in a rework to make SDT behave more like the other dwarf
queries that we have. Now it will iterate over whatever modules are
present (all one of them). Hopefully that's a little more elegant for
you... :)
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-22 2:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20090721012207.17368.qmail@sourceware.org>
2009-07-21 11:19 ` [SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-0.9.8-184-gf982c59 Mark Wielaard
2009-07-22 2:40 ` Josh Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).