This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to understand "?" in probe alias?
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Nan Xiao <xiaonan830818 at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Fri, 13 Nov 2015 08:59:59 -0500
- Subject: Re: How to understand "?" in probe alias?
- Authentication-results: sourceware.org; auth=none
- References: <CA+MhoaMpa3iG5KJA6eL03eez=24qwwwyMjymozXD7K4MbWf52A at mail dot gmail dot com>
Nan Xiao <xiaonan830818@gmail.com> writes:
> [...]
> probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
> kernel.function("handle_mm_fault@mm/memory.c") ?
> [...] How to understand "?" in probe alias? After checking Language
> reference [...] I can't find the explanations of it.
You're right; that particular book doesn't seem to mention it.
But [man stap] refers to [man stapprobes], which includes:
However, a probe point may be followed by a "?" character, to
indicate that it is optional, and that no error should result if
it fails to resolve. Optionalness passes down through all levels
of alias/wildcard expansion. Alternately, a probe point may be
followed by a "!" character, to indicate that it is both optional
and sufficient. (Think vaguely of the Prolog cut operator.) If it
does resolve, then no further probe points in the same
comma-separated list will be resolved. Therefore, the "!"
sufficiency mark only makes sense in a list of probe point
alternatives.
- FChE