-
Notifications
You must be signed in to change notification settings - Fork 30k
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
More getHeapStatistics stats #2079
Comments
Can you elaborate on what you mean by 'visibility .. from user code'? What would you like to see that is not available today when you pass the |
You're right, trace_gc gives us all the stats we want. However, this gets printed out to stdout/(err?) directly by v8. It would be nice to be able to query them from Javascript as well, so we don't have to write a separate trace_gc-output-parser. We're already tracking a variety of counters and other stats in our main app process, and it'd be convenient to include VM stats like these in there as well. |
Per-space statistics are not currently exposed through V8's C++ API (and therefore not through the v8 module's API.) Someone - you? - would first have to take it up with V8, either through a feature request or a CL. Tracking GC time is possible with the GC prologue and epilog callbacks. v0.11 exposed that functionality to JS land for a while but I removed it again in dab6f68 for reasons outlined in the commit log. |
@bnoordhuis: We are currently looking into the same feature for a monitoring product. As far as I understand, I am thinking about the following: Expose a function as part of the If such an interest exists, I'd willing to try to contribute this. |
The v8 sources confirm that heap statistics include |
@bripkens |
great, I'll get right to it then :) |
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes nodejs#2079
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes: #2079 PR-URL: #4463 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes: nodejs#2079 PR-URL: nodejs#4463 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes: #2079 PR-URL: #4463 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes: #2079 PR-URL: #4463 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Provide means to inspect information about the separate heap spaces via a callable API. This is helpful to analyze memory issues. Fixes: #2079 PR-URL: #4463 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Coming from running JVM services, it'd be great to have a more detailed view into old-space/new-space usage over time, time spent in GC, etc.
I noticed these are being tracked/printed out by v8 when --trace_gc is on (https://github.com/v8/v8-git-mirror/blob/master/src/heap/gc-tracer.cc) but there's no visibility into this from user code. Is there some way to get at this information?
The text was updated successfully, but these errors were encountered: