* [Bug translator/10820] New: stap -L should take varaible location list into account
@ 2009-10-21 11:38 mjw at redhat dot com
2009-10-21 12:51 ` [Bug translator/10820] " eteo at redhat dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: mjw at redhat dot com @ 2009-10-21 11:38 UTC (permalink / raw)
To: systemtap
Sometimes you believe a variable is available with -L, but then it turns out the
location list for that variable doesn't actually cover the address that we will
place the probe on.
For example:
$ stap -L 'kernel.function("tc_fill_tclass")'
kernel.function("tc_fill_tclass@net/sched/sch_api.c:990") $skb:struct sk_buff*
$q:struct Qdisc* $cl:long unsigned int $pid:u32 $seq:u32 $flags:u16 $event:int
$tcm:struct tcmsg* $nlh:struct nlmsghdr* $b:unsigned char* $d:struct gnet_dump
$cl_ops:struct Qdisc_class_ops*
But then when we try to actually query $tcm we get:
semantic error: not accessible at this address (0xffffffff80239505): identifier
'$tcm' at <input>:1:96
source: probe kernel.function("tc_fill_tclass").return {
printf("pid=%d, cl=%d, tcm=%p.\n", $pid, $cl, $tcm-) }
Which is indeed correct, the location list for tcm says:
0048393a ffffffff802395a2 ffffffff80239643 (DW_OP_reg6)
0048393a ffffffff802396aa ffffffff80239719 (DW_OP_reg6)
So it isn't available at the (function entry) probe address.
--
Summary: stap -L should take varaible location list into account
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: mjw at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
@ 2009-10-21 12:51 ` eteo at redhat dot com
2009-10-28 8:08 ` wenji dot huang at oracle dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: eteo at redhat dot com @ 2009-10-21 12:51 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |eteo at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
2009-10-21 12:51 ` [Bug translator/10820] " eteo at redhat dot com
@ 2009-10-28 8:08 ` wenji dot huang at oracle dot com
2009-10-28 16:49 ` fche at redhat dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-10-28 8:08 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-10-28 08:08 -------
Created an attachment (id=4332)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4332&action=view)
patch and example
With this patch,
$ stap -L 'kernel.function("tc_fill_tclass")'
kernel.function("tc_fill_tclass@net/sched/sch_api.c:1435") $skb:struct sk_buff*
$q:struct Qdisc* $cl:long unsigned int $pid:u32 $seq:u32 $flags:u16 $event:int
$nlh:struct nlmsghdr* $b:unsigned char* $cl_ops:struct Qdisc_class_ops const*
We can see $tcm and $d are eliminated. And to access the listed variables,
$ stap -p4 -e 'probe
kernel.function("tc_fill_tclass"){print($skb+$q+$cl+$pid+$seq+$flags+$event+$nlh+$b+$cl_ops)}'
stap_16232.ko
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
2009-10-21 12:51 ` [Bug translator/10820] " eteo at redhat dot com
2009-10-28 8:08 ` wenji dot huang at oracle dot com
@ 2009-10-28 16:49 ` fche at redhat dot com
2009-10-28 18:16 ` jistone at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2009-10-28 16:49 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2009-10-28 16:49 -------
Looks good to me, please commit, unless jistone has objections.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
` (2 preceding siblings ...)
2009-10-28 16:49 ` fche at redhat dot com
@ 2009-10-28 18:16 ` jistone at redhat dot com
2009-10-29 0:34 ` wenji dot huang at oracle dot com
2009-10-29 1:41 ` fche at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: jistone at redhat dot com @ 2009-10-28 18:16 UTC (permalink / raw)
To: systemtap
------- Additional Comments From jistone at redhat dot com 2009-10-28 18:16 -------
Looks fine to me too, thanks!
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
` (3 preceding siblings ...)
2009-10-28 18:16 ` jistone at redhat dot com
@ 2009-10-29 0:34 ` wenji dot huang at oracle dot com
2009-10-29 1:41 ` fche at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-10-29 0:34 UTC (permalink / raw)
To: systemtap
------- Additional Comments From wenji dot huang at oracle dot com 2009-10-29 00:34 -------
commit f10534c6a2a958609b7bc76390d50c17a36250d3
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug translator/10820] stap -L should take varaible location list into account
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
` (4 preceding siblings ...)
2009-10-29 0:34 ` wenji dot huang at oracle dot com
@ 2009-10-29 1:41 ` fche at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fche at redhat dot com @ 2009-10-29 1:41 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2009-10-29 01:41 -------
thanks!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10820
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-29 1:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-21 11:38 [Bug translator/10820] New: stap -L should take varaible location list into account mjw at redhat dot com
2009-10-21 12:51 ` [Bug translator/10820] " eteo at redhat dot com
2009-10-28 8:08 ` wenji dot huang at oracle dot com
2009-10-28 16:49 ` fche at redhat dot com
2009-10-28 18:16 ` jistone at redhat dot com
2009-10-29 0:34 ` wenji dot huang at oracle dot com
2009-10-29 1:41 ` fche at redhat dot com
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).