* How to understand "?" in probe alias?
@ 2015-11-13 7:14 Nan Xiao
2015-11-13 14:00 ` Frank Ch. Eigler
0 siblings, 1 reply; 2+ messages in thread
From: Nan Xiao @ 2015-11-13 7:14 UTC (permalink / raw)
To: systemtap
Hi all,
Below is "Testing target variable available Example"
(https://sourceware.org/systemtap/SystemTap_Beginners_Guide/targetavailable.html):
probe vm.pagefault = kernel.function("__handle_mm_fault@mm/memory.c") ?,
kernel.function("handle_mm_fault@mm/memory.c") ?
{
name = "pagefault"
write_access = (@defined($flags) ? $flags & FAULT_FLAG_WRITE :
$write_access)
address = $address
}
How to understand "?" in probe alias? After checking Language
reference(https://sourceware.org/systemtap/langref/Components_SystemTap_script.html#SECTION00041000000000000000),
I can't find the explanations of it.
Thanks in advance!
Best Regards
Nan Xiao
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to understand "?" in probe alias?
2015-11-13 7:14 How to understand "?" in probe alias? Nan Xiao
@ 2015-11-13 14:00 ` Frank Ch. Eigler
0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2015-11-13 14:00 UTC (permalink / raw)
To: Nan Xiao; +Cc: systemtap
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-13 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 7:14 How to understand "?" in probe alias? Nan Xiao
2015-11-13 14:00 ` Frank Ch. Eigler
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).