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

Unexpected code cache usage values after code cache allocation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: