public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors
@ 2009-04-24 17:31 fche at redhat dot com
  2009-04-27 10:01 ` [Bug translator/10102] " wenji dot huang at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: fche at redhat dot com @ 2009-04-24 17:31 UTC (permalink / raw)
  To: systemtap

The following script should pass:

    probe foobar ? , never  { }

with the foobar part silently skipped (since it's optional).

-- 
           Summary: optional probe points should silently accept "probe
                    point mismatch" errors
           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=10102

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
@ 2009-04-27 10:01 ` wenji dot huang at oracle dot com
  2009-04-27 13:41 ` fche at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-04-27 10:01 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-04-27 10:00 -------
Created an attachment (id=3909)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3909&action=view)
patch to suspend the error

Simple example:

$stap -p2 -e 'probe foobar ?, foobar1 !,  never  { }'
WARNING: side-effect-free probe 'probe_1390': keyword at <input>:1:1
 source: probe foobar ?, foobar1 !,  never  { }
	 ^
# probes
never /* <- foobar?,foobar1!,never */

-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
  2009-04-27 10:01 ` [Bug translator/10102] " wenji dot huang at oracle dot com
@ 2009-04-27 13:41 ` fche at redhat dot com
  2009-04-28  8:40 ` wenji dot huang at oracle dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2009-04-27 13:41 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-04-27 13:41 -------
If it's that simple, great!
Could you commit please, with a test case?


-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
  2009-04-27 10:01 ` [Bug translator/10102] " wenji dot huang at oracle dot com
  2009-04-27 13:41 ` fche at redhat dot com
@ 2009-04-28  8:40 ` wenji dot huang at oracle dot com
  2009-04-29  9:28 ` mjw at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-04-28  8:40 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-04-28 08:39 -------
See commit ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97

-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
                   ` (2 preceding siblings ...)
  2009-04-28  8:40 ` wenji dot huang at oracle dot com
@ 2009-04-29  9:28 ` mjw at redhat dot com
  2009-05-04  8:16 ` wenji dot huang at oracle dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2009-04-29  9:28 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From mjw at redhat dot com  2009-04-29 09:28 -------
Thanks for that. I see a slightly different variant of this that seems a bit
harder to solve (at least, I didn't immediately see how it could be solved,
maybe someone else does see an easy solution):

$ stap -e 'probe process("/does/not/exist").function("main") ?, never { log
("process does exist"); }'
semantic error: libdwfl failure (missing process /does/not/exist i686
debuginfo): No such file or directory while resolving probe point
process("/does/not/exist").function("main")?

This probably needs a similar change in setup_user(), but we don't have the
probe location at that point, and setup_user() is called in a couple of
different situations (not all of which can silently fail).

-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
                   ` (3 preceding siblings ...)
  2009-04-29  9:28 ` mjw at redhat dot com
@ 2009-05-04  8:16 ` wenji dot huang at oracle dot com
  2009-05-04 15:06 ` fche at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-05-04  8:16 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-05-04 08:16 -------
Created an attachment (id=3922)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3922&action=view)
patch for user space target

With the 2nd part patch, the example output:

$stap -p2 -e 'probe
process("/do/not/exist").function("main")?,process("/not/exist").function("main")!,
begin { log("process does exist"); }'
# functions
log:unknown (msg:string)
# probes
begin /* <-
process("/do/not/exist").function("main")?,process("/not/exist").function("main")!,begin
*/

$ stap -p2 -e 'probe process("./stap").function("no such")?, begin {
log("process does exist"); }'
# functions
log:unknown (msg:string)
# probes
begin /* <- process("./stap").function("no such")?,begin */

-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
                   ` (4 preceding siblings ...)
  2009-05-04  8:16 ` wenji dot huang at oracle dot com
@ 2009-05-04 15:06 ` fche at redhat dot com
  2009-05-05  7:33 ` wenji dot huang at oracle dot com
  2009-05-06  0:22 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2009-05-04 15:06 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-05-04 15:05 -------
Wenji, it seems to me that putting the try/catch one level higher --
perhaps into derive_probes() itself around the find_and_build() call --
would accomplish this for other probe types too.


-- 


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
                   ` (5 preceding siblings ...)
  2009-05-04 15:06 ` fche at redhat dot com
@ 2009-05-05  7:33 ` wenji dot huang at oracle dot com
  2009-05-06  0:22 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: wenji dot huang at oracle dot com @ 2009-05-05  7:33 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From wenji dot huang at oracle dot com  2009-05-05 07:32 -------
Created an attachment (id=3923)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3923&action=view)
Updated patch

This patch will tolerate the failure for optional probe in derive_probe as
Frank mentioned in comment #6. Seems all the probe types can be covered.

$ stap -p2 -ue 'probe foo?, process("/do/not/exist").function("main") !,
kernel.mark("no such mark") ?, kernel.trace("no trace") !, process.foo ?,
kernel.statement("no statement") !, module("no mod").function("*") ?, begin {}'

# probes
begin /* <- foo?,process("/do/not/exist").function("main")!,kernel.mark("no
such mark")?,kernel.trace("no trace")!,process.foo?,kernel.statement("no
statement")!,module("no mod").function("*")?,begin */

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #3909 is|0                           |1
           obsolete|                            |
Attachment #3922 is|0                           |1
           obsolete|                            |


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

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

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

* [Bug translator/10102] optional probe points should silently accept "probe point mismatch" errors
  2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
                   ` (6 preceding siblings ...)
  2009-05-05  7:33 ` wenji dot huang at oracle dot com
@ 2009-05-06  0:22 ` fche at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2009-05-06  0:22 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2009-05-06 00:21 -------
Right, that last one looks almost 100% right; you can commit it.

I'd follow up with a bit of cleanup that fixes the bug that
loc->optional can get its old_loc_opt value forgotten in case
of an exception.  Plus I'd prefer to avoid replicating the
find_and_build call and instead put the if(optional) check
into a catch() block:  try { ... } catch (...) {  if(!optional) throw; ... }


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |wenji dot huang at oracle
                   |redhat dot com              |dot com
             Status|NEW                         |ASSIGNED


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

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

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

end of thread, other threads:[~2009-05-06  0:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24 17:31 [Bug translator/10102] New: optional probe points should silently accept "probe point mismatch" errors fche at redhat dot com
2009-04-27 10:01 ` [Bug translator/10102] " wenji dot huang at oracle dot com
2009-04-27 13:41 ` fche at redhat dot com
2009-04-28  8:40 ` wenji dot huang at oracle dot com
2009-04-29  9:28 ` mjw at redhat dot com
2009-05-04  8:16 ` wenji dot huang at oracle dot com
2009-05-04 15:06 ` fche at redhat dot com
2009-05-05  7:33 ` wenji dot huang at oracle dot com
2009-05-06  0:22 ` 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).