A
A
Andrey Prokopyuk2015-01-19 21:53:22
Node.js
Andrey Prokopyuk, 2015-01-19 21:53:22

Node.js profiling: Why does dtrace fail on Mac OS X Yosemite?

Trying to profile Node.js with DTrace on Mac OS X 10.10 Yosemite:

sudo dtrace -n 'profile-97/execname == "node" && arg1/{ @[jstack(150, 8000)] = count(); } tick-60s { exit(0); }' &> /tmp/dtrace.out

As a result, I get a bunch of errors: pastebin.com/NjbR2zug
Errors look like this:
dtrace: error on enabled probe ID 1 (ID 28: profile:::profile-97): invalid address (0x5) in action #2

Tried versions of Node.js installed with both Brew and NVM - same result.
What can be done about it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fedor Indutny, 2015-01-28
@donnerjack13589

Because OS X doesn't support jstack()dtrace in scripts. But it works on FreeBSD, SmartOS and you can still get an analogue on linux: www.brendangregg.com/FlameGraphs/cpuflamegraphs.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question