Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save geek/7403118 to your computer and use it in GitHub Desktop.
Save geek/7403118 to your computer and use it in GitHub Desktop.
#!/usr/sbin/dtrace -s
pid$1::*HandleScopeC1*:entry
{
self->cone++;
}
pid$1::*HandleScopeD1*:entry
/self->cone/
{
self->cone--;
}
pid$1::*HandleScopeC2*:entry
{
self->ctwo++;
}
pid$1::*HandleScopeD2*:entry
/self->ctwo/
{
self->ctwo--;
}
pid$1::*_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE*:entry
/self->cone < 1 || self->ctwo < 1/
{
@[jstack(200, 8000)] = count();
}
tick-10s
{
printf("one: %d, two: %d\n", self->cone, self->ctwo);
printa(@);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment