Why is the same log printed twice when using probe alias?

Nan Xiao xiaonan830818@gmail.com
Tue Dec 1 09:06:00 GMT 2015


Hi all,

I am writing a simple script to test probe alias:

# cat test.stp
#!/usr/bin/stap

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")}

But executing it will outputs "In timer" twice:

# ./test.stp
Entering timer
In timer
In timer
Leaving timer
Entering timer
In timer
In timer
Leaving timer
.......

Is it the expected behavior? How to understand it?

Thanks very much in advance!

Best Regards
Nan Xiao



More information about the Systemtap mailing list