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

sometimes contended-exit event comes after contended-entered on another thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs14
    • 7
    • hotspot
    • None
    • b09
    • generic
    • generic

        With help of the D-Light tool I can see that the contended-exit events
        comes after contended-entered event on another thread.
        This is an example:
          t12:Enter, t14:Enter, t2:Exit, t14:Entered, (t14:Exit is missed), t12:Entered

        The tool does not show the t14:Exit event as it is already out of scope.

        It happens because the Hotspot monitor-contended-exit probe is located incorrectly.
        I think that posting the contended__exit monitor probe needs to be done
        before wakee is unparked:



        void ObjectMonitor::ExitEpilog (Thread * Self, ObjectWaiter * Wakee) {
           ...
           Trigger->unpark() ;

           // Maintain stats and report events to JVMTI
           if (ObjectSynchronizer::_sync_Parks != NULL) {
              ObjectSynchronizer::_sync_Parks->inc() ;
           }
           DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self);
        }

              blacklion Lev Serebryakov (Inactive)
              sspitsyn Serguei Spitsyn
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: