Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option switchrate=1000hz
profile-1ms /pid == $target/ {
/* Sampling every 1ms therefore also recording timestamp at ms resolution */
printf("%s %d %d: %s:", execname, pid, timestamp / 1000000, probename);
ustack(10000);
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment