Why is the same log printed twice when using probe alias?
Frank Ch. Eigler
fche@redhat.com
Tue Dec 1 15:57:00 GMT 2015
Nan Xiao <xiaonan830818@gmail.com> writes:
> [...]
> probe timer_alias = timer.s(3) {printf("Entering timer\n")}
> probe timer_alias += timer.s(3) {printf("Leaving timer\n")}
> probe timer_alias {printf("In timer\n")}
> # ./test.stp
> Entering timer
> In timer
> In timer
> Leaving timer
> [...]
This is correct. Each probe alias definition is independent of the
others, so in this case, timer_alias expands to two separate
timer.s(3) probes. The += just means that the {} block associated
with the latter is supposed to be executed -after- the user's handler
rather than before. (It is not an addition to the other alias's
probe handler or something like that.)
- FChE
More information about the Systemtap
mailing list