Created
November 20, 2012 15:48
-
-
Save seiji/4118724 to your computer and use it in GitHub Desktop.
trace.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma D option quiet | |
self int level; | |
objc$target:::entry | |
{ | |
printf("%*s[tid=%lld][%s %s]\n", | |
self->level * 2, " ->", | |
(long long)tid, probemod, probefunc); | |
self->ts[probefunc] = timestamp; | |
self->level++; | |
} | |
objc$target:::return | |
{ | |
time = timestamp - self->ts[probefunc]; | |
self->level--; | |
printf("%*s[tid=%lld][%s %s] [%dms]\n", | |
self->level * 2, " <-", (long long)tid, | |
probemod, probefunc, time / 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment