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

Unexpected code cache usage values after code cache allocation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 9
    • hotspot

      A test fails with following logic:
      1) launch VM with -XX:-UseCodeCacheFlushing -XX:-MethodFlushing -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache -XX:CompileCommand=compileonly,null::* -XX:CodeCacheSegmentSize=1024
      2) get MemoryPoolMXBean for non-profiled nmethods cache
      3) get cache usage from bean (getUsage().getUsed())
      4) make few small allocations (for example, 1000 bytes)
      5) get cache usage from bean (getUsage().getUsed()). This usage will be larger than previous one by 4*CodeCacheSegmentSize, which is unexpected.

      note: such behaviour is not reproduced on large(>4096 bytes) allocations
      note2: reproducible on different CodeCacheSegmentSize.
      (use solaris-sparc latest hs-comp fastdebug build)

      Example jtreg hotspot test is attached

            thartmann Tobias Hartmann
            dpochepk Dmitrij Pochepko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: