Ryan Johnson wrote:
Is there a way to print stack traces as part of an aggregation key in dtrace? I'm trying to count occurrences of different stack traces, but my program has lots of indirect function calls and the output of stack() often doesn't contain the current function. Aggregating on @who[caller,stack()] should fix this in theory, but I can't get the printing to work right.
Ah! Turns out this question was already asked in 2005, and the answer is "%k"
On a related note, it seems that "%A" can translate user-level addresses to symbols in a printf/printa, which is not documented AFAICT and has caused me pain in the past (see http://kr.sun.com/developers/solaris/techdocs/dtrace_tips_public.pdf)
I've updated the printf/printa wiki page to mention both %A and %k.

Ryan

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to