src/share/vm/classfile/stringTable.cpp

Print this page
rev 6521 : 8044775: Improve usage of umbrella header atomic.inline.hpp.
Reviewed-by: stefank, kvn


  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/altHashing.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/stringTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "gc_interface/collectedHeap.inline.hpp"
  31 #include "memory/allocation.inline.hpp"
  32 #include "memory/filemap.hpp"
  33 #include "memory/gcLocker.inline.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/oop.inline2.hpp"

  36 #include "runtime/mutexLocker.hpp"
  37 #include "utilities/hashtable.inline.hpp"
  38 #if INCLUDE_ALL_GCS
  39 #include "gc_implementation/g1/g1StringDedup.hpp"
  40 #endif
  41 
  42 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  43 
  44 // the number of buckets a thread claims
  45 const int ClaimChunkSize = 32;
  46 
  47 #ifdef ASSERT
  48 class StableMemoryChecker : public StackObj {
  49   enum { _bufsize = wordSize*4 };
  50 
  51   address _region;
  52   jint    _size;
  53   u1      _save_buf[_bufsize];
  54 
  55   int sample(u1* save_buf) {




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/altHashing.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "classfile/stringTable.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "gc_interface/collectedHeap.inline.hpp"
  31 #include "memory/allocation.inline.hpp"
  32 #include "memory/filemap.hpp"
  33 #include "memory/gcLocker.inline.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/oop.inline2.hpp"
  36 #include "runtime/atomic.inline.hpp"
  37 #include "runtime/mutexLocker.hpp"
  38 #include "utilities/hashtable.inline.hpp"
  39 #if INCLUDE_ALL_GCS
  40 #include "gc_implementation/g1/g1StringDedup.hpp"
  41 #endif
  42 
  43 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
  44 
  45 // the number of buckets a thread claims
  46 const int ClaimChunkSize = 32;
  47 
  48 #ifdef ASSERT
  49 class StableMemoryChecker : public StackObj {
  50   enum { _bufsize = wordSize*4 };
  51 
  52   address _region;
  53   jint    _size;
  54   u1      _save_buf[_bufsize];
  55 
  56   int sample(u1* save_buf) {