The intent of this markup would be to allow the optimizer to call the given embedded-c function more than once per probe handler. i.e: probe foo { println(pid()) bar[pid()]=5 println(zoo[pid(),execname()]) } With current code, pid() would need to be called three times. With the /* stable */ marker, it would be called once, and the result memoized. This would probably apply only to arity-0 functions, or perhaps only to those with literal/stable parameters.
Optimizer now supports /* stable */ pragma for arity-0 functions. /* stable */ functioncalls get pulled out of the top level loop then left inside the enclosing if-else statement(if any).