[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]jdk8默认gc方式

上一篇:[备忘]### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: insufficient data
下一篇:[备忘]bat调用cpu-z,获取内存生产日期

添加日期:2023/9/4 18:25:48 快速返回   返回列表 阅读291次
jdk7和jdk8的默认GC方式都一样:-XX:+UseParallelGC

可以用这个命令打印出来:
java -XX:+PrintCommandLineFlags -version
--------------------------------
可以用jstack打印出线程堆栈

默认gc是这样:


"VM Thread" os_prio=2 tid=0x0000000017784000 nid=0x592c runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000001d0b000 nid=0x42b8 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000001d0c800 nid=0x3e3c runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000001d0e000 nid=0x4f10 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x0000000001d0f000 nid=0x411c runnable 

"VM Periodic Task Thread" os_prio=2 tid=0x00000000178cb800 nid=0x176c waiting on condition 

JNI global references: 270



使用cms(-XX:+UseConcMarkSweepGC)是这样:


"VM Thread" os_prio=2 tid=0x00000000183fe000 nid=0x4ef8 runnable 

"Gang worker#0 (Parallel GC Threads)" os_prio=2 tid=0x0000000002734000 nid=0x5bd0 runnable 

"Gang worker#1 (Parallel GC Threads)" os_prio=2 tid=0x0000000002737800 nid=0x3904 runnable 

"Gang worker#2 (Parallel GC Threads)" os_prio=2 tid=0x0000000002739800 nid=0x4d84 runnable 

"Gang worker#3 (Parallel GC Threads)" os_prio=2 tid=0x000000000273b800 nid=0x43d4 runnable 

"Concurrent Mark-Sweep GC Thread" os_prio=2 tid=0x0000000002782800 nid=0x231c runnable 

"VM Periodic Task Thread" os_prio=2 tid=0x0000000018c4f000 nid=0x5144 waiting on condition 

JNI global references: 270


很明显的,多了一个Concurrent Mark-Sweep GC Thread线程。
 

评论 COMMENTS
没有评论 No Comments.

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved