changeset 10842:5d720f8c105b

Merge
author hseigel
date Wed, 06 Apr 2016 16:03:02 +0200
parents 4e9aaa557de4 20b4d892988e
children 8c4142c9f8ab 8d8ff222b16a
files
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classLoaderData.cpp	Wed Apr 06 13:41:59 2016 +0200
+++ b/src/share/vm/classfile/classLoaderData.cpp	Wed Apr 06 16:03:02 2016 +0200
@@ -373,13 +373,10 @@
   // Lazily create the package entry table at first request.
   if (_packages == NULL) {
     MutexLockerEx m1(metaspace_lock(), Mutex::_no_safepoint_check_flag);
-    // Check again if _packages has been allocated while we were getting this lock.
-    if (_packages != NULL) {
-      return _packages;
+    // Check if _packages got allocated while we were waiting for this lock.
+    if (_packages == NULL) {
+      _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size);
     }
-    // Ensure _packages is stable, since it is examined without a lock
-    OrderAccess::storestore();
-    _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size);
   }
   return _packages;
 }