Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317683

Add JIT memory statistics

    XMLWordPrintable

Details

    • b20

    Description

      We need to know arena usage for individual compilations to understand compiler footprint. The compiler can cause malloc spikes, that can cause lasting memory retention in the underlying libc.

      NMT is okay for initial triaging but no help when digging deeper into compiler footprint. NMT shows how much native memory the JIT uses but lumps together footprints from concurrent compilations, making its peak values arbitrary. And we have no way to associate the NMT numbers with individual allocations.

      This RFE is a proposal for a new statistic that reports memory usage per compilation. That will allow us to understand footprint issues and libc mem retention better and can be the first step in footprint reductions or, potentially, for adding a memory ceiling to C2.


      Examples:

      1) Enable memory statistics globally

      ```
      java ... -XX:CompileCommand=MemStat,*.*
      ```

      2) Enable memory statistics for j.l.String, print logs after each compilation and a final report at VM exit:

      ```
      -XX:CompileCommand=MemStat,java.lang.String::*,print
      ```



      Attachments

        Issue Links

          Activity

            People

              stuefe Thomas Stuefe
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: