Description
See bnoordhuis/node-profiler#11 for background. A recurring issue with CPU profiling with --prof
is that you either need to build d8 (the V8 shell) or install a tick processor package from npm.
The problem with building d8 is that it's quite tedious and frequently broken due to the way V8 is bundled. Installing a tick processor is no picnic either; if it doesn't match the V8 version, it produces bogus output. That isn't currently solvable from user land because the output from the profiler doesn't contain version information and heuristics aren't reliable enough. I'm going to prepare a patch that adds version information but that is a tangential issue. (Update: https://codereview.chromium.org/800293002/)
For ease of use, I propose bundling the tick processor with iojs, either as a standalone JS script (working name: ioprof
) or by baking it into the binary. The former would be easiest short-term, the latter offers an arguably nicer user experience. I volunteer to do the work.
Design decisions:
- Add a
--without-ioprof
to the configure script, similar to the--without-npm
flag? Assertion without hard data to back it up: no one uses--without-npm
;--without-ioprof
is probably not worth the hassle. - What about distro packagers that build against an external V8? We would normally copy the tick processor files from deps/v8/tools but that won't work when compiling against headers only. The best I can come up with for now is to disable the profiler script when
--shared-v8
is specified. Maybe @jbergstroem can chime in here.