chrome javascript内存分析器中的System对象是什么 [英] What is the System objects in chrome javascript memory profiler

查看:129
本文介绍了chrome javascript内存分析器中的System对象是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Chrome开发工具分析javascript应用程序。

I'm profiling javascript application using Chrome dev tools.

我看到增长的唯一内存区域是系统对象总数。

I see that the only memory area that grows is System objects total.

我想知道我怎么能理解导致这种行为的原因,因为工具中没有详细说明哪些系统对象泄露了。

I wonder how could I understand what causes such behavior as there are no details in the tool showing which system objects got leaked.

我'看看应用程序分配,但它不会随着时间的推移发生太大变化...
当我使用时间轴时,功能堆增长超过500mb

I've taken a look at app allocation, but it doesn't change much over time ... When I'm using timeline feature heap grows over 500mb

解决方案

根据 JSHeapSnapshot.js 在Chromium中的实现,如wOxxOm的评论中提到的,给定节点距离100000000的比较是执行( distance [ordinal]> = WebInspector.HeapSnapshotCommon.baseSystemDistance ,其中 WebInspector.HeapSnapshotCommon.baseSystemDistance = 100000000 )如果通过,则将大小累积到饼图的系统段中。

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.

commit ,最后修改此值提及,

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.

补丁使用$ b $处理从系统空间对象到用户对象的链接b优先级较低,因此这些链接显示在保留器
树的底部。

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.

表示系统空间调试器和其他内部组件将javascript堆上的对象用于浏览器(V8,WebKit等)。它们不受脚本分配堆对象的直接控制。

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还提到过该名称曾经是V8堆。也就是说,V8分配的对象不在执行脚本的范围内。

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.

运行性能分析和拍摄快照很可能在该类别中执行分配。堆对象也会导致您看到的构建系统分配的模式。

这篇关于chrome javascript内存分析器中的System对象是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆