1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
global depth = 0 global max_depth = 0 probe process("fib").function("fib").call { depth++ if (depth > max_depth) { max_depth = depth %( $# > 0 %? print_ubacktrace_brief(); printf("\n") %) } } probe process("fib").function("fib").return { %( $# == 0 %? if (depth == max_depth) { print_ubacktrace_brief() printf("\n") } %) depth-- }