We should allow instantiations of probe aliases to have trailing components, suffixes, that apply to the underlying probepoints. For example, "syscall.open.return.maxactive(N)" would apply that maxactive component to "sys_open" and "compat_sys_open" underneath. This would also allow a probe like "syscall.open" to work with para-callgraph, as both ".call" and ".return" will be valid. It gets a little tricky when an alias is named the same as something that could also be a shorter alias with a suffix. So "syscall.open.return" should match only the exact full alias, and not "(syscall.open).return", the entry alias with a new suffix. It's even trickier when wildcards are involved - we probably want "syscall.open.*" to expand to "(syscall.open).call" and "syscall.open.return", but still not "(syscall.open).return". When doubled as "syscall.open**", I think the same policy will still work out.
The question also was raised on IRC whether we want to support something along the following lines: probe foo = begin { } probe foo(-3) { } Namely, the suffix might simply consist of a parameter that is passed on to the underlying probes in the alias.
> It's even trickier when wildcards are involved - we probably want > "syscall.open.*" to expand to "(syscall.open).call" and "syscall.open.return", > but still not "(syscall.open).return". When doubled as "syscall.open**", I > think the same policy will still work out. Clarification -- however, a wildcard such as syscall.open.return.m*(1) which would ordinarily have no expansions needs to be passed along as a suffix.
Basic implementation of the feature is in the repository; probably going to close this bug in a bit. Some follow up issues for polishing at the edges: PR14279 - properly expand wildcards in stap -l and pn() (also affects pre-alias suffix language features) PR14310 - better error messages on recursive alias suffix expansion PR14311 - always report alternatives & positions in probe point error messages PR14312 - use alias suffixes in existing systemtap.examples PR14313 - rewrite alias example in langref.tex The first two bugs are, in my opinion, a prerequisite to any modification of the alias suffix behaviour that allows a wildcard expansion to match both *ordinary* probe points *and* suffixes (instead of only matching suffixes when it can't find any ordinary probe points, as it does currently).
(In reply to comment #3) > PR14279 - properly expand wildcards in stap -l and pn() (also affects pre-alias > suffix language features) Sorry, that should have actually been PR14297...
Anyhow, going to mark this problem resolved and get to work on the follow-ups...