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

Performance regression in ThreadReference.ownedMonitors()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs10
    • 6
    • hotspot
    • None
    • b03
    • generic, x86
    • generic, windows_xp

        During nightly results analysis following problem was found: since b92 execution of ThreadReference.ownedMonitors() and ThreadReference.ownedMonitorsAndFrames() take 6sec if thread for which this methods are called sleepeng (with previous builds this method take several ms). Attached test case demonstrates this, debuggee starts 2 threads, one of this threads calls sleep(Long.MAX_VALUE) another one executes infinite loop.

        Test output for b92:
        Time for SleepengThread
        ownedMonitors: Time: 6s (6668ms)
        ownedMonitorsAndFrames: Time: 6s (6668ms)
        Time for LoopThread
        ownedMonitors: Time: 0s (1ms)
        ownedMonitorsAndFrames: Time: 0s (1ms)
        debuggee out>>>Command received: QUIT
        debuggee out>>>Exit

        Test output for b91:
        Time for SleepengThread
        ownedMonitors: Time: 0s (1ms)
        ownedMonitorsAndFrames: Time: 0s (1ms)
        Time for LoopThread
        ownedMonitors: Time: 0s (0ms)
        ownedMonitorsAndFrames: Time: 0s (0ms)
        debuggee out>>>Command received: QUIT
        debuggee out>>>Exit

        Also I couldn't reproduce this problem just calling JVMTI functions 'GetOwnedMonitorStackDepthInfo' and 'GetOwnedMonitorInfo'.

              dcubed Daniel Daugherty
              sboikovsunw Semen Boikov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: