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

[nmt] Arena Chunk value correction causes multiple errors in reporting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4
    • tbd
    • 23
    • hotspot

    Description

      Because of the convoluted way we account arena memory and malloc memory - and then, during reporting, fix up the report to prevent double-accounting - there are some values in NMT reports that make no sense:

      - for "Arena Chunk malloc", the number of allocations (#xxx)
      - for "Arena Chunk malloc", the peak values are wrong
      - in detail mode, by-callstack display of arena allocations are tagged as "Arena Chunk", not by the category the Arena belongs to, which would be a lot more useful.

      There may be more things wrong, but those are the ones I spot.

      In theory, "Arena Chunk malloc" should only contain the memory for chunks that are not part of an Arena, since chunks that belong to an arena are counted under the category the arena belongs to, so they are part of that category arena counter.

      Example:

      ```
       - Compiler (reserved=189424, committed=189424)
                                  (malloc=21848 #254) (peak=66496 #312)
                                  (arena=167576 #4) (peak=16303424 #28)
      ...
      - Arena Chunk (reserved=9527912, committed=9527912)
                                  (malloc=9527912 #459) (peak=17566120 #459)
      ```

      - chunks belonging to Arenas tagged with mtCompiler are shown as part of "Compiler .. arena"

      - chunks that belong to no Arena should be shown as "Arena chunk .. malloc", but here, the peak is wrong because of the way these values are updated/corrected during reporting.

      There also seems to be another bug, in that "Arena Chunks malloc" is never zero, even though there are no free chunk pools.

      All these are different facets of the same error: we account, quite orderly, malloc and arena values separately. That causes double accounting. We then account for double account late in the reporting process as a display modification, that is quite imperfect.

      This all is very messy.





      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: