Top


定義場所(file name)

jdk/src/share/classes/sun/management/ThreadImpl.java

名前(function name)

    public void setThreadContentionMonitoringEnabled(boolean enable) {

本体部(body)

  {- -------------------------------------------
  (1) 
      ---------------------------------------- -}

            if (!isThreadContentionMonitoringSupported()) {
                throw new UnsupportedOperationException(
                    "Thread contention monitoring is not supported");
            }

            Util.checkControlAccess();

            synchronized (this) {
                if (contentionMonitoringEnabled != enable) {
                    if (enable) {
                        // if reeabled, reset contention time statistics
                        // for all threads
                        resetContentionTimes0(0);
                    }

                    // update the VM of the state change
                    setThreadContentionMonitoringEnabled0(enable);

                    contentionMonitoringEnabled = enable;
                }
            }
        }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.