src/share/vm/runtime/mutexLocker.cpp

Print this page
rev 6083 : 8029075: String deduplication in G1
Implementation of JEP 192, http://openjdk.java.net/jeps/192
   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  41 Monitor* SystemDictionary_lock        = NULL;
  42 Mutex*   PackageTable_lock            = NULL;
  43 Mutex*   CompiledIC_lock              = NULL;
  44 Mutex*   InlineCacheBuffer_lock       = NULL;
  45 Mutex*   VMStatistic_lock             = NULL;
  46 Mutex*   JNIGlobalHandle_lock         = NULL;
  47 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
  48 Mutex*   MemberNameTable_lock         = NULL;
  49 Mutex*   JmethodIdCreation_lock       = NULL;
  50 Mutex*   JfieldIdCreation_lock        = NULL;
  51 Monitor* JNICritical_lock             = NULL;
  52 Mutex*   JvmtiThreadState_lock        = NULL;
  53 Monitor* JvmtiPendingEvent_lock       = NULL;
  54 Monitor* Heap_lock                    = NULL;
  55 Mutex*   ExpandHeap_lock              = NULL;
  56 Mutex*   AdapterHandlerLibrary_lock   = NULL;
  57 Mutex*   SignatureHandlerLibrary_lock = NULL;
  58 Mutex*   VtableStubs_lock             = NULL;
  59 Mutex*   SymbolTable_lock             = NULL;
  60 Mutex*   StringTable_lock             = NULL;


  61 Mutex*   CodeCache_lock               = NULL;
  62 Mutex*   MethodData_lock              = NULL;
  63 Mutex*   RetData_lock                 = NULL;
  64 Monitor* VMOperationQueue_lock        = NULL;
  65 Monitor* VMOperationRequest_lock      = NULL;
  66 Monitor* Safepoint_lock               = NULL;
  67 Monitor* SerializePage_lock           = NULL;
  68 Monitor* Threads_lock                 = NULL;
  69 Monitor* CGC_lock                     = NULL;
  70 Mutex*   STS_init_lock                = NULL;
  71 Monitor* SLT_lock                     = NULL;
  72 Monitor* iCMS_lock                    = NULL;
  73 Monitor* FullGCCount_lock             = NULL;
  74 Monitor* CMark_lock                   = NULL;
  75 Mutex*   CMRegionStack_lock           = NULL;
  76 Mutex*   SATB_Q_FL_lock               = NULL;
  77 Monitor* SATB_Q_CBL_mon               = NULL;
  78 Mutex*   Shared_SATB_Q_lock           = NULL;
  79 Mutex*   DirtyCardQ_FL_lock           = NULL;
  80 Monitor* DirtyCardQ_CBL_mon           = NULL;


 179     def(FullGCCount_lock           , Monitor, leaf,        true ); // in support of ExplicitGCInvokesConcurrent
 180   }
 181   if (UseG1GC) {
 182     def(CMark_lock                 , Monitor, nonleaf,     true ); // coordinate concurrent mark thread
 183     def(CMRegionStack_lock         , Mutex,   leaf,        true );
 184     def(SATB_Q_FL_lock             , Mutex  , special,     true );
 185     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true );
 186     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true );
 187 
 188     def(DirtyCardQ_FL_lock         , Mutex  , special,     true );
 189     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true );
 190     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true );
 191 
 192     def(FreeList_lock              , Mutex,   leaf     ,   true );
 193     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true );
 194     def(OldSets_lock               , Mutex  , leaf     ,   true );
 195     def(RootRegionScan_lock        , Monitor, leaf     ,   true );
 196     def(MMUTracker_lock            , Mutex  , leaf     ,   true );
 197     def(HotCardCache_lock          , Mutex  , special  ,   true );
 198     def(EvacFailureStack_lock      , Mutex  , nonleaf  ,   true );



 199   }
 200   def(ParGCRareEvent_lock          , Mutex  , leaf     ,   true );
 201   def(DerivedPointerTableGC_lock   , Mutex,   leaf,        true );
 202   def(CodeCache_lock               , Mutex  , special,     true );
 203   def(Interrupt_lock               , Monitor, special,     true ); // used for interrupt processing
 204   def(RawMonitor_lock              , Mutex,   special,     true );
 205   def(OopMapCacheAlloc_lock        , Mutex,   leaf,        true ); // used for oop_map_cache allocation.
 206 
 207   def(Patching_lock                , Mutex  , special,     true ); // used for safepointing and code patching.
 208   def(ObjAllocPost_lock            , Monitor, special,     false);
 209   def(Service_lock                 , Monitor, special,     true ); // used for service thread operations
 210   def(JmethodIdCreation_lock       , Mutex  , leaf,        true ); // used for creating jmethodIDs.
 211 
 212   def(SystemDictionary_lock        , Monitor, leaf,        true ); // lookups done by VM thread
 213   def(PackageTable_lock            , Mutex  , leaf,        false);
 214   def(InlineCacheBuffer_lock       , Mutex  , leaf,        true );
 215   def(VMStatistic_lock             , Mutex  , leaf,        false);
 216   def(ExpandHeap_lock              , Mutex  , leaf,        true ); // Used during compilation by VM thread
 217   def(JNIHandleBlockFreeList_lock  , Mutex  , leaf,        true ); // handles are used by VM thread
 218   def(SignatureHandlerLibrary_lock , Mutex  , leaf,        false);


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  41 Monitor* SystemDictionary_lock        = NULL;
  42 Mutex*   PackageTable_lock            = NULL;
  43 Mutex*   CompiledIC_lock              = NULL;
  44 Mutex*   InlineCacheBuffer_lock       = NULL;
  45 Mutex*   VMStatistic_lock             = NULL;
  46 Mutex*   JNIGlobalHandle_lock         = NULL;
  47 Mutex*   JNIHandleBlockFreeList_lock  = NULL;
  48 Mutex*   MemberNameTable_lock         = NULL;
  49 Mutex*   JmethodIdCreation_lock       = NULL;
  50 Mutex*   JfieldIdCreation_lock        = NULL;
  51 Monitor* JNICritical_lock             = NULL;
  52 Mutex*   JvmtiThreadState_lock        = NULL;
  53 Monitor* JvmtiPendingEvent_lock       = NULL;
  54 Monitor* Heap_lock                    = NULL;
  55 Mutex*   ExpandHeap_lock              = NULL;
  56 Mutex*   AdapterHandlerLibrary_lock   = NULL;
  57 Mutex*   SignatureHandlerLibrary_lock = NULL;
  58 Mutex*   VtableStubs_lock             = NULL;
  59 Mutex*   SymbolTable_lock             = NULL;
  60 Mutex*   StringTable_lock             = NULL;
  61 Monitor* StringDedupQueue_lock        = NULL;
  62 Mutex*   StringDedupTable_lock        = NULL;
  63 Mutex*   CodeCache_lock               = NULL;
  64 Mutex*   MethodData_lock              = NULL;
  65 Mutex*   RetData_lock                 = NULL;
  66 Monitor* VMOperationQueue_lock        = NULL;
  67 Monitor* VMOperationRequest_lock      = NULL;
  68 Monitor* Safepoint_lock               = NULL;
  69 Monitor* SerializePage_lock           = NULL;
  70 Monitor* Threads_lock                 = NULL;
  71 Monitor* CGC_lock                     = NULL;
  72 Mutex*   STS_init_lock                = NULL;
  73 Monitor* SLT_lock                     = NULL;
  74 Monitor* iCMS_lock                    = NULL;
  75 Monitor* FullGCCount_lock             = NULL;
  76 Monitor* CMark_lock                   = NULL;
  77 Mutex*   CMRegionStack_lock           = NULL;
  78 Mutex*   SATB_Q_FL_lock               = NULL;
  79 Monitor* SATB_Q_CBL_mon               = NULL;
  80 Mutex*   Shared_SATB_Q_lock           = NULL;
  81 Mutex*   DirtyCardQ_FL_lock           = NULL;
  82 Monitor* DirtyCardQ_CBL_mon           = NULL;


 181     def(FullGCCount_lock           , Monitor, leaf,        true ); // in support of ExplicitGCInvokesConcurrent
 182   }
 183   if (UseG1GC) {
 184     def(CMark_lock                 , Monitor, nonleaf,     true ); // coordinate concurrent mark thread
 185     def(CMRegionStack_lock         , Mutex,   leaf,        true );
 186     def(SATB_Q_FL_lock             , Mutex  , special,     true );
 187     def(SATB_Q_CBL_mon             , Monitor, nonleaf,     true );
 188     def(Shared_SATB_Q_lock         , Mutex,   nonleaf,     true );
 189 
 190     def(DirtyCardQ_FL_lock         , Mutex  , special,     true );
 191     def(DirtyCardQ_CBL_mon         , Monitor, nonleaf,     true );
 192     def(Shared_DirtyCardQ_lock     , Mutex,   nonleaf,     true );
 193 
 194     def(FreeList_lock              , Mutex,   leaf     ,   true );
 195     def(SecondaryFreeList_lock     , Monitor, leaf     ,   true );
 196     def(OldSets_lock               , Mutex  , leaf     ,   true );
 197     def(RootRegionScan_lock        , Monitor, leaf     ,   true );
 198     def(MMUTracker_lock            , Mutex  , leaf     ,   true );
 199     def(HotCardCache_lock          , Mutex  , special  ,   true );
 200     def(EvacFailureStack_lock      , Mutex  , nonleaf  ,   true );
 201 
 202     def(StringDedupQueue_lock      , Monitor, leaf,        true );
 203     def(StringDedupTable_lock      , Mutex  , leaf,        true );
 204   }
 205   def(ParGCRareEvent_lock          , Mutex  , leaf     ,   true );
 206   def(DerivedPointerTableGC_lock   , Mutex,   leaf,        true );
 207   def(CodeCache_lock               , Mutex  , special,     true );
 208   def(Interrupt_lock               , Monitor, special,     true ); // used for interrupt processing
 209   def(RawMonitor_lock              , Mutex,   special,     true );
 210   def(OopMapCacheAlloc_lock        , Mutex,   leaf,        true ); // used for oop_map_cache allocation.
 211 
 212   def(Patching_lock                , Mutex  , special,     true ); // used for safepointing and code patching.
 213   def(ObjAllocPost_lock            , Monitor, special,     false);
 214   def(Service_lock                 , Monitor, special,     true ); // used for service thread operations
 215   def(JmethodIdCreation_lock       , Mutex  , leaf,        true ); // used for creating jmethodIDs.
 216 
 217   def(SystemDictionary_lock        , Monitor, leaf,        true ); // lookups done by VM thread
 218   def(PackageTable_lock            , Mutex  , leaf,        false);
 219   def(InlineCacheBuffer_lock       , Mutex  , leaf,        true );
 220   def(VMStatistic_lock             , Mutex  , leaf,        false);
 221   def(ExpandHeap_lock              , Mutex  , leaf,        true ); // Used during compilation by VM thread
 222   def(JNIHandleBlockFreeList_lock  , Mutex  , leaf,        true ); // handles are used by VM thread
 223   def(SignatureHandlerLibrary_lock , Mutex  , leaf,        false);