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

NMT: JDK-8333994 detailed mode output changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • hotspot

      JDK-8333994 added source info to NMTs call stack printing. However it also changed the behavior of `NativeCallStack::print_on(outputStream* out)` in such a way that it no longer emits a newline between each frame. Unclear if this was intentional, but it makes the output a lot harder to parse. In the report this only affects the printing of the regions which are partially committed (or have multiple different commit call stacks), as the reservation call stacks is printed using the `NativeCallStackPrinter` which will emit the newlines. It is also unclear why `NativeCallStackPrinter` is not also used for the committed call stack printing so it can benefit from the cache. But there are more places than the report which make use of `NativeCallStack::print_on`.

      Current output:
      ```
      [0x00007f96cc53c000 - 0x00007f96cc63c000] reserved and committed 1048576 for GC from
          [0x00007f96cef944ac]ZPageTable::ZPageTable(ZPageAllocator*)+0x6c (allocation.inline.hpp:78)
          [0x00007f96cef6db04]ZHeap::ZHeap()+0x64 (zHeap.cpp:61)
          [0x00007f96cef61c10]ZCollectedHeap::ZCollectedHeap()+0x40 (allocation.hpp:127)
          [0x00007f96cef4e2b5]ZArguments::create_heap()+0x25 (zArguments.cpp:237)

              [0x00007f96cc53c000 - 0x00007f96cc63c000] committed 1048576 from
                  [0x00007f96cef944c8]ZPageTable::ZPageTable(ZPageAllocator*)+0x88 (zGranuleMap.inline.hpp:40)[0x00007f96cef6db04]ZHeap::ZHeap()+0x64 (zHeap.cpp:61)[0x00007f96cef61c10]ZCollectedHeap::ZCollectedHeap()+0x40 (allocation.hpp:127)[0x00007f96cef4e2b5]ZArguments::create_heap()+0x25 (zArguments.cpp:237)
      ```

      Expected output:
      ```
      [0x00007f2fa17dd000 - 0x00007f2fa18dd000] reserved and committed 1048576 for GC from
          [0x00007f2fa42354ac]ZPageTable::ZPageTable(ZPageAllocator*)+0x6c (allocation.inline.hpp:78)
          [0x00007f2fa420eb04]ZHeap::ZHeap()+0x64 (zHeap.cpp:61)
          [0x00007f2fa4202c10]ZCollectedHeap::ZCollectedHeap()+0x40 (allocation.hpp:127)
          [0x00007f2fa41ef2b5]ZArguments::create_heap()+0x25 (zArguments.cpp:237)

              [0x00007f2fa17dd000 - 0x00007f2fa18dd000] committed 1048576 from
                  [0x00007f2fa42354c8]ZPageTable::ZPageTable(ZPageAllocator*)+0x88 (zGranuleMap.inline.hpp:40)
                  [0x00007f2fa420eb04]ZHeap::ZHeap()+0x64 (zHeap.cpp:61)
                  [0x00007f2fa4202c10]ZCollectedHeap::ZCollectedHeap()+0x40 (allocation.hpp:127)
                  [0x00007f2fa41ef2b5]ZArguments::create_heap()+0x25 (zArguments.cpp:237)
      ```

      Output before JDK-8333994:
      ```
      [0x00007fc14244a000 - 0x00007fc14254a000] reserved and committed 1048576 for GC from
          [0x00007fc144ea1f8c]ZPageTable::ZPageTable(ZPageAllocator*)+0x6c
          [0x00007fc144e7b5e4]ZHeap::ZHeap()+0x64
          [0x00007fc144e6f6f0]ZCollectedHeap::ZCollectedHeap()+0x40
          [0x00007fc144e5bd95]ZArguments::create_heap()+0x25

              [0x00007fc14244a000 - 0x00007fc14254a000] committed 1048576 from
                  [0x00007fc144ea1fa8]ZPageTable::ZPageTable(ZPageAllocator*)+0x88
                  [0x00007fc144e7b5e4]ZHeap::ZHeap()+0x64
                  [0x00007fc144e6f6f0]ZCollectedHeap::ZCollectedHeap()+0x40
                  [0x00007fc144e5bd95]ZArguments::create_heap()+0x25
      ```

            stuefe Thomas Stuefe
            aboldtch Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: