Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Created November 15, 2013 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjfontaine/7490210 to your computer and use it in GitHub Desktop.
Save tjfontaine/7490210 to your computer and use it in GitHub Desktop.
dtrace -n 'pid$target::*Isolate*Throw*:entry { @[probefunc] = count(); }' -c './node t.js'
dtrace: description 'pid$target::*Isolate*Throw*:entry ' matched 5 probes
tick
tick
tick
tick
tick
tick
tick
tick
tick
tick
tick
dtrace: pid 63529 has exited
_ZN2v88internal7Isolate5ThrowEPNS0_6ObjectEPNS0_15MessageLocationE 11
_ZN2v88internal7Isolate7DoThrowEPNS0_6ObjectEPNS0_15MessageLocationE 11
var interval = setInterval(function() {
if (!count)
clearInterval(interval);
try {
throw new Error("Hello World");
} catch (e) {
console.log('tick');
} finally {
count--;
}
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment