sampling-heap-profiler
sampling-heap-profiler copied to clipboard
Use Nan::Set to accommodate for Node 14+
When trying to build heap-profile with Node 14+ (warns on 12+, fails on 14+), the node-gyp compilation fails:
../bindings/sampling-heap-profiler.cc:26:12: error: no matching member function for call to 'Set'
js_node->Set(Nan::New<String>("name").ToLocalChecked(),
~~~~~~~~~^~~
{path}/node-gyp/14.15.0/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
Looking at the Nan docs suggests that we could instead use Nan::Set to set object properties in a version-independent way.
hello, this still a issue for me, there is any workaround?
are there plans to merge this?
I abandoned this fix because I realized that this is the same tool as the "Allocation sampling" tool that's already available with node.js debugging (via Chrome's chrome://inspect).
Any plans to merge this? We require this change to generate heap-profile in the node js application.
I tried your changes and it is getting installed in node v14.18.1 @srubin, Please merge this PR.
Did you see my above post? This tool is now integrated in Chrome's debugging tools directly (via chrome://inspect). I suspect that this repo is dead.
@srubin , Chrome Debugging tools can be used directly in UI applications.
But we need this change to get the heap-profile in the backend server which doesn't have any UI. In this case, we can not use Chrome Debugger to get the heap profile.
If we can install a heap-profiler in node v14 then we will be able to get the heap profile whenever we found there is an increase in memory.
Please take this request and get it merged. Thanks
I'm not affiliated with the v8 team; I don't have any particular power to get this merged.
@ofrobots Any plans to get this merged to support Node v14 and higher as we are also looking to profile our back-end application.
@ofrobots @bariscicek Is there anything that needs to be done before this can be merged? Or is this project abandoned?
This repo is being archived (see README.md for more information). Closing all PRs in anticipation of this.