Repository navigation
node --prof-process is broken #19044
Description
Activity
You’re right,
python tools/test.py tick-processoris also failing for me on master.I think this might be coming from 99d693d, /cc @MylesBorins
Do you think you could try this fix?
--- a/lib/internal/v8_prof_processor.js +++ b/lib/internal/v8_prof_processor.js @@ -34,9 +34,9 @@ if (process.platform === 'darwin') { tickArguments.push('--windows'); } tickArguments.push.apply(tickArguments, process.argv.slice(1)); -script = `(function(require) { +script = `(function(module, require) { arguments = ${JSON.stringify(tickArguments)}; function write (s) { process.stdout.write(s) } ${script} })`; -vm.runInThisContext(script)(require); +vm.runInThisContext(script)(module, require);
🤔 I thought we had just fixed
--prof-process. Does it work on master?@fhinkel as far as I can see, it was broken again a week later — it's a different issue. I guess some new tests for flag would help :)
- added a commit that references this issue
on Feb 28, 2018 Does it work on master?
When we were testing for #18623, it didn’t work on
masterto begin with. :/I guess some new tests for flag would help :)
We do have tests, but they’re resource-consuming and aren’t run as part of the standard test suite – I guess they just weren’t run the last time when changes to this were landed.
@mourner I’ve opened #19059 with the above patch, could you try to check that out?
@addaleax thanks a lot for the fix! I don't have Node source code set up locally but can try checking if no one else beats me to it in the nearest days.
@addaleax thanks for the solution, it does work in the sense that I stopped getting the error, but --prof-process won't produce any output, it just keeps running without giving any feedback. I ran it against a 4MB isolation file and left it for an hour. Guess we need a profiler to profile node profiler :)
Reacted by F. Hinkelmann@addaleax thanks a lot for the merge! Given the comment above by @aabuelenin, can we reopen the ticket until
--prof-processis confirmed to work?Hey, any updates on this? Did anyone get
--prof-processto work with Node v9?12 remaining items
@joseph-jja Can you open a new issue, please? I get that the bottom line is the same, but it would really be nice to not piggy-back on existing issues. That also gives the problem you are experiencing more visibility.
As far as I'm concerned, the original issue is resolved —
--node-profworks as expected in Node v10.10. So let's close this and create new issues for any related problems.So does this mean prof process won't be fixed in node 8.x?
@joseph-jja we are interested in fixing it. Can you please open a new issue explaining how to reproduce the error on 8.x
Reacted by Joeisolate-0x56385f9c7470-v8.log.gz
Hangs on v8.10.0
I just attempted to run the below on v8.14.0 and it worked fine. Am I missing something
node --pro -e "for(var i=0;i<1E7;i++);" node --prof-process isolate*.logv8.14.0 generates isolate logs and when I prof process doing the below:
node --prof-process isolatexxxxx.log > logs/prof-1.txt
it spits out a bunch of errors to the console. What does make it into the file does look like it did some profiling.
v8.14.0 also generates messages about Code move event for unknown code: with an address which do not end up in the isolate logs, which used to. Not sure they belong there. Also for each profile log it spits out this message:
(node:15644) [BROKEN_PROFILE_FILE] Warning: Profile file isolate-0x103000000-v8.log is broken
"tick,0x7fff91dedf49,117042369,1,0x10003965a,3,0x1001f27b0,0x24708cf3be16,0x24708cf3b8cd,0x24704dad98b7,0x2" at the file end is broken(node:15735) [BROKEN_PROFILE_FILE] Warning: Profile file isolate-0x103800000-v8.log is broken
"tick,0x10062eaa7,117041854,0,0x7fff" at the file end is brokenI suppose somewhere after the tick there is a tock?
@joseph-jja I believe the issue you might be looking for is #19199.
By the way, I tried --prof and --prof-process on several v8.x versions (including the ones where issues were reported) and didn't get any errors. We need reproducibles, if you could share a minimal example (with code) where this issue is happening it would be awesome :)
I'm going to reopen this issue until we have a fix for 8.x
Node.js v8.x has reached the end-of-life and won't receive any fixes anymore. I am closing this since this issue only applies to Node.js v8.x. No matter if you run into this issue or not, please update to a newer Node.js version in case you still use v8.x.
- added a commit that references this issue
on Jul 27, 2026
node --prof-processdoesn't work in the current Node version.Same result when pointing to an isolate file.