mape/node-profile

Error: Could not generate profile.

Opened this issue · 9 comments

I just installed node-profile, and when I try it on any file, I get the error

Could not generate profile.

This is the case even when I try it on a file as simple as

var j = 0;
for (var i = 0; i < 10000; i++) { j++; };

Any ideas? The log file is deleted, even if I pass a flag like -o=profile.txt.

mape commented

Is this still an issue? I just added a more verbose error message which could be helpful.

tj commented

fails for me still too

tj commented

this is all i get

Could not generate profile.

Command failed:
Successfully deleted temporary: profile-13129966133549010.log

I had this same issue on Mac Os X. To fix it, I followed these steps:

  1. cd /your_node_dir/deps/v8/
  2. scons d8
  3. export D8_PATH=/your_node_dir/deps/v8/

Remember, in order for this to work, you need to have scons installed and you need to replace your_node_dir with the actual path to your node install.

The last line sets the environment variable that you need. I just added this line to my bash .profile file for convenience. Now the profiler seems to work fine.

I was clued into the problem by running the mac-tick-processor (found via locate mac-tick-processor) and reading the message. I hope this is able to help some of you.

if you're on a 64bit machine use

scons d8 arch=x64

I'm not sure which one did it but I ran "scons d8", "scons prof=on", "scons d8 arch=x64" and "scons prof=on arch=x64" and after that it started to work ... could this be moved to the main page?

@lietu what's your system configuration? I'll try to test it asap

@sedictor What are you interested in? ... the box seems to be running Ubuntu 11.10, uname -a says:
Linux devbox 3.0.0-15-server #26-Ubuntu SMP Fri Jan 20 19:07:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
... also theoretically relevant, that node was installed with NVM to ~/.nvm/ instead of to system-wide folders

vvo commented

If you're on linux debian 64bits using nvm :

sudo updatedb
sudo apt-get install libc6-dev-amd64 g++-multilib

cd ~/.nvm/src/node-v0.6.12/deps/v8
scons d8

Then
D8_PATH=/path/to/v8/folder /path/to/linux-tick-processor

Will work.

Also, if using nvm, you get trouble because we should get current version with nvm .. command and then locate good folder.

Will try to fork and update for linux.