java - 带有描述的 Hotspot VM 操作列表
问题描述
Java Hotspot VM 可以执行许多不同的 VM 操作。在调试安全点时间时,了解安全点的用途是很有用的。其中一些是显而易见的:G1IncCollectionPause
或FindDeadlocks
,但有些不是:CGC_Operation
, no vm operation
。有 VMOps.java,但它只列出可能的值,而不是它们的含义。
目前,我需要知道CGC_Operation
在 G1GC 的上下文中做了什么。我怀疑它与 ConcurrentGCThread 和 Old gen 集合有关,但我想确认并有一些参考以寻找其他操作。
例子:
-XX:+PrintSafepointStatistics
...
128959.961: G1IncCollectionPause [ 2636 0 1 ] [ 0 0 0 15 52 ] 0
129986.695: G1IncCollectionPause [ 2637 0 0 ] [ 0 0 0 12 51 ] 0
137019.250: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 50 ] 0
138693.219: CGC_Operation [ 2636 0 0 ] [ 0 0 0 13 338 ] 0
138726.672: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 50 ] 0
138733.984: G1IncCollectionPause [ 2636 0 1 ] [ 0 0 0 13 50 ] 0
138738.750: G1IncCollectionPause [ 2636 0 0 ] [ 0 0 0 13 62 ] 0
解决方案
最好的(可能是唯一的)文档是源代码。幸运的是,HotSpot JVM 源代码得到了很好的评论。
请参阅src/share/vm/gc_implementation/g1/vm_operations_g1.hpp:
// Concurrent GC stop-the-world operations such as remark and cleanup;
// consider sharing these with CMS's counterparts.
class VM_CGC_Operation: public VM_Operation {
no vm operation
表示各种清理活动的特殊类型的定期安全点,请参阅此答案
推荐阅读
- android - 将数据从活动 B 传递到活动 A 片段
- azure-eventhub - 我可以在没有服务端点的应用服务环境中收听事件中心吗?
- php - 特征方法 hasTooManyLoginAttempts 尚未应用
- php - 使用 PDO 加载数据时出现问题:编码错误
- android - 如何从android studio向服务器发送删除请求?
- javascript - 托管我的网站后如何使用 php 重定向到另一个页面
- python - 使用 Selenium 使用 get_elements_by_xpath 在循环中单击每个按钮后获取页面源
- python - Numpy搜索数组中的元素(分散和减少)
- css - MaterialUI Box 接管背景图片
- javascript - 为什么audio src上调用的timeupdate事件会改变HTML/JS