这些涡轮风扇内存区域意味着什么?
我在使用 V8 引擎时偶然发现了 区域统计工具< /a>.我了解区域内存概念,但是区域统计内存中的这些不同区域是什么?
当我将跟踪区域内存日志上传到其中时,我看到有用于turbofan的区域:
- graph-zone
- instructions-zone
- pipeline-compilation-job-zone
- register-allocation-zone
我知道编译作业区域用于编译(也许?如果我错了请纠正我),但是其他区域是什么?
I was playing around with the V8 engine and stumbled upon the zone stats tool. I understand the zone memory concept, but what are these different zones in zone stats memory?
When I upload a trace zone memory log into it, I see that there are for zones for turbofan:
- graph-zone
- instruction-zone
- pipeline-compilation-job-zone
- register-allocation-zone
I understand that the compilation job zone is used for compiling (maybe?correct me if I am wrong), but what are the other zones?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(此处为 V8 开发人员。)由于 Turbofan 是一个编译器,因此它使用的所有区域都用于编译。
它使用多个区域,以便稍后可以释放只需要很短时间的临时数据,而主区域将一直保留到整个编译作业完成。这对于寄存器分配器使用的“寄存器分配区域”最为明显。
我不太确定其他区域之间的差异是什么,说实话,我认为这不是特别重要:如果您专门致力于减少 Turbofan 的峰值内存消耗,那么您可能已经知道(或者可以轻松地知道)通过阅读一些代码找出答案);否则,你无需关心。具体的区域组也可能随时更改。作为一名 JavaScript 开发人员,这些类型的编译器内部结构绝对不关心您。
(V8 developer here.) Since Turbofan is a compiler, all the zones it uses are used for compiling.
It uses more than one zone so that temporary data that's only needed for a short time can be freed afterwards, whereas the main zone sticks around until the entire compilation job is completed. This is most obvious for the "register-allocation-zone", which is used by the register allocator.
I'm not exactly sure what the differences between the other zones are, and to be honest I don't think it's particularly important: if you're specifically working on reducing Turbofan's peak memory consumption, then you probably already know (or can easily find out by reading a bit of code); and otherwise, there's no need for you to care. The specific set of zones may also change at any time. As a JavaScript developer, these kinds of compiler internals definitely don't concern you.