is it possible to start-stop CPU profiling on runtime and get the v8.log file?

166 views
Skip to first unread message

Irina Tchernouchina

unread,
May 11, 2015, 1:58:08 PM5/11/15
to nod...@googlegroups.com
Hello all,

I know that I can either 

1) pass node.js --prof --log-timer-events app.js  and get v8.log file for the whole execution,
2) or node.js app.js, but use binding from https://github.com/node-inspector/v8-profiler and call start-stop-profiler functions from my code.
But for variant 2, I think all I get is cpu profile object, not equivalent to v8.log

I thought earlier it was a possibility to pass node,js the same flags as in 1), and some additional flag, so it was possible to start profiling later, and have log file.
I examined v8 code and now I see no such possibility...

Thank you in advance!

Ben Noordhuis

unread,
May 11, 2015, 9:57:10 PM5/11/15
to nod...@googlegroups.com
There is a --prof_lazy flag but it has been removed in newer versions
of io.js and node.js and it's unreliable in v0.10. I've submitted
patches in the past to upstream V8 to fix some of the issues but it
was basically unsalvageable.

My company has a product[0] that can intelligently enable and disable
the profiler and does a bunch of in-flight processing to keep the size
of the log file down (so you can keep it running for days without
bogging down the system or filling up the disks); some of that
functionality is integrated in our strong-agent product[1].

I'm not sure if other vendors provide something similar; I haven't
heard about it, at least.

[0] https://strongloop.com/strongblog/node-js-performance-meteor/

[1] https://npmjs.org/package/strong-agent
Reply all
Reply to author
Forward
0 new messages