This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/2645] Need a syntax to specify optional probes


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]