9 months ago the dominator/retainer calculations were moved from V8 into webkit. Since that time, the node.js tools that relied upon this have been broken:
https://github.com/dannycoates/v8-profiler/issues/16#issuecomment-9099768 The retainer/dominator information would be very valuable in my current effort to troubleshoot memory leaks in my Node.js apps and libraries. I have been looking at the Node.js profiling libraries, the V8 API, and the WebKit code which currently implements this functionality. My first thought was to take the v8-profiler project: https://github.com/dannycoates/v8-profiler And add the code from WebKit: https://trac.webkit.org/browser/trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js#L1342 However, I'm finding that this javascript is tightly coupled with the WebKit internal implementation. After 3 days of trying to adapt that to suit my needs, I am thinking it might not be the best route. Even if I get it working, I will end up with a lot of non-related artifacts in the code. When I look at the original code which was pulled out of V8, it seems to be well contained, with dependencies that I understand and exposing a simple interface: https://chromiumcodereview.appspot.com/10416035 I'd like to try adapting the diff from this code into a compiled extension, and thereby provide something that the Node.js community could re-use and adapt for whatever a project or tool's individual needs are. The v8-profiler project seems like a good vehicle for that. Trouble is, I don't know much about C++. I'm not sure what the best model for extension would be. It seems like I have the ability to compile additional methods onto... for instance the HeapGraphNode class, but I'm guessing I'm going to run into problems if I try to add any data fields, as that would change the memory footprint and therefore probably not be allowed in a statically typed environment. I'm probably applying a dynamic mindset to a static language. :-) Does it make more sense to inherit from the V8 classes, and make my node.js code interact with my wrapper classes rather than directly? I'm not sure, so if someone with more knowledge in this area has some pointers, I'm listening. I've created a fork here to try and get it working (make sure you check out the branch "dominators": https://github.com/bitmage/v8-profiler/tree/dominators Pull requests or advice are welcome. If anyone wants to work with me on this, let me know. Thanks! Brandon -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
