-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for next node.js stable version: 0.12 #66
Comments
Yes! :-) |
+1 |
Still 0.10.35 :-) |
+1, and io.js please |
I just sent #79 which ports this code to use nan. I see that as a necessary but not sufficient step to getting this working with current V8/node.js/io.js versions. (Not sufficient because the profiler API itself, which I don't know anything about and haven't looked into yet, has also changed and nan doesn't abstract that. So my PR uses nan where possible, but there are still a bunch of compile errors under 0.12.0 for missing profiler API methods.) Here are the remaining errors when compiling #79 with node 0.12.0. (It compiles fine under node 0.10.x.) |
@metamatt great, this is a good start. I will look in detail tomorrow. Thank you! |
Here's my take on the remaining problems after the nan patch, from looking at Changed name (easy):
Became relative to Isolate instance (medium, just plumbing? But I don’t know where to plumb the Isolate instance in):
Removed with no obvious replacement (hard, if things need them? easy, if that means they won’t be called any more?):
|
Very useful information @metamatt. It seems to me we will have to dig into Chromium's code as well, to see how they are currently using v8's profiler API, specifically for the Chrome Devtools backend. A lot has changed since this project was originally written. For instance, Isolates weren't really a thing when this project started. Regarding your hard points:
Was removed here: v8/v8@acf9edb#diff-f2be5615de603fba6f3f54c2c346f58d
It seems you can get the CpuProfiler from the current Isolate instance, and the actual profile output once you stop profiling, exactly like you described it. Disregard if you already know, you get the current isolate like so: v8/v8@0da5cad#diff-f2be5615de603fba6f3f54c2c346f58d
These were deprecated here: |
For the removed methods, I'm hoping a newer version of the frontend might not want to call these methods on the backend. For the Isolate instance, we can get the current Isolate and we can supply it to the V8 profiler API, as long as that's the correct one to supply; I'm wondering if we ever need to deal with a case where there's more than one and we have to keep track of multiple instances. |
It seems that's the main reason they took them out.
No need to deal with more than one as far as I know. If people want to profile isolated processes they will have to import |
@c4milo do you want to call this fixed for 0.12 and publish a new version to npm? |
@metamatt is the CPU profiler still working or we will be loosing it for Node 0.12.x? |
@metamatt the other thing I haven't tested is whether the changes are backwards compatible with previous versions of node. |
CPU profiler is not working, but I don't see how to get it to work. If you can figure it out, great; otherwise I think heap profiler is better than nothing. The changes I made are backwards compatible with node 0.10 (well, they work for me but if you have a better way to verify that, please do!). |
Agreed. I'm going to give it another round of tests and release a new version as soon as I can. Thanks! |
No description provided.
The text was updated successfully, but these errors were encountered: