zoukankan      html  css  js  c++  java
  • Idea 打印GC

    设置

    • Run => Edit Configurations => VM options

      • 添加 -XX:+PrintGCDetails
    • image-20191102131338784

    • image-20191102131528734

    • 运行程序后会在末尾打印GC信息

      2019-11-02 13:07:47 INFO  ShutdownHookManager:54 - Deleting directory C:UsersMSI-PCAppDataLocalTempspark-201c381b-dad9-43ae-8bfc-cb27de67010f
      Heap
       PSYoungGen    total 87552K, used 64517K [0x000000076b780000, 0x0000000771800000, 0x00000007c0000000)
        eden space 78336K, 79% used [0x000000076b780000,0x000000076f407838,0x0000000770400000)
        from space 9216K, 27% used [0x0000000770d80000,0x0000000770ff9ed8,0x0000000771680000)
        to   space 9728K, 0% used [0x0000000770400000,0x0000000770400000,0x0000000770d80000)
       ParOldGen       total 109568K, used 10117K [0x00000006c2600000, 0x00000006c9100000, 0x000000076b780000)
        object space 109568K, 9% used [0x00000006c2600000,0x00000006c2fe1548,0x00000006c9100000)
       Metaspace       used 41925K, capacity 42508K, committed 42712K, reserved 1085440K
        class space    used 6126K, capacity 6259K, committed 6360K, reserved 1048576K
      
      Process finished with exit code 0
      
      • PSYoungGen(Parallel Scavenge): Eden + FromSpace
      • 完整的YoungGeneration: Eden+FromSpace+ToSpace
      • ParOldGen(Par => Parameter, Parameter of Old Generation): GC 回收前后老年代的参数变化
      • object space: 对象空间
      • Metaspace: 元空间 (使用, 容量, 提交了多少, 保存了多少)
      • Class space: 类空间 (同上)
  • 相关阅读:
    SVN版本控制服务
    JVM内存结构
    Git的使用
    Nginx详解
    Apache(httpd)详解
    rsyslog日志收集器
    nsswitch名称解析框架
    NFS网络文件系统
    ThreadLocal详解
    RocketMQ踩坑记
  • 原文地址:https://www.cnblogs.com/ronnieyuan/p/11781482.html
Copyright © 2011-2022 走看看