Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Which nodejs version was tested with this package? #3

Open
Slach opened this issue Mar 1, 2019 · 1 comment
Open

Which nodejs version was tested with this package? #3

Slach opened this issue Mar 1, 2019 · 1 comment

Comments

@Slach
Copy link

Slach commented Mar 1, 2019

I try nodejs versions 5,6,8,10,11
and everywhere node-gyp rebuild was failed with following errors

make: Entering directory '/usr/local/lib/node_modules/node-flame/build'
  CXX(target) Release/obj.target/demangle/demangle.o
../demangle.cc:27:30: error: 'Arguments' does not name a type
 Handle<Value> demangle(const Arguments& args) {
                              ^~~~~~~~~
../demangle.cc: In function 'v8::Handle<v8::Value> demangle(const int&)':
../demangle.cc:28:40: error: invalid types 'const int[int]' for array subscript
     String::Utf8Value mangledStr(args[0]->ToString());
                                        ^
../demangle.cc:33:17: error: 'v8::HandleScope::HandleScope()' is protected within this context
     HandleScope scope;
                 ^~~~~
In file included from /usr/local/lib/node_modules/node-flame/.node-gyp/8.10.0/include/node/node.h:63:0,
                 from ../demangle.cc:21:
/usr/local/lib/node_modules/node-flame/.node-gyp/8.10.0/include/node/v8.h:875:13: note: declared protected here
   V8_INLINE HandleScope() {}
             ^~~~~~~~~~~
../demangle.cc:35:23: error: 'class v8::HandleScope' has no member named 'Close'
          return scope.Close(String::New(demangled));
                       ^~~~~
../demangle.cc:35:37: error: 'New' is not a member of 'v8::String'
          return scope.Close(String::New(demangled));
                                     ^~~
../demangle.cc:37:23: error: invalid types 'const int[int]' for array subscript
          return args[0];
                       ^
../demangle.cc: In function 'void init(v8::Handle<v8::Object>)':
../demangle.cc:42:48: error: invalid conversion from 'v8::Handle<v8::Value> (*)(const int&) {aka v8::Local<v8::Value> (*)(const int&)}' to 'v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}' [-fpermissive]
   NODE_SET_METHOD(exports, "demangle", demangle);
                                                ^
In file included from ../demangle.cc:21:0:
/usr/local/lib/node_modules/node-flame/.node-gyp/8.10.0/include/node/node.h:291:13: note:   initializing argument 3 of 'void node::NODE_SET_METHOD(v8::Local<v8::Object>, const char*, v8::FunctionCallback)'
 inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
             ^~~~~~~~~~~~~~~
make: *** [Release/obj.target/demangle/demangle.o] Error 1
demangle.target.mk:99: recipe for target 'Release/obj.target/demangle/demangle.o' failed
make: Leaving directory '/usr/local/lib/node_modules/node-flame/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2

is only one way to get sample CPU profile is using perf-map-agent + perf ?

@Raynos
Copy link

Raynos commented May 29, 2019

This package is supported with node 0.10

To support 4,6,8 or 10 you would have to update

https://github.com/uber-node/node-flame/blob/master/lib/heap-reader.js

This class knows the internal memory layout of v8 and is able to turn a C stacktrace into a javascript function name. Namely by https://github.com/uber-node/node-flame/blob/master/lib/heap-reader.js#L372

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants