public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/4521] New: conditional probes should not look up parameters
@ 2007-05-17 21:42 pmmccorm at us dot ibm dot com
  2007-05-17 22:14 ` [Bug runtime/4521] " joshua dot i dot stone at intel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: pmmccorm at us dot ibm dot com @ 2007-05-17 21:42 UTC (permalink / raw)
  To: systemtap

From the mailing list:

The bad news is that if you reference the local variable version of the function's
parameters in your optional probe, it errors out, like this:

# stap -p2 -e 'probe vm.mmap ? { printf("%p %d\n", address, length) }'
semantic error: failed to retrieve location attribute for local 'addr' (dieoffset:
0xbf6524): identifier '$addr' at /usr/local/share/systemtap/tapset/memory.stp:118:15
...

Here it seems like we should be able to discard the probe before trying to look
up its
parameters.

-- 
           Summary: conditional probes should not look up parameters
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: pmmccorm at us dot ibm dot com


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

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

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

* [Bug runtime/4521] conditional probes should not look up parameters
  2007-05-17 21:42 [Bug runtime/4521] New: conditional probes should not look up parameters pmmccorm at us dot ibm dot com
@ 2007-05-17 22:14 ` joshua dot i dot stone at intel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2007-05-17 22:14 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From joshua dot i dot stone at intel dot com  2007-05-17 23:13 -------
vm.mmap is defined thus:

  probe vm.mmap = kernel.function("do_mmap"), kernel.function("do_mmap2")? {
      address = $addr
      length = $len
  }

So if "do_mmap" is found, then your conditional flag is satisfied.  Add "-vv" to
your command-line, and you should see that it correctly resolves "do_mmap".  Now
you have a valid probe point, so it tries to fill in the body, where it fails
due to bug #1155.

Try a truly non-existent probepoint like:
  probe kernel.function("foobar") ? { printf("%d\n", $badparam) }
... and you'll get the correct "no probes found" error, without looking up the
parameter.

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


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

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

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

end of thread, other threads:[~2007-05-17 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-17 21:42 [Bug runtime/4521] New: conditional probes should not look up parameters pmmccorm at us dot ibm dot com
2007-05-17 22:14 ` [Bug runtime/4521] " joshua dot i dot stone at intel 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).