fbt return Probes

While a given function only has a single point of entry, it may have many different points where it returns to its caller. You are usually interested in either the value that a function returned or the fact that the function returned at all rather than the specific return path taken. fbt therefore collects a function's multiple return sites into a single return probe. If you want to know the exact return path, you can examine the return probe args[0] value, which indicates the offset in bytes of the returning instruction in the function text.

If the function has a return value, the return value is stored in args[1]. If a function does not have a return value, args[1] is not defined.

Note:

Using the args[] array works provided that the probe description matches either a single probe or several probes with the same return type. If the probes have different return types, then an error message similar to the following example is displayed:
dtrace: failed to compile script ./gdb.d: line 19: args[ ] may not be 
referenced because probe description fbt:::return matches an unstable set of probes
For probes with different return types, you might need to use the untyped argn instead.