changeset 1880:7139e81efd2d

6970566: runThese fails with SIGSEGV Reviewed-by: kvn
author never
date Thu, 22 Jul 2010 15:29:22 -0700
parents e0ba4e04c839
children 5063ce716349 e5dfb3ccb88b
files src/share/vm/code/codeBlob.cpp src/share/vm/code/codeBlob.hpp
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/codeBlob.cpp	Fri Jul 16 18:14:19 2010 -0700
+++ b/src/share/vm/code/codeBlob.cpp	Thu Jul 22 15:29:22 2010 -0700
@@ -202,6 +202,11 @@
 //----------------------------------------------------------------------------------------------------
 // Implementation of AdapterBlob
 
+AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) :
+  BufferBlob("I2C/C2I adapters", size, cb) {
+  CodeCache::commit(this);
+}
+
 AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
   ThreadInVMfromUnknown __tiv;  // get to VM state in case we block on CodeCache_lock
 
@@ -210,7 +215,6 @@
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
     blob = new (size) AdapterBlob(size, cb);
-    CodeCache::commit(blob);
   }
   // Track memory usage statistic after releasing CodeCache_lock
   MemoryService::track_code_cache_memory_usage();
--- a/src/share/vm/code/codeBlob.hpp	Fri Jul 16 18:14:19 2010 -0700
+++ b/src/share/vm/code/codeBlob.hpp	Thu Jul 22 15:29:22 2010 -0700
@@ -219,8 +219,7 @@
 
 class AdapterBlob: public BufferBlob {
 private:
-  AdapterBlob(int size)                 : BufferBlob("I2C/C2I adapters", size) {}
-  AdapterBlob(int size, CodeBuffer* cb) : BufferBlob("I2C/C2I adapters", size, cb) {}
+  AdapterBlob(int size, CodeBuffer* cb);
 
 public:
   // Creation