我正在考虑减少内存受限系统(例如移动设备)中垃圾收集器的开销。我所说的开销是指暂停时间,或者垃圾收集所花费的总执行时间的一部分。我开始了解一些有关硬件辅助垃圾收集器的知识,并且我有兴趣研究它。 我想知道这方面都做了什么。 我可以使用模拟器来估计垃圾收集器的效率还是必须在芯片上制作我的设计?有没有可以运行java程序的模拟器?
最佳答案
有一个working approach to HW supported GC :
Cliff Click wrote: Things we do specifically for Java:
GC read-barrier enables a fully parallel & concurrent GC; we can sustain 40G/sec allocation on a 400G heap indefinitely, with max-pause times on the order of 10-20msec. This uber-GC is partially made possible because of the read barrier (and partially possible because we ‘own’ the OS and can play major page-mapping tricks).
还有
The read-barrier will take a fast-trap on failure, and by default get promoted to GC-mode in the trap handler. This lets the faulting CPU fixup the object reference and continue, without needing to wait for GC to catch up.
当然,整篇文章都值得一读。您很可能想看这个 video .
关于java - H/W 辅助垃圾收集器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25960184/