--- a/hotspot/src/share/vm/code/codeBlob.cpp Fri Jul 16 18:14:19 2010 -0700
+++ b/hotspot/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();