Code Monkey home page Code Monkey logo

v8-profiler's Introduction

Build Status Build status npm version

v8-profiler provides node bindings for the v8 profiler and integration with node-inspector

Installation

npm install v8-profiler

Usage

var profiler = require('v8-profiler');

API

takeSnapshot([name]) - returns new HEAP Snapshot instance. name is optional argument, by default snapshot name will be constructed from his uid.

deleteAllSnapshots() - works as described in name.

var snapshot1 = profiler.takeSnapshot('1');
var snapshot2 = profiler.takeSnapshot();
profiler.deleteAllSnapshots();

startProfiling([name], [recsamples]) - start CPU profiling. name is optional argument, by default profile name will be constructed from his uid. recsamples is true by default.

stopProfiling([name]) - returns new CPU Profile instance. There is no strictly described behavior for usage without name argument.

setSamplingInterval([num]) - Changes default CPU profiler sampling interval to the specified number of microseconds. Default interval is 1000us. This method must be called when there are no profiles being recorded. If called without arguments it resets interval to default.

deleteAllProfiles() - works as described in name.

profiler.startProfiling('', true);
setTimeout(function() {
  var profile = profiler.stopProfiling('');
  profiler.deleteAllProfiles();
}, 1000);

HEAP Snapshot API

Snapshot.getHeader() - provides short information about snapshot.

Snapshot.compare(snapshot) - creates HEAP diff for two snapshots.

Snapshot.delete() - removes snapshot from memory.

Snapshot.export([callback]) - provides simple export API for snapshot. callback(error, data) receives serialized snapshot as second argument. (Serialization is not equal to JSON.stringify result).

If callback will not be passed, export returns transform stream.

Snapshot.serialize - low level serialization method. Look Snapshot.export source for usage example.

var fs = require('fs');
var profiler = require('v8-profiler');
var snapshot1 = profiler.takeSnapshot();
var snapshot2 = profiler.takeSnapshot();

console.log(snapshot1.getHeader(), snapshot2.getHeader());

console.log(snapshot1.compare(snapshot2));

// Export snapshot to file file
snapshot1.export(function(error, result) {
  fs.writeFileSync('snapshot1.json', result);
  snapshot1.delete();
});

// Export snapshot to file stream
snapshot2.export()
  .pipe(fs.createWriteStream('snapshot2.json'))
  .on('finish', snapshot2.delete);

CPU Profile API

Profile.getHeader() - provides short information about profile.

Profile.delete() - removes profile from memory.

Profile.export([callback]) - provides simple export API for profile. callback(error, data) receives serialized profile as second argument. (Serialization is equal to JSON.stringify result).

var fs = require('fs');
var profiler = require('v8-profiler');
profiler.startProfiling('1', true);
var profile1 = profiler.stopProfiling();
profiler.startProfiling('2', true);
var profile2 = profiler.stopProfiling();

console.log(snapshot1.getHeader(), snapshot2.getHeader());

profile1.export(function(error, result) {
  fs.writeFileSync('profile1.json', result);
  profile1.delete();
});

profile2.export()
  .pipe(fs.createWriteStream('profile2.json'))
  .on('finish', function() {
    profile2.delete();
  });

node-inspector

Cpu profiles can be viewed and heap snapshots may be taken and viewed from the profiles panel.

v8-profiler's People

Contributors

3y3 avatar arunoda avatar bajtos avatar bnoordhuis avatar c4milo avatar dannycoates avatar hustxiaoc avatar jimthedev avatar mutantcornholio avatar ofrobots avatar rvagg avatar sebdeckers avatar smikes avatar thlorenz avatar yorkie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v8-profiler's Issues

Error while installing on windows

I am getting following error while installing v8-profiler on windows.

node "C:\Program File
s\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node
-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd G:\DefaultWorkspace\mem-leak-test\node_modules\v8-profiler
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

I have installed Python, added it to path, also installed Visual Studio 2012 Express edition and Visual C++ 2010. I have read that this is due to api changes in latest V8.
Is this right?

Any example of taking heapsnapshot would help

var profiler = require('v8-profiler');
var snapshot = profiler.takeSnapshot('test');

Once I generate snapshot with the above code, how do I store it to a file so that I can load it in chrome devtools?
snapshot.serialize( ...) does not seem to work and the below is also giving error -
fs.writeFile('/tmp/a.heapsnapshot', JSON.stringify(snapshot));

Any examples to generate the heapsnhot would be appreciated

Unable to install on Windows 7

C:\Projects\some\SomeEditor\node_modules\v8-profiler>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-
gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack at Object.oncomplete (evalmachine.:107:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projects\some\SomeEditor\node_modules\v8-profiler

If I set python path, then I get:

set python=C:\Python34;

C:\Projects\some\SomeEditor\node_modules\v8-profiler>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-
gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:1001:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:792:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Projects\some\SomeEditor\node_modules\v8-profiler

How can I fix that? Is there prebuilt version for Windows 7?

Error: module did not self-register [iojs 1.4.1]

Pesky iojs user here. Version 1.2.x seemed to reproduce this problem as well. Basically, when trying to include v8-profiler in any nodejs app, the module fails to load.

Node Inspector is now available from http://127.0.0.1:8080/debug?port=5858
Debugging server.js

Debugger listening on port 5858
module.js:339
Module._extensions[extension](this, filename);
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:339:32)
at Function.Module._load (module.js:294:12)
at Module.require (module.js:349:17)
at require (module.js:368:17)
at Object. (C:\source\trunk\Proxy\node_modules\v8-pro
filer\v8-profiler.js:4:15)
at Module._compile (module.js:444:26)
at Object.Module._extensions..js (module.js:462:10)
at Module.load (module.js:339:32)
at Function.Module._load (module.js:294:12)
at Module.require (module.js:349:17)
at require (module.js:368:17)
at Object. (C:\source\trunk\Proxy\server.js:11:16)
at Module._compile (module.js:444:26)
at Object.Module._extensions..js (module.js:462:10)
at Module.load (module.js:339:32)
at Function.Module._load (module.js:294:12)
at Module.runMain as _onTimeout
at Timer.listOnTimeout (timers.js:88:15)

Elasticbeanstalk environment error related to v8-profiler

Hi, we are using amazon web services elasticbeanstalk to deploy our node.js app. And few days ago we started to have an error in the logs that is said to be related to v8-profiler (please see below in the end of the log). It prevents the environment from deploying the app.

Any idea what could be the problem? Not sure if we should seek help here or on Amazon side, so created also a post on Amazon's forum

-------------------------------------
/var/log/nodejs/npm-debug.log
-------------------------------------
29662 verbose linkMans [email protected]
29663 verbose rebuildBundles [email protected]
29664 verbose rebuildBundles [ 'deep-extend', 'ini', 'minimist', 'strip-json-comments' ]
29665 info install [email protected]
29666 info postinstall [email protected]
29667 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist
29668 info preinstall [email protected]
29669 verbose linkStuff [ false,
29669 verbose linkStuff   false,
29669 verbose linkStuff   false,
29669 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules' ]
29670 info linkStuff [email protected]
29671 verbose linkBins [email protected]
29672 verbose linkMans [email protected]
29673 verbose rebuildBundles [email protected]
29674 info install [email protected]
29675 info postinstall [email protected]
29676 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules/deep-extend
29677 info preinstall [email protected]
29678 verbose linkStuff [ false,
29678 verbose linkStuff   false,
29678 verbose linkStuff   false,
29678 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules' ]
29679 info linkStuff [email protected]
29680 verbose linkBins [email protected]
29681 verbose linkMans [email protected]
29682 verbose rebuildBundles [email protected]
29683 info install [email protected]
29684 info postinstall [email protected]
29685 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments
29686 info preinstall [email protected]
29687 verbose linkStuff [ false,
29687 verbose linkStuff   false,
29687 verbose linkStuff   false,
29687 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules' ]
29688 info linkStuff [email protected]
29689 verbose linkBins [email protected]
29690 verbose link bins [ { 'strip-json-comments': 'cli.js' },
29690 verbose link bins   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules/.bin',
29690 verbose link bins   false ]
29691 verbose linkMans [email protected]
29692 verbose rebuildBundles [email protected]
29693 info install [email protected]
29694 info postinstall [email protected]
29695 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules/ini
29696 info preinstall [email protected]
29697 verbose linkStuff [ false,
29697 verbose linkStuff   false,
29697 verbose linkStuff   false,
29697 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/node-pre-gyp/node_modules/rc/node_modules' ]
29698 info linkStuff [email protected]
29699 verbose linkBins [email protected]
29700 verbose linkMans [email protected]
29701 verbose rebuildBundles [email protected]
29702 info install [email protected]
29703 info postinstall [email protected]
29704 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules/nan
29705 info preinstall [email protected]
29706 verbose linkStuff [ false,
29706 verbose linkStuff   false,
29706 verbose linkStuff   false,
29706 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules/v8-debug/node_modules' ]
29707 info linkStuff [email protected]
29708 verbose linkBins [email protected]
29709 verbose linkMans [email protected]
29710 verbose rebuildBundles [email protected]
29711 info install [email protected]
29712 info postinstall [email protected]
29713 info build /tmp/deployment/application/node_modules/node-inspector/node_modules/v8-profiler
29714 info preinstall [email protected]
29715 verbose unsafe-perm in lifecycle false
29716 verbose linkStuff [ false,
29716 verbose linkStuff   false,
29716 verbose linkStuff   false,
29716 verbose linkStuff   '/tmp/deployment/application/node_modules/node-inspector/node_modules' ]
29717 info linkStuff [email protected]
29718 verbose linkBins [email protected]
29719 verbose linkMans [email protected]
29720 verbose rebuildBundles [email protected]
29721 verbose rebuildBundles [ '.bin', 'nan', 'node-pre-gyp' ]
29722 info install [email protected]
29723 verbose unsafe-perm in lifecycle false
29724 info [email protected] Failed to exec install script
29725 error [email protected] install: `node-pre-gyp install --fallback-to-build`
29725 error Exit status 8
29726 error Failed at the [email protected] install script.
29726 error This is most likely a problem with the v8-profiler package,
29726 error not with npm itself.
29726 error Tell the author that this fails on your system:
29726 error     node-pre-gyp install --fallback-to-build
29726 error You can get their info via:
29726 error     npm owner ls v8-profiler
29726 error There is likely additional logging output above.
29727 error System Linux 3.14.35-28.38.amzn1.x86_64
29728 error command "/opt/elasticbeanstalk/node-install/node-v0.10.31-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v0.10.31-linux-x64/bin/npm" "--production" "rebuild"
29729 error cwd /tmp/deployment/application
29730 error node -v v0.10.31
29731 error npm -v 1.4.23
29732 error code ELIFECYCLE
29733 verbose exit [ 1, true ]

Install fail on windows

Hi,
the install of last version faill on windows.

[email protected] postinstall D:\PJ_SoLoMo\source\geojon_in\osm\node_modules\mongosm\node_modules\v8-profiler
ln -sf build/Release/profiler.node profiler.node

'ln' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! [email protected] postinstall: ln -sf build/Release/profiler.node profiler.node
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ln -sf build/Release/profiler.node profiler.node
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "v8-profiler"
npm ERR! cwd D:\PJ_SoLoMo\source\geojon_in\osm\node_modules\mongosm
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\PJ_SoLoMo\source\geojon_in\osm\node_modules\mongosm\npm-debug.log
npm ERR! not ok code 0

Require "v8-profiler" failed

Hey. I have problems connecting module v8-profiler:

node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZNK2v813HeapGraphNode16GetDominatorNodeEv

Running node with debugger (first line in server.js like "require('v8-profiler');"):

tt-local:/var/www/test.battleship.local/js# node --debug /var/www/test.battleship.local/js/server.js
debugger listening on port 5858

module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: /var/www/test.battleship.local/js/node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZNK2v813HeapGraphNode16GetDominatorNodeEv
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/var/www/test.battleship.local/js/node_modules/v8-profiler/v8-profiler.js:1:77)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

System info:

tt-local:/var/www/test.battleship.local/js# uname -a
Linux tt-local 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux
Also, I can provide additional technical information as you wish.

Unable to install on linuxMint 14

tapin13@tapin13-pc ~/nodeJS/NodeJS $ npm install v8-profiler
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler

[email protected] install /home/tapin13/nodeJS/NodeJS/node_modules/v8-profiler
node-gyp rebuild

make: Entering directory /home/tapin13/nodeJS/NodeJS/node_modules/v8-profiler/build' CXX(target) Release/obj.target/profiler/cpu_profiler.o CXX(target) Release/obj.target/profiler/graph_edge.o CXX(target) Release/obj.target/profiler/graph_node.o ../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainersCount(v8::Local<v8::String>, const v8::AccessorInfo&)’: ../graph_node.cc:99:53: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainersCount’ ../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’: ../graph_node.cc:132:52: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainedSize’ ../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainer(const v8::Arguments&)’: ../graph_node.cc:154:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainer’ ../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetDominator(v8::Local<v8::String>, const v8::AccessorInfo&)’: ../graph_node.cc:162:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetDominatorNode’ make: *** [Release/obj.target/profiler/graph_node.o] Error 1 make: Leaving directory/home/tapin13/nodeJS/NodeJS/node_modules/v8-profiler/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.2-030802-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/tapin13/nodeJS/NodeJS/node_modules/v8-profiler
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
tapin13@tapin13-pc ~/nodeJS/NodeJS $

tapin13@tapin13-pc ~/nodeJS/NodeJS $ uname -a
Linux tapin13-pc 3.8.2-030802-generic #201303031906 SMP Mon Mar 4 00:18:04 UTC 2013 i686 i686 i686 GNU/Linux

Unable to install on ubuntu 12.04 EC2

npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler

[email protected] install /home/ubuntu/RTB/node_modules/v8-profiler
node-gyp rebuild

make: Entering directory /home/ubuntu/RTB/node_modules/v8-profiler/build' CXX(target) Release/obj.target/profiler/cpu_profiler.o CXX(target) Release/obj.target/profiler/graph_edge.o CXX(target) Release/obj.target/profiler/graph_node.o ../graph_node.cc: In static member function âstatic v8::Handle<v8::Value> nodex::GraphNode::GetRetainersCount(v8::Local<v8::String>, const v8::AccessorInfo&)â: ../graph_node.cc:99:53: error: âclass v8::HeapGraphNodeâ has no member named âGetRetainersCountâ ../graph_node.cc: In static member function âstatic v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)â: ../graph_node.cc:132:52: error: âclass v8::HeapGraphNodeâ has no member named âGetRetainedSizeâ ../graph_node.cc: In static member function âstatic v8::Handle<v8::Value> nodex::GraphNode::GetRetainer(const v8::Arguments&)â: ../graph_node.cc:154:65: error: âclass v8::HeapGraphNodeâ has no member named âGetRetainerâ ../graph_node.cc: In static member function âstatic v8::Handle<v8::Value> nodex::GraphNode::GetDominator(v8::Local<v8::String>, const v8::AccessorInfo&)â: ../graph_node.cc:162:65: error: âclass v8::HeapGraphNodeâ has no member named âGetDominatorNodeâ make: *** [Release/obj.target/profiler/graph_node.o] Error 1 make: Leaving directory/home/ubuntu/RTB/node_modules/v8-profiler/build'

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 3.2.0-36-virtual
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/RTB/node_modules/v8-profiler
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-36-virtual
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "v8-profiler"
npm ERR! cwd /home/ubuntu/RTB/Pixel
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/RTB/Pixel/npm-debug.log
npm ERR! not ok code 0

npm install v8-profiler fails on node v0.4.8

npm install v8-profiler

yields:

ERR! [email protected] preinstall: node-waf clean || true; node-waf configure build
ERR! sh "-c" "node-waf clean || true; node-waf configure build" failed with 127
ERR!
ERR! Failed at the [email protected] preinstall script.
ERR! This is most likely a problem with the v8-profiler package,
ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
ERR! node-waf clean || true; node-waf configure build
ERR! You can get their info via:
ERR! npm owner ls v8-profiler
ERR! There is likely additional logging output above.
ERR!
ERR! System Darwin 10.8.0
ERR! command "node" "/usr/local/bin/npm" "install" "v8-profiler"

Cannot find module './build/Release/profiler'

Hi,

I'm running node 0.6.11 and npm 1.1.18. I can npm install v8-profiler just fine, but when I get to require() it in any script I get this:

Error: Cannot find module './build/Release/profiler'

I checked in node_modules/v8-profiler/build/, and there is in fact no Release/ directory.

Any suggestions? This is on an Ubuntu 10.10 host on Amazon EC2.

Thanks,

-- Doug

Unable to install node-inspector due to errors for v8-profiler

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "node-inspector"
npm ERR! cwd /Users/charlievaughan2
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Install error

This is from an install of node-inspector on debian wheezy VM.

The pertinent info from error log is below

7993 verbose unsafe-perm in lifecycle false
7994 info postinstall [email protected]
7995 info [email protected] Failed to exec install script
7996 verbose unsafe-perm in lifecycle false
7997 verbose unlock done using /tmp/package-npm-build20141217-12426-3tlgda/npm_cache/_locks/v8-profiler-f2f667534b8d1b43.lock for /tmp/package-npm-staging20141217-12426-ku306y/usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler
7998 verbose unlock done using /tmp/package-npm-build20141217-12426-3tlgda/npm_cache/_locks/ws-1832b606207cfbd5.lock for /tmp/package-npm-staging20141217-12426-ku306y/usr/local/lib/node_modules/node-inspector/node_modules/ws
7999 info [email protected] Failed to exec install script
8000 verbose unlock done using /tmp/package-npm-build20141217-12426-3tlgda/npm_cache/_locks/v8-debug-1a2e513680e6a1ee.lock for /tmp/package-npm-staging20141217-12426-ku306y/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug
8001 verbose about to build /tmp/package-npm-staging20141217-12426-ku306y/usr/local/lib/node_modules/node-inspector
8002 verbose unlock done using /tmp/package-npm-build20141217-12426-3tlgda/npm_cache/_locks/node-inspector-a32a6c47c0cbf1ab.lock for /tmp/package-npm-staging20141217-12426-ku306y/usr/local/lib/node_modules/node-inspector
8003 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
8003 verbose stack Exit status 127
8003 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
8003 verbose stack     at ChildProcess.emit (events.js:98:17)
8003 verbose stack     at maybeClose (child_process.js:755:16)
8003 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:822:5)
8004 verbose pkgid [email protected]
8005 verbose cwd /home/sam
8006 error Linux 3.14-0.bpo.1-amd64
8007 error argv "node" "/usr/bin/npm" "install" "node_modules/node-inspector/" "--cache" "/tmp/package-npm-build20141217-12426-3tlgda/npm_cache" "--loglevel" "warn" "--global" "true" "--prefix" "/tmp/package-npm-staging20141217-12426-ku306y/usr/local"
8008 error node v0.10.29
8009 error npm  v2.1.5
8010 error code ELIFECYCLE
8011 error [email protected] install: `node-pre-gyp install --fallback-to-build`
8011 error Exit status 127
8012 error Failed at the [email protected] install script.
8012 error This is most likely a problem with the v8-profiler package,
8012 error not with npm itself.

Let me know if I can provide any more info!

npm install fails on linux ubuntu with node 0.3.2.pre

I think I have to install the v8 headers or something?
could you post some description of the dependencies needed? thx

output is:
npm install v8-profiler
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info preinstall [email protected]
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /root/.node_libraries
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.030s)
Waf: Entering directory /usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build' [1/9] cxx: snapshot.cc -> build/default/snapshot_1.o [2/9] cxx: graph_edge.cc -> build/default/graph_edge_1.o [3/9] cxx: graph_node.cc -> build/default/graph_node_1.o ../graph_node.cc: In static member function 'static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)': ../graph_node.cc:143: error: no matching function for call to 'v8::HeapGraphNode::GetRetainedSize()' /usr/local/include/node/v8-profiler.h:297: note: candidates are: int v8::HeapGraphNode::GetRetainedSize(bool) const Waf: Leaving directory/usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build'
Build failed: -> task failed (err #1):
{task: cxx graph_node.cc -> graph_node_1.o}
npm info [email protected] Failed to exec preinstall script
npm ERR! install failed Error: [email protected] preinstall: node-waf configure build
npm ERR! install failed sh failed with 1
npm ERR! install failed at ChildProcess. (/usr/local/lib/node/.npm/npm/0.2.10-1/package/lib/utils/exec.js:24:18)
npm ERR! install failed at ChildProcess.emit (events.js:34:17)
npm ERR! install failed at ChildProcess.onexit (child_process.js:164:12)
npm info install failed rollback
npm info uninstall [ '[email protected]' ]
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info auto-deactive not symlink
npm info postuninstall [email protected]
npm info uninstall [email protected] complete
npm info install failed rolled back
npm ERR! Error: [email protected] preinstall: node-waf configure build
npm ERR! sh failed with 1
npm ERR! at ChildProcess. (/usr/local/lib/node/.npm/npm/0.2.10-1/package/lib/utils/exec.js:24:18)
npm ERR! at ChildProcess.emit (events.js:34:17)
npm ERR! at ChildProcess.onexit (child_process.js:164:12)
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There may be additional logging output above.
npm not ok

can't install on window7 with node 0.6.6

npm ERR! error installing [email protected]
npm ERR! [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! cmd "/c" "node-waf clean || (exit 0); node-waf configure build" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "v8-profiler"
npm ERR! cwd C:\seth\swm\widget
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! message cmd "/c" "node-waf clean || (exit 0); node-waf configure build" failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\seth\swm\widget\npm-debug.log

it does not wants to be installed from npm on nodejs v0.3...

rakia@rakiaproxy:~$  npm install v8-profiler
npm info it worked if it ends with ok
npm info using [email protected]
npm info fetch http://registry.npmjs.org/v8-profiler/-/v8-profiler-0.0.1.tgz
npm info install [email protected]
npm info preinstall [email protected]
Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for node path                   : ok /home/rakia/.node_libraries
Checking for node prefix                 : ok /usr/local
'configure' finished successfully (0.110s)
Waf: Entering directory `/home/rakia/.node_libraries/.npm/v8-profiler/0.0.1/package/build'
[1/9] cxx: snapshot.cc -> build/default/snapshot_1.o
[2/9] cxx: graph_edge.cc -> build/default/graph_edge_1.o
../graph_edge.cc: In static member function גstatic v8::Handle<v8::Value> nodex::GraphEdge::GetType(v8::Local<v8::String>, const v8::AccessorInfo&)ג:
../graph_edge.cc:38: error: גkHiddenג is not a member of גv8::HeapGraphEdgeג
../graph_edge.cc:41: error: גkShortcutג is not a member of גv8::HeapGraphEdgeג
Waf: Leaving directory `/home/rakia/.node_libraries/.npm/v8-profiler/0.0.1/package/build'
Build failed:  -> task failed (err #1):
        {task: cxx graph_edge.cc -> graph_edge_1.o}
npm info [email protected] Failed to exec preinstall script
npm ERR! install failed Error: [email protected] preinstall: `node-waf configure build`
npm ERR! install failed `sh` failed with 1
npm ERR! install failed     at ChildProcess.<anonymous> (/home/rakia/.node_libraries/.npm/npm/0.2.4-1/package/lib/utils/exec.js:24:18)
npm ERR! install failed     at ChildProcess.emit (events.js:27:15)
npm ERR! install failed     at ChildProcess.onexit (child_process.js:169:12)
npm info install failed rollback
npm info not installed v8-profiler,0.0.1
npm info install failed rolled back
npm ERR! Error: [email protected] preinstall: `node-waf configure build`
npm ERR! `sh` failed with 1
npm ERR!     at ChildProcess.<anonymous> (/home/rakia/.node_libraries/.npm/npm/0.2.4-1/package/lib/utils/exec.js:24:18)
npm ERR!     at ChildProcess.emit (events.js:27:15)
npm ERR!     at ChildProcess.onexit (child_process.js:169:12)
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls v8-profiler
npm ERR! There may be additional logging output above.
npm not ok

More of a question than an issue - how to get the underlying object

Is there a way to get the underlying object from a snapshot? I would like to get the retainers and then if one of them is an array, be able to return it to the nodejs program so that I can poke around in it. It looks like everything being manipulated in the graph_node and other files are heapnodes, but I can't find any docs saying how to turn the ptr returned into an object that can be manipulated by the calling program. Any advice would be welcome. Thanks,

Link error with Node v0.8.7

Googling didn't help this one unfortunately. It's throwing a link error (after numerous warnings, not included).

 Creating library c:\Program Files\nodejs\node_modules\v8-profiler\build\Release\profiler.lib and object c:\Program Files\nodejs\node_modules\v8-profiler\build\Release\profiler.exp

graph_node.obj : error LNK2001: unresolved external symbol "public: class v8::HeapGraphNode const * __thiscall v8::HeapGraphNode::GetDominatorNode(void)const" (?GetDominatorNode@HeapGraphNode@v8@@QBEPBV12@XZ) [c:\Program Files\nodejs\node_modules\v8-profiler\build\profiler.vcxproj]
graph_node.obj : error LNK2001: unresolved external symbol "public: class v8::H
eapGraphEdge const * __thiscall v8::HeapGraphNode::GetRetainer(int)const " (?Ge
tRetainer@HeapGraphNode@v8@@QBEPBVHeapGraphEdge@2@H@Z) [c:\Program Files\nodejs
\node_modules\v8-profiler\build\profiler.vcxproj]
graph_node.obj : error LNK2001: unresolved external symbol "public: int __thisc
all v8::HeapGraphNode::GetRetainersCount(void)const " (?GetRetainersCount@HeapG
raphNode@v8@@QBEHXZ) [c:\Program Files\nodejs\node_modules\v8-profiler\build\pr
ofiler.vcxproj]
graph_node.obj : error LNK2001: unresolved external symbol "public: int __thisc
all v8::HeapGraphNode::GetRetainedSize(void)const " (?GetRetainedSize@HeapGraph
Node@v8@@QBEHXZ) [c:\Program Files\nodejs\node_modules\v8-profiler\build\profil
er.vcxproj]
c:\Program Files\nodejs\node_modules\v8-profiler\build\Release\profiler.node :
fatal error LNK1120: 4 unresolved externals [c:\Program Files\nodejs\node_modul
es\v8-profiler\build\profiler.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:215:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Program Files\nodejs\node_modules\v8-profiler
gyp ERR! node -v v0.8.7
gyp ERR! node-gyp -v v0.6.5
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\Program Files\nodejs\node.exe" "c:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "v8-profiler"
npm ERR! cwd c:\Program Files\nodejs
npm ERR! node -v v0.8.7
npm ERR! npm -v 1.1.49
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Program Files\nodejs\npm-debug.log
npm ERR! not ok code 0

graph_node error

hi, master:
I build v8-profiler 3.6.2-1 with nodejs v0.8 in x86/win7 used vc10.
but raise that errors

>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(991,5): warning MSB8012: TargetExt(.dll) does not match the Linker's OutputFile property value (.node). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>     Creating library F:\dannycoates-v8-profiler-dfb6d7f\build\Release\profiler.lib and object F:\dannycoates-v8-profiler-dfb6d7f\build\Release\profiler.exp
1>graph_node.obj : error LNK2001: unresolved external symbol "public: class v8::HeapGraphNode const * __thiscall v8::HeapGraphNode::GetDominatorNode(void)const " (?GetDominatorNode@HeapGraphNode@v8@@QBEPBV12@XZ)
1>graph_node.obj : error LNK2001: unresolved external symbol "public: class v8::HeapGraphEdge const * __thiscall v8::HeapGraphNode::GetRetainer(int)const " (?GetRetainer@HeapGraphNode@v8@@QBEPBVHeapGraphEdge@2@H@Z)
1>graph_node.obj : error LNK2001: unresolved external symbol "public: int __thiscall v8::HeapGraphNode::GetRetainersCount(void)const " (?GetRetainersCount@HeapGraphNode@v8@@QBEHXZ)
1>graph_node.obj : error LNK2001: unresolved external symbol "public: int __thiscall v8::HeapGraphNode::GetRetainedSize(void)const " (?GetRetainedSize@HeapGraphNode@v8@@QBEHXZ)
1>F:\dannycoates-v8-profiler-dfb6d7f\build\Release\profiler.node : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

what can i do ?


related:#16 issues with keyword *graph_node *

and this #16 (comment)

Unable to install on Windows 7: Failed to execute 'node-gyp.cmd rebuild...'

I get the following:

> [email protected] install C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler
> node-pre-gyp install --fallback-to-build


C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --name=v8-profiler --configuration=Release --module_name=profiler --version=5.2.1 --major=5 --minor=2 --patch=1 --runtime=node --node_abi=node-v11 --platform=win32 --target_platform=win32 --arch=x64 --target_arch=x64 --module_main=v8-profiler --host=https://node-inspector.s3.amazonaws.com/ --module_path=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64 --module=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64\profiler.node --remote_path=./profiler/v5.2.1/ --package_name=node-v11-win32-x64.tar.gz --staged_tarball=build\stage\profiler\v5.2.1\node-v11-win32-x64.tar.gz --hosted_path=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/ --hosted_tarball=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/node-v11-win32-x64.tar.gz 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--name=v8-profiler" "--configuration=Release" "--module_name=profiler" "--version=5.2.1" "--major=5" "--minor=2" "--patch=1" "--runtime=node" "--node_abi=node-v11" "--platform=win32" "--target_platform=win32" "--arch=x64" "--target_arch=x64" "--module_main=v8-profiler" "--host=https://node-inspector.s3.amazonaws.com/" "--module_path=C:\\Users\\adonome\\AppData\\Roaming\\npm\\node_modules\\v8-profiler\\build\\profiler\\v5.2.1\\node-v11-win32-x64" "--module=C:\\Users\\adonome\\AppData\\Roaming\\npm\\node_modules\\v8-profiler\\build\\profiler\\v5.2.1\\node-v11-win32-x64\\profiler.node" "--remote_path=./profiler/v5.2.1/" "--package_name=node-v11-win32-x64.tar.gz" "--staged_tarball=build\\stage\\profiler\\v5.2.1\\node-v11-win32-x64.tar.gz" "--hosted_path=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/" "--hosted_tarball=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/node-v11-win32-x64.tar.gz"
gyp ERR! cwd C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler
gyp ERR! node -v v0.10.34
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd rebuild --name=v8-profiler --configuration=Release --module_name=profiler --version=5.2.1 --major=5 --minor=2 --patch=1 --runtime=node --node_abi=node-v11 --platform=win32 --target_platform=win32 --arch=x64 --target_arch=x64 --module_main=v8-profiler --host=https://node-inspector.s3.amazonaws.com/ --module_path=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64 --module=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64\profiler.node --remote_path=./profiler/v5.2.1/ --package_name=node-v11-win32-x64.tar.gz --staged_tarball=build\stage\profiler\v5.2.1\node-v11-win32-x64.tar.gz --hosted_path=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/ --hosted_tarball=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/node-v11-win32-x64.tar.gz' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\node_modules\node-pre-gyp\lib\util\compile.js:76:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:766:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "node" "C:\\Users\\adonome\\AppData\\Roaming\\npm\\node_modules\\v8-profiler\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler
node-pre-gyp ERR! node -v v0.10.34
node-pre-gyp ERR! node-pre-gyp -v v0.5.31
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp.cmd rebuild --name=v8-profiler --configuration=Release --module_name=profiler --version=5.2.1 --major=5 --minor=2 --patch=1 --runtime=node --node_abi=node-v11 --platform=win32 --target_platform=win32 --arch=x64 --target_arch=x64 --module_main=v8-profiler --host=https://node-inspector.s3.amazonaws.com/ --module_path=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64 --module=C:\Users\adonome\AppData\Roaming\npm\node_modules\v8-profiler\build\profiler\v5.2.1\node-v11-win32-x64\profiler.node --remote_path=./profiler/v5.2.1/ --package_name=node-v11-win32-x64.tar.gz --staged_tarball=build\stage\profiler\v5.2.1\node-v11-win32-x64.tar.gz --hosted_path=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/ --hosted_tarball=https://node-inspector.s3.amazonaws.com/profiler/v5.2.1/node-v11-win32-x64.tar.gz' (1)

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "v8-profiler"
npm ERR! cwd C:\Users\adonome
npm ERR! node -v v0.10.34
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

Build fails with node v0.9.x

../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainersCount(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:99:53: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainersCount’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’:
../graph_node.cc:132:52: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainedSize’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainer(const v8::Arguments&)’:
../graph_node.cc:154:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainer’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetDominator(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:162:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetDominatorNode’

Snapshot errors on 3.6.2

When trying to take a snapshot using function:

undefined:1
:true}Content-Le
                       ^
SyntaxError: Unexpected token C
    at Object.parse (native)
    at parse (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:36:22)
    at Socket.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:67:17)
    at TCP.onread (net.js:324:31)

When taking one in node inspector:

undefined:1
(length: 624814)
                       ^
SyntaxError: Unexpected end of input
    at Object.parse (native)
    at /home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/session.js:910:26
    at Object.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/callback.js:22:18)
    at parse (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:38:29)
    at Socket.<anonymous> (/home/tanepiper/.nave/installed/0.6.5/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:67:17)
    at TCP.onread (net.js:324:31)

On node 0.6.5 on Ubuntu 11.10 32bit with latest node-inspector from npm

Compilation Error

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : ok /home/nrajlich/.node_libraries 
Checking for node prefix                 : ok /usr/local 
'configure' finished successfully (0.085s)
Waf: Entering directory `/usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build'
[1/9] cxx: snapshot.cc -> build/default/snapshot_1.o
[2/9] cxx: graph_edge.cc -> build/default/graph_edge_1.o
[3/9] cxx: graph_node.cc -> build/default/graph_node_1.o
[4/9] cxx: graph_path.cc -> build/default/graph_path_1.o
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’:
../graph_node.cc:143: error: no matching function for call to ‘v8::HeapGraphNode::GetRetainedSize()’
/usr/local/include/node/v8-profiler.h:297: note: candidates are: int v8::HeapGraphNode::GetRetainedSize(bool) const
Waf: Leaving directory `/usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build'
Build failed:  -> task failed (err #1): 
    {task: cxx graph_node.cc -> graph_node_1.o}

This is with Ubuntu 10.10 x86, and master Node as of just a few minutes ago. You need to pass a bool to the GetRetainedSize() function, otherwise it doesn't compile.

Here's a simple patch that gets the job done:
https://gist.github.com/29f39f39f622eee49b58

Works in other Isolate (Node Inspector 0.10)

When we try to inject v8-profiler to application, with help of node-inspector injector, it not works correctly:
CPU profile contains only functions called by v8-debugger script.

For Node v0.11.* all works correctly.

What happens during injecting:

  1. We wait when debugger was connected to application.

  2. If application not already paused (started without --debug-brk), we pause it by evaluating:

    process.once("__injector_break__", function __injector_break__(){debugger});
    process.emit("__injector_break__");

    For more information "why so?" ask in comments.

  3. When application is paused, we can find frame that contains require function and evaluate InjectorServer script. The most important thing is that in this step we start to work in debugger context and isolate

  4. Now we have access to v8-debug from our application and we can register our proprietary events and commands (see v8-debug api). We register ProfilerAgent injection.

What happens after injecting:

  1. We send to application our new command Profiler.startProfiling. The realisation of called function is different for 0.10 and 0.11 node versions:

    #if (NODE_MODULE_VERSION > 0x000B)
      v8::Isolate::GetCurrent()->GetCpuProfiler()->StartProfiling(title, recsamples);
    #else
      v8::CpuProfiler::StartProfiling(title);
    #endif
  2. We wait some times and send command Profiler.stopProfiling, that is also different for 0.10 and 0.11

Description in progress

Build error: 'make' failed with exit code: 2

v8-profiler is a dependency for a server app we're trying to install. The installer keeps keeps choking on v8-profiler, like this:

            > [email protected] install /var/www/sharelatex/spelling/node_modules/v8-profiler
            > node-pre-gyp install --fallback-to-build

            gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.38"
            gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/www/sharelatex/spelling/node_modules/v8-profiler/.node-gyp"
            make: Entering directory `/var/www/sharelatex/spelling/node_modules/v8-profiler/build'
            make: *** No rule to make target `../.node-gyp/0.10.38/common.gypi', needed by `Makefile'.  Stop.
            make: Leaving directory `/var/www/sharelatex/spelling/node_modules/v8-profiler/build'
            gyp ERR! build error
            gyp ERR! stack Error: `make` failed with exit code: 2
            gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
            gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
            gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
            gyp ERR! System Linux 2.6.32-504.16.2.el6.x86_64
            gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64/profiler.node" "--module_name=profiler" "--module_path=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64"
            gyp ERR! cwd /var/www/sharelatex/spelling/node_modules/v8-profiler
            gyp ERR! node -v v0.10.38
            gyp ERR! node-gyp -v v1.0.3
            gyp ERR! not ok
            node-pre-gyp ERR! build error
            node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64/profiler.node --module_name=profiler --module_path=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64' (1)
            node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/sharelatex/spelling/node_modules/v8-profiler/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
            node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
            node-pre-gyp ERR! stack     at maybeClose (child_process.js:766:16)
            node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:833:5)
            node-pre-gyp ERR! System Linux 2.6.32-504.16.2.el6.x86_64
            node-pre-gyp ERR! command "node" "/var/www/sharelatex/spelling/node_modules/v8-profiler/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
            node-pre-gyp ERR! cwd /var/www/sharelatex/spelling/node_modules/v8-profiler
            node-pre-gyp ERR! node -v v0.10.38
            node-pre-gyp ERR! node-pre-gyp -v v0.6.7
            node-pre-gyp ERR! not ok
            Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64/profiler.node --module_name=profiler --module_path=/var/www/sharelatex/spelling/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64' (1)
            npm ERR! Linux 2.6.32-504.16.2.el6.x86_64
            npm ERR! argv "node" "/usr/bin/npm" "install" "v8-profiler"
            npm ERR! node v0.10.38
            npm ERR! npm  v2.11.0
            npm ERR! code ELIFECYCLE

            npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
            npm ERR! Exit status 1
            npm ERR!
            npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
            npm ERR! This is most likely a problem with the v8-profiler package,
            npm ERR! not with npm itself.
            npm ERR! Tell the author that this fails on your system:
            npm ERR!     node-pre-gyp install --fallback-to-build
            npm ERR! You can get their info via:
            npm ERR!     npm owner ls v8-profiler
            npm ERR! There is likely additional logging output above.

            npm ERR! Please include the following file with any support request:
            npm ERR!     /var/www/sharelatex/spelling/node_modules/npm-debug.log

Can this be fixed manually?
~Thanks

unable to install on Ubuntu 14.04 x64

I am trying to install v8-profiler, but running into this error:

npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler

[email protected] install /home/dlewanda/Documents/switchboard/cloud-control/speed-server/node_modules/v8-profiler
node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 2
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
...
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "v8-profiler"
...
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
...

Please advise as to how to proceed.

node-pre-gyp needs to be a dep

needs to be a dep as it is required for building / is the install script. unsure how to propagate --nodeddir to it properly though.

Clue needed - how to get the Profiles tab in Node-Inspector?

My install efforts failed miserably on Friday the 13th. No idea what made the difference, but I started over today, removing all traces of Friday. Did the exact same command I used before:

ubuntu@ubuntu-armhf:~$ git clone https://github.com/node-inspector/v8-profiler Ldrv/v8p
Cloning into 'Ldrv/v8p'...

The result now includes the new version of nan in place of the 0.8 version which failed on Friday:

  • Version 1.2.0 (current Node unstable: 0.11.13, Node stable: 0.10.28)
ubuntu@ubuntu-armhf:~$ cd Ldrv/v8p
ubuntu@ubuntu-armhf:~/Ldrv/v8p$ npm install --nodedir=/home/ubuntu/Ldrv/node

--> Seemed to work!

One difference is that somehow last time I thought I had to make the GitHub v8p instead of just npm it. Probably because the npm before I explicitly pulled the GitHub version had failed so badly... Should I be able to make the same image that just npm'ed?

So I have

var profiler = require('/home/ubuntu/Ldrv/v8p/v8-profiler');

in the app, and it definitely found the v8p module, but I get no Profiles tab in Node-Inspector. That seems to have been the problem with every version conflict for years... Checking the "Profiler -> Show advanced heap snapshot properties" box didn't help.

This is complicated by my being on ARM (BBB), and having Node v0.11.14-pre (another long story), but it looks like everything I need is at least 11.13 compatible, and everyone seems to say there are no show stopping changes in 14. And what I'm trying to profile is red.js from the Node-RED package.

The "var profiler = require" line is at the top of red.js, with all the other require statements. The modules it calls should all inherit that, correct?

My start command is:

node-debug --max-old-space-size=128 /home/ubuntu/Ldrv/node-red/red.js -v

I watched it find the v8-profiler file, and it has shown no errors since.

When should the Profiles tab appear? Dynamically after it sees the require profiler call? Or should it be there when Node-Inspector first opens in my browser?

I see:
/home/ubuntu/.npm/webkit-devtools-agent/0.2.4/package/lib/inspector.js
as well as:
/usr/local/bin/node-inspector
/usr/local/lib/node_modules/node-inspector
/usr/local/lib/node_modules/node-inspector/bin/inspector.js
/usr/local/lib/node_modules/node-inspector/front-end/inspector.html
/usr/local/lib/node_modules/node-inspector/front-end/inspector.js
/usr/local/lib/node_modules/node-inspector/front-end/InspectorFrontendHostStub.js
/usr/local/lib/node_modules/node-inspector/front-end/InspectorBackend.js

Could having tried out the webkit-devtools version be interfering?

Is there some way to make the currently running Node-Inspector spit out its version?

I'm probably missing something hopelessly obvious... Your patience appreciated!

Loren

TODO Discussion

  • Update API to V8 3.22 (backward compatible where is possible). Using nan
  • Notify to issues, that v8-profiler starts resurrection, check closed issues.
  • Add travis build
  • Collect experience from
    • NodeFly / nodefly-v8-profiler
    • skomski / v8-profiler
  • Check HeapGraph API
  • Add tests
  • Add prebuild binaries

node --debug ... : Cannot find module './profiler'

I have an error when executing node --debug ...
module.js:340
throw err;
^
Error: Cannot find module './profiler'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (D:\PJ_SoLoMo\source\geojon_in\osm\node_modules\mongosm\node_modules\v8-profiler\v8-profiler.js:1:77)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

Segfault


Core was generated by `node --debug --prof benchmark_server.js development'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000007cf732 in v8::internal::Marker<v8::internal::MarkCompactCollector>::MarkDescriptorArray(v8::internal::DescriptorArray*) ()
(gdb) bt
#0  0x00000000007cf732 in v8::internal::Marker<v8::internal::MarkCompactCollector>::MarkDescriptorArray(v8::internal::DescriptorArray*) ()
#1  0x00000000007d00e0 in v8::internal::Marker<v8::internal::MarkCompactCollector>::MarkMapContents(v8::internal::Map*) ()
#2  0x00000000007cb946 in v8::internal::MarkCompactCollector::EmptyMarkingDeque() ()
#3  0x00000000007af596 in v8::internal::Isolate::Iterate(v8::internal::ObjectVisitor*, v8::internal::ThreadLocalTop*) ()
#4  0x0000000000746329 in v8::internal::Heap::IterateStrongRoots(v8::internal::ObjectVisitor*, v8::internal::VisitMode) ()
#5  0x00000000007cbb72 in v8::internal::MarkCompactCollector::MarkRoots(v8::internal::RootMarkingVisitor*) ()
#6  0x00000000007ccf88 in v8::internal::MarkCompactCollector::MarkLiveObjects() ()
#7  0x00000000007cd3a9 in v8::internal::MarkCompactCollector::CollectGarbage() ()
#8  0x0000000000747d0a in v8::internal::Heap::MarkCompact(v8::internal::GCTracer*) ()
#9  0x000000000074bac3 in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GCTracer*) ()
#10 0x000000000074be93 in v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollector, char const*, char const*) ()
#11 0x000000000074c580 in v8::internal::Heap::CollectAllGarbage(int, char const*) ()
#12 0x000000000083ad0b in v8::internal::HeapSnapshotGenerator::GenerateSnapshot() ()
#13 0x00000000007619f6 in v8::internal::HeapProfiler::TakeSnapshotImpl(char const*, int, v8::ActivityControl*) ()
#14 0x00007f34a46d77dd in nodex::HeapProfiler::TakeSnapshot(v8::Arguments const&) ()
   from /home/src/cartodb/Windshaft/node_modules/v8-profiler/build/Release/profiler.node

Dunno why debugging symbols aren't included on "sudo npm install -g v8-profiler``` -- I guess it would be useful to have them in...

Installation failure on ubuntu 10

It seems like binding.gyp has dos/windows line endings. This in conjunction with the default level of python in ubuntu 10 results in a failure during install.

Running dos2unix on binding.gyp seems to resolve the issue.

See the following for more details: https://developer.ibm.com/answers/questions/167322/node-gyp-rebuild-fails-during-compile-phase.html#answer-168535

It would be good to fix as ubuntu 10 is used as the default environment for many PaaS environments.

Segmentation fault when taking a heap snapshot on OSX

Project it occurs on:

git clone https://github.com/bevry/taskgroup.git taskgroup
cd taskgroup
git checkout es6
npm install
./node_modules/.bin/cake compile
node es5/test/profile.js

Output ends with:

[1]    7876 segmentation fault  node es5/test/profile.js

System details:

$ iojs --version
v1.6.1
$ npm --version
2.7.1
$ iojs -p process.versions.v8               
4.1.0.21

OSX Version: 10.10.2
Machine: iMac (27-inch, Mid 2011)

Also occurs on Node 0.12.0

Null time profiles

Very often I take profiles like this on the OSX with the Node.js 0.12.1:
2015-05-10_1934

All the functions have the 0 execution time. But if I re-try take a profile some times, it will be like this:
2015-05-10_1935

I tried to change the cpu_profiler_sampling_interval param. It take not an effect.

Saving snapshot examples

When trying to save a heap snapshot that there wasn't any clear examples of how this is done. I ended up digging around the tests to find how to build a heap snapshot.
So it would be great if some save examples were added to the documentation or wiki.

This is what I came up with to save a heap to file.

var fs = require('fs'),
  profiler = require('v8-profiler');

function saveHeapSnapshot(fileName) {
  var buffer = '',
    snapshot = profiler.takeSnapshot("test");
  snapshot.serialize(
    function iterator(data, length) {
      buffer += data;
    },function complete(){
      fs.writeFileSync(fileName, buffer)
    }
  );
}

saveHeapSnapshot("a.heapsnapshot")

Maybe an exposed API to just wrap saving to a file up would be better too.

Error when requiring module

when I require('v8-profiler'), I receive the following:

Error: Cannot find module '/home/kaen/code/myproject/node_modules/v8-profiler/build/profiler/v5.2.9/node-v14-linux-x64/profiler.node'

The mentioned file indeed does not exist, but the following does exist:

/home/kaen/code/myproject/node_modules/v8-profiler/build/profiler/v5.2.9/node-v11-linux-x64/profiler.node

Notice v14 vs v11

System Info:

$ node --version
v0.12.2

$ npm list | grep profiler
[email protected]

$ uname -a
Linux kaen-desktop 3.13.0-46-lowlatency #77-Ubuntu SMP PREEMPT Mon Mar 2 18:49:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -c
Codename:   trusty

Thanks for any help,
Bryan

Doesn't compile on node 0.5

In v8 r7412 and r8406 a whole lot of code from v8's heap profiler was removed. It seems like the code was obsoleted by code in Chromium. As Node is now using a newer version of v8, it's impossible to get v8-profiler and node-inspector working on new versions of Node.

Unexpected Token Exception

I'm getting the following error:

undefined:1
\n});","sourceLe
      ^
SyntaxError: Unexpected token ,
    at Object.parse (native)
    at parse (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:36:22)
    at Socket.<anonymous> (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:64:17)
    at Socket._onReadable (net.js:673:31)
    at IOWatcher.onReadable [as callback] (net.js:177:10)
Error 0

Whenever I execute: profiler.startProfiling();

When I do something like profiler.startProfiling(['general']); I get this:

s/Nod"id":184,"l
      ^^
SyntaxError: Unexpected token ILLEGAL
    at Object.parse (native)
    at parse (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:36:22)
    at Socket.<anonymous> (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:114:5)
    at Socket.emit (events.js:64:17)
    at Socket._onReadable (net.js:673:31)
    at IOWatcher.onReadable [as callback] (net.js:177:10)
Error 0```

node0.8.0 amd64

when calling profiler.takeSnapshot I get an error
node: symbol lookup error: xxx/node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZNK2v813HeapGraphNode17GetRetainersCountEv

tried both master and 3.6.2 branches

install fails on Ubuntu 12

14:04 vmplanet@ubuntu ~/prev8 $ npm install v8-profiler
npm http GET https://registry.npmjs.org/v8-profiler
npm http 304 https://registry.npmjs.org/v8-profiler

> [email protected] install /mnt/hgfs/prev8_web/node_modules/v8-profiler
> node-gyp rebuild

make: Entering directory `/mnt/hgfs/prev8_web/node_modules/v8-profiler/build'
make: Warning: File `profiler.target.mk' has modification time 7.8 s in the future
  CXX(target) Release/obj.target/profiler/cpu_profiler.o
  CXX(target) Release/obj.target/profiler/graph_edge.o
  CXX(target) Release/obj.target/profiler/graph_node.o
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainersCount(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:99:53: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainersCount’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’:
../graph_node.cc:132:52: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainedSize’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainer(const v8::Arguments&)’:
../graph_node.cc:154:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainer’
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetDominator(v8::Local<v8::String>, const v8::AccessorInfo&)’:
../graph_node.cc:162:65: error: ‘class v8::HeapGraphNode’ has no member named ‘GetDominatorNode’
make: *** [Release/obj.target/profiler/graph_node.o] Error 1
make: Leaving directory `/mnt/hgfs/prev8_web/node_modules/v8-profiler/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:757:12)
gyp ERR! System Linux 3.2.0-39-generic-pae
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/hgfs/prev8_web/node_modules/v8-profiler
gyp ERR! node -v v0.10.2
gyp ERR! node-gyp -v v0.9.3
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-39-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "--no-bin-links" "install" "v8-profiler"
npm ERR! cwd /mnt/hgfs/prev8_web
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /mnt/hgfs/prev8_web/npm-debug.log
npm ERR! not ok code 0

Important part:

npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild

Does not compile with Node V0.6.0

[email protected] preinstall /usr/local/lib/node_modules/v8-profiler
node-waf clean || true; node-waf configure build

Nothing to clean (project not configured)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /usr/local/lib/node_modules
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.029s)
Waf: Entering directory /usr/local/lib/node_modules/v8-profiler/build' [1/9] cxx: snapshot.cc -> build/Release/snapshot_1.o [2/9] cxx: graph_edge.cc -> build/Release/graph_edge_1.o [3/9] cxx: graph_node.cc -> build/Release/graph_node_1.o [4/9] cxx: graph_path.cc -> build/Release/graph_path_1.o [5/9] cxx: snapshot_diff.cc -> build/Release/snapshot_diff_1.o [6/9] cxx: profile.cc -> build/Release/profile_1.o [7/9] cxx: profile_node.cc -> build/Release/profile_node_1.o [8/9] cxx: profiler.cc -> build/Release/profiler_1.o In file included from ../snapshot_diff.cc:1: ../snapshot_diff.h:15: error: expected ‘,’ or ‘...’ before ‘*’ token ../snapshot_diff.h:15: error: ISO C++ forbids declaration of ‘HeapSnapshotsDiff’ with no type In file included from ../graph_path.cc:1: ../graph_path.h:15: error: expected ‘,’ or ‘...’ before ‘*’ token ../graph_path.h:15: error: ISO C++ forbids declaration of ‘HeapGraphPath’ with no type In file included from ../snapshot.cc:2: ../snapshot_diff.h:15: error: expected ‘,’ or ‘...’ before ‘*’ token ../snapshot_diff.h:15: error: ISO C++ forbids declaration of ‘HeapSnapshotsDiff’ with no type ../snapshot_diff.cc: In static member function ‘static v8::Handle<v8::Value> nodex::SnapshotDiff::GetAdditions(v8::Local<v8::String>, const v8::AccessorInfo&)’: ../snapshot_diff.cc:21: error: expected type-specifier before ‘HeapSnapshotsDiff’ ../snapshot_diff.cc:21: error: expected>' before ‘HeapSnapshotsDiff’
../snapshot_diff.cc:21: error: expected (' before ‘HeapSnapshotsDiff’ ../snapshot_diff.cc:21: error: ‘HeapSnapshotsDiff’ was not declared in this scope ../snapshot_diff.cc:21: error: expected primary-expression before ‘>’ token ../snapshot_diff.cc:21: error: ‘void*’ is not a pointer-to-object type ../snapshot_diff.cc:21: error: expected)' before ‘;’ token
../snapshot_diff.cc: In static member function ‘static v8::Handlev8::Value nodex::SnapshotDiff::GetDeletions(v8::Localv8::String, const v8::AccessorInfo&)’:
../snapshot_diff.cc:29: error: expected type-specifier before ‘HeapSnapshotsDiff’
../snapshot_diff.cc:29: error: expected >' before ‘HeapSnapshotsDiff’ ../snapshot_diff.cc:29: error: expected(' before ‘HeapSnapshotsDiff’
../snapshot_diff.cc:29: error: ‘HeapSnapshotsDiff’ was not declared in this scope
../snapshot_diff.cc:29: error: expected primary-expression before ‘>’ token
../snapshot_diff.cc:29: error: ‘void_’ is not a pointer-to-object type
../snapshot_diff.cc:29: error: expected )' before ‘;’ token In file included from ../graph_node.cc:3: ../graph_path.h:15: error: expected ‘,’ or ‘...’ before ‘_’ token ../graph_path.h:15: error: ISO C++ forbids declaration of ‘HeapGraphPath’ with no type ../snapshot_diff.cc: At global scope: ../snapshot_diff.cc:33: error: expected ‘,’ or ‘...’ before ‘_’ token ../snapshot_diff.cc:33: error: ISO C++ forbids declaration of ‘HeapSnapshotsDiff’ with no type ../snapshot_diff.cc: In static member function ‘static v8::Handlev8::Value nodex::SnapshotDiff::New(int)’: ../snapshot_diff.cc:40: error: ‘diff’ was not declared in this scope ../snapshot_diff.cc:45: error: expected type-specifier before ‘HeapSnapshotsDiff’ ../snapshot_diff.cc:45: error: expected >' before ‘HeapSnapshotsDiff’
../snapshot_diff.cc:45: error: expected(' before ‘HeapSnapshotsDiff’ ../snapshot_diff.cc:45: error: expected primary-expression before ‘>’ token ../graph_path.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphPath::GetEdgesCount(v8::Localv8::String, const v8::AccessorInfo&)’: ../graph_path.cc:24: error: expected type-specifier before ‘HeapGraphPath’ ../graph_path.cc:24: error: expected >' before ‘HeapGraphPath’
../graph_path.cc:24: error: expected(' before ‘HeapGraphPath’ ../graph_path.cc:24: error: ‘HeapGraphPath’ was not declared in this scope ../graph_path.cc:24: error: expected primary-expression before ‘>’ token ../graph_path.cc:24: error: ‘void_’ is not a pointer-to-object type ../graph_path.cc:24: error: expected )' before ‘;’ token
../graph_path.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphPath::GetEdge(const v8::Arguments&)’:
../graph_path.cc:38: error: expected type-specifier before ‘HeapGraphPath’
../graph_path.cc:38: error: expected>' before ‘HeapGraphPath’ ../graph_path.cc:38: error: expected (' before ‘HeapGraphPath’
../graph_path.cc:38: error: ‘HeapGraphPath’ was not declared in this scope
../graph_path.cc:38: error: expected primary-expression before ‘>’ token
../graph_path.cc:38: error: ‘void*’ is not a pointer-to-object type
../graph_path.cc:38: error: expected)' before ‘;’ token ../graph_path.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphPath::GetFromNode(v8::Localv8::String, const v8::AccessorInfo&)’: ../graph_path.cc:46: error: expected type-specifier before ‘HeapGraphPath’ ../graph_path.cc:46: error: expected >' before ‘HeapGraphPath’
../snapshot.cc: In static member function ‘static v8::Handlev8::Value nodex::Snapshot::GetType(v8::Localv8::String, const v8::AccessorInfo&)’:
../snapshot.cc:56: error: ‘kAggregated’ is not a member of ‘v8::HeapSnapshot’
../graph_path.cc:46: error: expected(' before ‘HeapGraphPath’ ../graph_path.cc:46: error: ‘HeapGraphPath’ was not declared in this scope ../snapshot.cc: In static member function ‘static v8::Handlev8::Value nodex::Snapshot::CompareWith(const v8::Arguments&)’: ../snapshot.cc:78: error: expected initializer before ‘_’ token ../snapshot.cc:79: error: ‘diff’ was not declared in this scope ../graph_path.cc:46: error: expected primary-expression before ‘>’ token ../graph_path.cc:46: error: ‘void_’ is not a pointer-to-object type ../graph_path.cc:46: error: expected )' before ‘;’ token
../graph_path.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphPath::GetToNode(v8::Localv8::String, const v8::AccessorInfo&)’:
../graph_path.cc:54: error: expected type-specifier before ‘HeapGraphPath’
../graph_path.cc:54: error: expected>' before ‘HeapGraphPath’ ../graph_path.cc:54: error: expected (' before ‘HeapGraphPath’
../graph_path.cc:54: error: ‘HeapGraphPath’ was not declared in this scope
../graph_path.cc:54: error: expected primary-expression before ‘>’ token
../graph_path.cc:54: error: ‘void*’ is not a pointer-to-object type
../graph_path.cc:54: error: expected)' before ‘;’ token ../graph_path.cc: At global scope: ../graph_path.cc:58: error: expected ‘,’ or ‘...’ before ‘_’ token ../graph_path.cc:58: error: ISO C++ forbids declaration of ‘HeapGraphPath’ with no type ../graph_path.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphPath::New(int)’: ../graph_path.cc:65: error: ‘path’ was not declared in this scope ../graph_path.cc:70: error: expected type-specifier before ‘HeapGraphPath’ ../graph_path.cc:70: error: expected >' before ‘HeapGraphPath’
../graph_path.cc:70: error: expected(' before ‘HeapGraphPath’ ../graph_path.cc:70: error: expected primary-expression before ‘>’ token ../graph_node.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphNode::GetInstancesCount(v8::Localv8::String, const v8::AccessorInfo&)’: ../graph_node.cc:93: error: ‘class v8::HeapGraphNode’ has no member named ‘GetInstancesCount’ ../graph_node.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphNode::GetRetainingPathsCount(v8::Localv8::String, const v8::AccessorInfo&)’: ../graph_node.cc:165: error: ‘class v8::HeapGraphNode’ has no member named ‘GetRetainingPathsCount’ ../graph_node.cc: In static member function ‘static v8::Handlev8::Value nodex::GraphNode::GetRetainingPath(const v8::Arguments&)’: ../graph_node.cc:179: error: expected initializer before ‘_’ token ../graph_node.cc:180: error: ‘path’ was not declared in this scope ../profiler.cc: In function ‘v8::Handlev8::Value TakeSnapshot(const v8::Arguments&)’: ../profiler.cc:15: error: ‘kAggregated’ is not a member of ‘v8::HeapSnapshot’ Waf: Leaving directory /usr/local/lib/node_modules/v8-profiler/build'
Build failed:
-> task failed (err #1):
{task: cxx snapshot_diff.cc -> snapshot_diff_1.o}
-> task failed (err #1):
{task: cxx snapshot.cc -> snapshot_1.o}
-> task failed (err #1):
{task: cxx graph_path.cc -> graph_path_1.o}
-> task failed (err #1):
{task: cxx graph_node.cc -> graph_node_1.o}
-> task failed (err #1):
{task: cxx profiler.cc -> profiler_1.o}
npm ERR! error installing [email protected] Error: [email protected] preinstall:node-waf clean || true; node-waf configure build
npm ERR! error installing [email protected]sh "-c" "node-waf clean || true; node-waf configure build"failed with 1
npm ERR! error installing [email protected] at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:70:17)
npm ERR! error installing [email protected] at maybeExit (child_process.js:359:16)
npm ERR! error installing [email protected] at Process.onexit (child_process.js:395:5)
npm ERR! [email protected] preinstall:node-waf clean || true; node-waf configure build
npm ERR!sh "-c" "node-waf clean || true; node-waf configure build" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls v8-profiler
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "v8-profiler"
npm ERR! cwd /Users/jfd/workspace/beruntime
npm ERR! node -v v0.6.0
npm ERR! npm -v 1.0.104
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/jfd/workspace/beruntime/npm-debug.log
npm not ok

Does not compile with Node V0.10.12

> [email protected] install /usr/local/lib/node_modules/v8-profiler
> node-gyp rebuild

  CXX(target) Release/obj.target/profiler/cpu_profiler.o
  CXX(target) Release/obj.target/profiler/graph_edge.o
  CXX(target) Release/obj.target/profiler/graph_node.o
../graph_node.cc:99:53: error: no member named 'GetRetainersCount' in
      'v8::HeapGraphNode'
  int32_t count = static_cast<HeapGraphNode*>(ptr)->GetRetainersCount();
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:132:52: error: no member named 'GetRetainedSize' in
      'v8::HeapGraphNode'
  int32_t size = static_cast<HeapGraphNode*>(ptr)->GetRetainedSize();
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:154:65: error: no member named 'GetRetainer' in
      'v8::HeapGraphNode'
  ...edge = static_cast<HeapGraphNode*>(ptr)->GetRetainer(index);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:162:65: error: no member named 'GetDominatorNode' in
      'v8::HeapGraphNode'
  ...node = static_cast<HeapGraphNode*>(ptr)->GetDominatorNode();
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
4 errors generated.
make: *** [Release/obj.target/profiler/graph_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/v8-profiler
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

OSX ML node 0.10.4 build errors

> [email protected] install /usr/local/lib/node_modules/v8-profiler
> node-gyp rebuild

  CXX(target) Release/obj.target/profiler/cpu_profiler.o
  CXX(target) Release/obj.target/profiler/graph_edge.o
  CXX(target) Release/obj.target/profiler/graph_node.o
../graph_node.cc:99:53: error: no member named 'GetRetainersCount' in 'v8::HeapGraphNode'
  int32_t count = static_cast<HeapGraphNode*>(ptr)->GetRetainersCount();
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:132:52: error: no member named 'GetRetainedSize' in 'v8::HeapGraphNode'
  int32_t size = static_cast<HeapGraphNode*>(ptr)->GetRetainedSize();
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:154:65: error: no member named 'GetRetainer' in 'v8::HeapGraphNode'
  const HeapGraphEdge* edge = static_cast<HeapGraphNode*>(ptr)->GetRetainer(index);
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
../graph_node.cc:162:65: error: no member named 'GetDominatorNode' in 'v8::HeapGraphNode'
  const HeapGraphNode* node = static_cast<HeapGraphNode*>(ptr)->GetDominatorNode();
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
4 errors generated.

Suppress compile warnings

Here's a quick patch to suppress a few compiler warnings:

diff --git a/src/heap_output_stream.h b/src/heap_output_stream.h
index 88a70f5..27b4ceb 100644
--- a/src/heap_output_stream.h
+++ b/src/heap_output_stream.h
@@ -11,9 +11,9 @@ class OutputStreamAdapter : public v8::OutputStream {
       OutputStreamAdapter(
         v8::Handle<v8::Function> _iterator, 
         v8::Handle<v8::Function> _callback)
-      : iterator(_iterator)
-      , callback(_callback)
-      , abort(NanFalse()) {};
+      : abort(NanFalse())
+      , iterator(_iterator)
+      , callback(_callback) {};

       void EndOfStream();

Here are the warnings:

In file included from ../nsolid/deps/v8-profiler/src/heap_profiler.cc:3:
../nsolid/deps/v8-profiler/src/heap_output_stream.h:14:9: warning: field 'iterator' will be initialized after field 'abort' [-Wreorder]
      : iterator(_iterator)
        ^
In file included from ../nsolid/deps/v8-profiler/src/heap_output_stream.cc:1:
../nsolid/deps/v8-profiler/src/heap_output_stream.h:14:9: warning: field 'iterator' will be initialized after field 'abort' [-Wreorder]
      : iterator(_iterator)
        ^
In file included from ../nsolid/deps/v8-profiler/src/heap_snapshot.cc:2:
../nsolid/deps/v8-profiler/src/heap_output_stream.h:14:9: warning: field 'iterator' will be initialized after field 'abort' [-Wreorder]
      : iterator(_iterator)
        ^

Thanks. :)

3.6.2 beta build fails

npm http GET https://registry.npmjs.org/v8-profiler/3.6.2beta
npm http 200 https://registry.npmjs.org/v8-profiler/3.6.2beta
npm http GET https://registry.npmjs.org/v8-profiler/-/v8-profiler-3.6.2beta.tgz
npm http 200 https://registry.npmjs.org/v8-profiler/-/v8-profiler-3.6.2beta.tgz

[email protected] preinstall /home/scriby/folkLOR/node_modules/v8-profiler
node-waf clean || (exit 0); node-waf configure build

Nothing to clean (project not configured)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.556s)
Waf: Entering directory /Users/dcoates/code/v8-profiler/build' Waf: Leaving directory/Users/dcoates/code/v8-profiler/build'
Traceback (most recent call last):

File "/usr/local/bin/node-waf", line 16, in
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 386, in build
return build_impl(bld)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 405, in build_impl
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 268, in compile
os.chdir(self.bldnode.abspath())
OSError: [Errno 2] No such file or directory: '/Users/dcoates/code/v8-profiler/build'

compilation error on node v0.3.2

Danny, I realize this issue is closed, but it seems to still be happening on node v0.3.2. I have run npm update npm.

RadioFreePro:~ drew$ which node
/usr/local/bin/node
RadioFreePro:~ drew$ npm install v8-profiler
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info preinstall [email protected]
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
'configure' finished successfully (0.055s)
Waf: Entering directory `/usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build'
[1/9] cxx: snapshot.cc -> build/default/snapshot_1.o
[2/9] cxx: graph_edge.cc -> build/default/graph_edge_1.o
[3/9] cxx: graph_node.cc -> build/default/graph_node_1.o
[4/9] cxx: graph_path.cc -> build/default/graph_path_1.o
../graph_node.cc: In static member function ‘static v8::Handle<v8::Value> nodex::GraphNode::GetRetainedSize(const v8::Arguments&)’:
../graph_node.cc:143: error: no matching function for call to ‘v8::HeapGraphNode::GetRetainedSize()’
/usr/local/include/node/v8-profiler.h:296: note: candidates are: int v8::HeapGraphNode::GetRetainedSize(bool) const
Waf: Leaving directory `/usr/local/lib/node/.npm/v8-profiler/0.0.2/package/build'
Build failed:  -> task failed (err #1): 
    {task: cxx graph_node.cc -> graph_node_1.o}
npm info [email protected] Failed to exec preinstall script
npm ERR! install failed Error: [email protected] preinstall: `node-waf configure build`
npm ERR! install failed `sh` failed with 1
npm ERR! install failed     at ChildProcess.<anonymous> (/usr/local/lib/node/.npm/npm/0.2.13-3/package/lib/utils/exec.js:25:18)
npm ERR! install failed     at ChildProcess.emit (events.js:34:17)
npm ERR! install failed     at ChildProcess.onexit (child_process.js:164:12)
npm info install failed rollback
npm info uninstall [ '[email protected]' ]
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info auto-deactive not symlink
npm info postuninstall [email protected]
npm info uninstall [email protected] complete
npm info install failed rolled back
npm ERR! Error: [email protected] preinstall: `node-waf configure build`
npm ERR! `sh` failed with 1
npm ERR!     at ChildProcess.<anonymous> (/usr/local/lib/node/.npm/npm/0.2.13-3/package/lib/utils/exec.js:25:18)
npm ERR!     at ChildProcess.emit (events.js:34:17)
npm ERR!     at ChildProcess.onexit (child_process.js:164:12)
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the v8-profiler package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls v8-profiler
npm ERR! There may be additional logging output above.
npm not ok

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.