* [Bug translator/3016] New: error accessing anonymous struct/union memeber
@ 2006-08-09 8:09 guanglei at cn dot ibm dot com
2006-08-09 20:00 ` [Bug translator/3016] " dsmith at redhat dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: guanglei at cn dot ibm dot com @ 2006-08-09 8:09 UTC (permalink / raw)
To: systemtap
stap works fine with this script:
probe kernel.function("do_mpage_readpage")
{
printf("%p", $page)
}
But it will generate an error with this script:
probe kernel.function("do_mpage_readpage")
{
printf("%p", $page->mapping)
}
stap -vv says:
...
Pass 1: parsed user script and 40 library script(s) in 310usr/0sys/372real ms.
probe do_mpage_readpage@fs/mpage.c:179 pc=0xc0000000000e716c
semantic error: unresolved target-symbol expression: identifier '$page' at
b.stp:3:15
...
The struct page is defined in "include/linux/mm.h" and mapping is an anonymous
struct member of struct page:
struct page {
unsigned long flags;
atomic_t _count;
atomic_t _mapcount;
union {
struct {
unsigned long private;
struct address_space *mapping;
};
...
}
--
Summary: error accessing anonymous struct/union memeber
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: guanglei at cn dot ibm dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
@ 2006-08-09 20:00 ` dsmith at redhat dot com
2006-08-09 20:54 ` roland at gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dsmith at redhat dot com @ 2006-08-09 20:00 UTC (permalink / raw)
To: systemtap
------- Additional Comments From dsmith at redhat dot com 2006-08-09 20:00 -------
I've duplicated this problem, and it only occurs with the anonymous struct.
Accessing other 'struct page' members works correctly, i.e.:
probe kernel.function("do_mpage_readpage")
{
printf("%p", $page->flags)
}
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
2006-08-09 20:00 ` [Bug translator/3016] " dsmith at redhat dot com
@ 2006-08-09 20:54 ` roland at gnu dot org
2008-05-29 21:25 ` mhiramat at redhat dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: roland at gnu dot org @ 2006-08-09 20:54 UTC (permalink / raw)
To: systemtap
------- Additional Comments From roland at gnu dot org 2006-08-09 20:54 -------
Yes, looking for anonymous structs/unions is just not handled.
I can whip up loc2c-test changes to support it, to give a model for what the
translator needs to do. It's straightforward.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
2006-08-09 20:00 ` [Bug translator/3016] " dsmith at redhat dot com
2006-08-09 20:54 ` roland at gnu dot org
@ 2008-05-29 21:25 ` mhiramat at redhat dot com
2008-06-02 15:46 ` mark at klomp dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mhiramat at redhat dot com @ 2008-05-29 21:25 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mhiramat at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
` (2 preceding siblings ...)
2008-05-29 21:25 ` mhiramat at redhat dot com
@ 2008-06-02 15:46 ` mark at klomp dot org
2008-09-19 6:56 ` prerna at linux dot vnet dot ibm dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mark at klomp dot org @ 2008-06-02 15:46 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mwielaard at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
` (3 preceding siblings ...)
2008-06-02 15:46 ` mark at klomp dot org
@ 2008-09-19 6:56 ` prerna at linux dot vnet dot ibm dot com
2008-09-26 6:25 ` prerna at linux dot vnet dot ibm dot com
2008-10-01 11:40 ` mjw at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: prerna at linux dot vnet dot ibm dot com @ 2008-09-19 6:56 UTC (permalink / raw)
To: systemtap
------- Additional Comments From prerna at linux dot vnet dot ibm dot com 2008-09-19 06:55 -------
*** Bug 4519 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |wcohen at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
` (4 preceding siblings ...)
2008-09-19 6:56 ` prerna at linux dot vnet dot ibm dot com
@ 2008-09-26 6:25 ` prerna at linux dot vnet dot ibm dot com
2008-10-01 11:40 ` mjw at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: prerna at linux dot vnet dot ibm dot com @ 2008-09-26 6:25 UTC (permalink / raw)
To: systemtap
------- Additional Comments From prerna at linux dot vnet dot ibm dot com 2008-09-26 06:24 -------
Changed the translate_components() function of tapsets.cxx to call itself
recursively for every instance of anonymous struct / union present as a member
in a given struct/ union.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug translator/3016] error accessing anonymous struct/union memeber
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
` (5 preceding siblings ...)
2008-09-26 6:25 ` prerna at linux dot vnet dot ibm dot com
@ 2008-10-01 11:40 ` mjw at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: mjw at redhat dot com @ 2008-10-01 11:40 UTC (permalink / raw)
To: systemtap
------- Additional Comments From mjw at redhat dot com 2008-10-01 11:39 -------
I adjusted the test case a little so that it works on both older and newer
kernels by using the mapping field as in the first comment.
commit dd4918442a55569175bda0575f746e84c99cee58
Author: Mark Wielaard <mjw@redhat.com>
Date: Wed Oct 1 13:38:16 2008 +0200
Adjust semok/thirtythree.stp test to pass on older kernels.
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index f3fad07..4825cd2 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-01 Mark Wielaard <mjw@redhat.com>
+
+ * semok/thirtythree.stp: Use page->mapping instead of page->inuse
+ as annonymous struct value (also available in older kernels).
+
2008-09-26 Frank Ch. Eigler <fche@elastic.org>
PR 6916.
diff --git a/testsuite/semok/thirtythree.stp b/testsuite/semok/thirtythree.stp
index d5171f6..9007037 100755
--- a/testsuite/semok/thirtythree.stp
+++ b/testsuite/semok/thirtythree.stp
@@ -1,5 +1,5 @@
#! stap -p2
# Per bz3016, this should get through the semantic pass without warnings.
probe kernel.function("do_mpage_readpage") {
- printf("\n page ->inuse %u",$page->inuse)
+ printf("\n page->mapping %p",$page->mapping)
}
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3016
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-10-01 11:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-09 8:09 [Bug translator/3016] New: error accessing anonymous struct/union memeber guanglei at cn dot ibm dot com
2006-08-09 20:00 ` [Bug translator/3016] " dsmith at redhat dot com
2006-08-09 20:54 ` roland at gnu dot org
2008-05-29 21:25 ` mhiramat at redhat dot com
2008-06-02 15:46 ` mark at klomp dot org
2008-09-19 6:56 ` prerna at linux dot vnet dot ibm dot com
2008-09-26 6:25 ` prerna at linux dot vnet dot ibm dot com
2008-10-01 11:40 ` mjw 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).