* [Bug translator/2645] New: Need a syntax to specify optional probes
@ 2006-05-08 20:58 joshua dot i dot stone at intel dot com
2006-05-09 3:52 ` [Bug translator/2645] " bibo dot mao at intel dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2006-05-08 20:58 UTC (permalink / raw)
To: systemtap
see http://sources.redhat.com/ml/systemtap/2006-q2/msg00286.html
Summary of desired behavior: given
probe FOO ? { }
probe alias = BAR ?, BAZ ? { }
If FOO is not found, then that probe should be discarded. If both BAR and BAZ
are not found, there are two cases:
probe alias { } // ERROR: probepoint not found
probe alias ? { } // ok, probe is discarded
Similarly, if a syscall "sys_foobar" isn't found:
tapset:
probe syscall.foobar = kernel.function("sys_foobar") ? {}
user script:
probe syscall.foobar {} // error, probepoint not found
probe syscall.foobar ? {} // ok, probe is discarded
probe syscall.* {} // ok if all non-optional syscall probes were found,
// or if all are optional, then at least one was found
--
Summary: Need a syntax to specify optional probes
Product: systemtap
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: joshua dot i dot stone at intel dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
@ 2006-05-09 3:52 ` bibo dot mao at intel dot com
2006-05-09 21:09 ` joshua dot i dot stone at intel dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bibo dot mao at intel dot com @ 2006-05-09 3:52 UTC (permalink / raw)
To: systemtap
------- Additional Comments From bibo dot mao at intel dot com 2006-05-09 03:52 -------
what about this kind of tapset, user script should care nothing about whether is
it optional or not.
tapset:
probe syscall.foobar = kernel.function("sys_foobar") ? {} optional
probe syscall.foobar1 = kernel.function("sys_foobar1") {} non-optional
user script:
probe syscall.foobar {} // ok, probe is discarded
probe syscall.foobar1 {} // ERROR: probepoint not found
probe syscall.* {} // ok if all non-optional syscall probes were found,
// or if all are optional, then at least one was found
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
2006-05-09 3:52 ` [Bug translator/2645] " bibo dot mao at intel dot com
@ 2006-05-09 21:09 ` joshua dot i dot stone at intel dot com
2006-05-14 12:01 ` fche at redhat dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2006-05-09 21:09 UTC (permalink / raw)
To: systemtap
------- Additional Comments From joshua dot i dot stone at intel dot com 2006-05-09 21:09 -------
(In reply to comment #1)
> what about this kind of tapset, user script should care nothing about
> whether is it optional or not.
The user doesn't know whether the lower level tapset has marked a binding as
optional or not. Thus, when the user writes a probe on syscall.foobar, they
will likely be surprised if this probe was automatically removed. We should
avoid surprising results.
At a minimum this should be an warning, but I still think it's better to be an
error.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
2006-05-09 3:52 ` [Bug translator/2645] " bibo dot mao at intel dot com
2006-05-09 21:09 ` joshua dot i dot stone at intel dot com
@ 2006-05-14 12:01 ` fche at redhat dot com
2006-05-14 20:24 ` joshua dot i dot stone at intel dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2006-05-14 12:01 UTC (permalink / raw)
To: systemtap
------- Additional Comments From fche at redhat dot com 2006-05-14 12:01 -------
If I understand the concern correctly, in this scenario,
probe group.f = pp ? { } # in tapset
probe group.* { } # in user script
and for missing "pp", should this succeed or fail? There is an ambiguity.
With the current flavouring of the code, it would fail, since the group.*
match would expand to an empty set of derived_probe's.
With a little bit of extra work, we can let the tapset author make this pass.
Let's provide a new probe point "never", which would be similar to "begin"
and "end" but never actually run its handler. (It doesn't even need to show
up in the translated C code.) Then, if a tapset author wants to make the
alias succeed with a missing pp, even for non-optional users, he can say:
probe group.f = pp ? , never { } # in tapset
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
` (2 preceding siblings ...)
2006-05-14 12:01 ` fche at redhat dot com
@ 2006-05-14 20:24 ` joshua dot i dot stone at intel dot com
2006-06-01 21:24 ` joshua dot i dot stone at intel dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2006-05-14 20:24 UTC (permalink / raw)
To: systemtap
------- Additional Comments From joshua dot i dot stone at intel dot com 2006-05-14 20:22 -------
(In reply to comment #3)
> If I understand the concern correctly, in this scenario,
> probe group.f = pp ? { } # in tapset
> probe group.* { } # in user script
> and for missing "pp", should this succeed or fail? There is an ambiguity.
> With the current flavouring of the code, it would fail, since the group.*
> match would expand to an empty set of derived_probe's.
I think failure is correct here. With missing "pp", "group.*" should fail, yet
"group.* ?" would be ok. If there were another alias, "probe group.g = qq ?
{}", then "group.*" will succeed iff at least one of "pp" and "qq" are found.
> With a little bit of extra work, we can let the tapset author make this pass.
> Let's provide a new probe point "never", which would be similar to "begin"
> and "end" but never actually run its handler. (It doesn't even need to show
> up in the translated C code.) Then, if a tapset author wants to make the
> alias succeed with a missing pp, even for non-optional users, he can say:
> probe group.f = pp ? , never { } # in tapset
I think this is a good workaround if a tapset author really wants to write a
probe that could possibly do nothing. While I personally think this should be
discouraged, for the reasons I gave in comment #2, it may be good to allow this
possibility to cover all use cases.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
` (3 preceding siblings ...)
2006-05-14 20:24 ` joshua dot i dot stone at intel dot com
@ 2006-06-01 21:24 ` joshua dot i dot stone at intel dot com
2006-06-02 15:00 ` fche at redhat dot com
2006-06-02 15:00 ` fche at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2006-06-01 21:24 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |2295
nThis| |
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
` (5 preceding siblings ...)
2006-06-02 15:00 ` fche at redhat dot com
@ 2006-06-02 15:00 ` fche at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2006-06-02 15:00 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|systemtap at sources dot |fche at redhat dot com
|redhat dot com |
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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/2645] Need a syntax to specify optional probes
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
` (4 preceding siblings ...)
2006-06-01 21:24 ` joshua dot i dot stone at intel dot com
@ 2006-06-02 15:00 ` fche at redhat dot com
2006-06-02 15:00 ` fche at redhat dot com
6 siblings, 0 replies; 8+ messages in thread
From: fche at redhat dot com @ 2006-06-02 15:00 UTC (permalink / raw)
To: systemtap
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|0000-00-00 00:00:00 |2006-06-02 14:59:54
date| |
http://sourceware.org/bugzilla/show_bug.cgi?id=2645
------- 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:[~2006-06-02 15:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 20:58 [Bug translator/2645] New: Need a syntax to specify optional probes joshua dot i dot stone at intel dot com
2006-05-09 3:52 ` [Bug translator/2645] " bibo dot mao at intel dot com
2006-05-09 21:09 ` joshua dot i dot stone at intel dot com
2006-05-14 12:01 ` fche at redhat dot com
2006-05-14 20:24 ` joshua dot i dot stone at intel dot com
2006-06-01 21:24 ` joshua dot i dot stone at intel dot com
2006-06-02 15:00 ` fche at redhat dot com
2006-06-02 15:00 ` 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).