public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken
@ 2009-06-17 22:14 fche at redhat dot com
  2009-08-04  8:17 ` [Bug translator/10294] " wenji dot huang at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fche at redhat dot com @ 2009-06-17 22:14 UTC (permalink / raw)
  To: systemtap

stap -e 'probe ("stap").statement("*@main.cxx:375") {}'  # works
stap -e 'probe ("stap").statement("*@main.cxx:375-375") {}'  # borked
# as are wider ranges, or outright wildcards

See also bug #6905.

-- 
           Summary: .statement("*@FILE:NNN-MMM") line-range probes broken
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug translator/10294] .statement("*@FILE:NNN-MMM") line-range probes broken
  2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
@ 2009-08-04  8:17 ` wenji dot huang at oracle dot com
  2009-08-04  9:36 ` wenji dot huang at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-08-04  8:17 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-08-04 08:17 -------
Did tests, found that it's because of some unseen functions.
For example:
stap -p2 -e 'probe process("./stap").statement("*@main.cxx:375-375") {print(0)}' 
semantic error: Invalid line range (375-375), the end line number 375 < 145555936
semantic error: no match while resolving probe point
process("./stap").statement("*@main.cxx:375-375")
semantic error: no probes found

The focused function is 'basic_ostream'. We can't get the correct start line
number for this function. Even we skipped checking the line number, it will be 
also be failed when the running reaches dwarf_haspc (function, line_addr) != 1.

The line_addr is from dwarf_getsrc_file -> dwarf_lineaddr, related to 375. But
the PC border check of this->function terminated the loop. Only function
'basic_ostream' will be proceeded in iterate_over_srcfile_lines. So no probe
point is resolved.

And I wonder how to handle .statement("*@main.c:1-100") if the line range covers
more than two functions. Current stap only explores the first one 
and ignores the rest.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug translator/10294] .statement("*@FILE:NNN-MMM") line-range probes broken
  2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
  2009-08-04  8:17 ` [Bug translator/10294] " wenji dot huang at oracle dot com
@ 2009-08-04  9:36 ` wenji dot huang at oracle dot com
  2009-08-05 19:18 ` fche at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-08-04  9:36 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-08-04 09:35 -------
Created an attachment (id=4110)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4110&action=view)
patch

With the patch, stap can allow the PC out of function in 
exploring probe points for line range if current function 
matches pattern.

$ ./stap -p2 -e 'probe process("./stap").statement("*@main.cxx:375")
{print(1)}' 
# probes
process("/home/wjhuang/systemtap/stap").statement("main@/home/wjhuang/systemtap/main.cxx:375")
/* pc=.absolute+0x805066d */ /* <-
process("./stap").statement("*@main.cxx:375") */

$ ./stap -p2 -e 'probe
process("./stap").statement("*@main.cxx:375-375"){print(1)}' 
# probes
process("/home/wjhuang/systemtap/stap").statement("main@/home/wjhuang/systemtap/main.cxx:375")
/* pc=.absolute+0x805066d */ /* <-
process("./stap").statement("*@main.cxx:375-375") */

When the line range covers more than two functions.
$ ./stap -p2 -e 'probe process("../test").statement("*@test.c:7-10")
{print(1)}'
# probes
process("/home/wjhuang/test").statement("func_a@/home/wjhuang/test.c:7") /*
pc=.absolute+0x80483ce */ /* <- process("../test").statement("*@test.c:7-10")
*/
process("/home/wjhuang/test").statement("main@/home/wjhuang/test.c:10") /*
pc=.absolute+0x80483d0 */ /* <- process("../test").statement("*@test.c:7-10")
*/

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug translator/10294] .statement("*@FILE:NNN-MMM") line-range probes broken
  2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
  2009-08-04  8:17 ` [Bug translator/10294] " wenji dot huang at oracle dot com
  2009-08-04  9:36 ` wenji dot huang at oracle dot com
@ 2009-08-05 19:18 ` fche at redhat dot com
  2009-08-06  9:10 ` wenji dot huang at oracle dot com
  2009-09-04 17:46 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2009-08-05 19:18 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-08-05 19:18 -------
Looks good, thanks.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug translator/10294] .statement("*@FILE:NNN-MMM") line-range probes broken
  2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
                   ` (2 preceding siblings ...)
  2009-08-05 19:18 ` fche at redhat dot com
@ 2009-08-06  9:10 ` wenji dot huang at oracle dot com
  2009-09-04 17:46 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-08-06  9:10 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-08-06 09:10 -------
commit 9b988eff8c29377e658606a85f371ceb9acfef7d

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug translator/10294] .statement("*@FILE:NNN-MMM") line-range probes broken
  2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
                   ` (3 preceding siblings ...)
  2009-08-06  9:10 ` wenji dot huang at oracle dot com
@ 2009-09-04 17:46 ` fche at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2009-09-04 17:46 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-09-04 17:46 -------
thanks

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10294

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-04 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 22:14 [Bug translator/10294] New: .statement("*@FILE:NNN-MMM") line-range probes broken fche at redhat dot com
2009-08-04  8:17 ` [Bug translator/10294] " wenji dot huang at oracle dot com
2009-08-04  9:36 ` wenji dot huang at oracle dot com
2009-08-05 19:18 ` fche at redhat dot com
2009-08-06  9:10 ` wenji dot huang at oracle dot com
2009-09-04 17:46 ` 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).