What is the System objects in chrome javascript memory profiler

可紊 提交于 2019-11-30 06:23:31

According to the JSHeapSnapshot.js implementation in Chromium, as mentioned in a comment by wOxxOm, a comparison for the a given node distance to 100000000 is performed (distances[ordinal] >= WebInspector.HeapSnapshotCommon.baseSystemDistance, where WebInspector.HeapSnapshotCommon.baseSystemDistance = 100000000) and if passing, the size is accumulated into the System segment of the pie chart.

The commit that last modifies this value mentions,

Currently if a user object is retained by both a system-space object (e.g. a debugger) and another user object, the system object might be shown earlier in the retainers tree. This happens if its distance is smaller than distances of other retaining user objects.

The patch treats links from system-space objects to user objects with less priority, so these links are shown at the bottom of the retainers tree.

Which indicates that system-space objects on the javascript heap are utilized by debuggers and other internals to the browser (V8, WebKit, etc.). They are outside of the direct control of script allocated heap objects.

wOxxOm also mentioned that the name used to be V8 heap. That is, objects that V8 allocates that are out of reach of the executing script.

It's highly likely that running profiling and taking snapshots performs allocations in that category of heap objects as well, causing the pattern you see of building system allocations over time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!