--- old/src/share/vm/runtime/sweeper.cpp 2014-11-25 15:02:28.870923214 +0100 +++ new/src/share/vm/runtime/sweeper.cpp 2014-11-25 15:02:28.758923219 +0100 @@ -385,8 +385,6 @@ int freed_memory = 0; { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); - - // The last invocation iterates until there are no more nmethods while (!_current.end()) { swept_count++; handle_safepoint_request(); --- old/src/share/vm/prims/whitebox.cpp 2014-11-25 15:02:28.870923214 +0100 +++ new/src/share/vm/prims/whitebox.cpp 2014-11-25 15:02:28.758923219 +0100 @@ -743,7 +743,7 @@ WB_END void WhiteBox::force_sweep() { - guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to enabled"); + guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled"); { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); NMethodSweeper::_should_sweep = true; @@ -802,12 +802,12 @@ WB_END int WhiteBox::get_blob_type(const CodeBlob* code) { - guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to enabled"); + guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled"); return CodeCache::get_code_heap(code)->code_blob_type(); } CodeHeap* WhiteBox::get_code_heap(int blob_type) { - guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to enabled"); + guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled"); return CodeCache::get_code_heap(blob_type); } @@ -883,7 +883,7 @@ WB_END CodeBlob* WhiteBox::allocate_code_blob(int size, int blob_type) { - guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to enabled"); + guarantee(WhiteBoxAPI, "internal testing API :: WhiteBox has to be enabled"); BufferBlob* blob; int full_size = CodeBlob::align_code_offset(sizeof(BufferBlob)); if (full_size < size) { @@ -892,10 +892,10 @@ { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); blob = (BufferBlob*) CodeCache::allocate(full_size, blob_type); + ::new (blob) BufferBlob("WB::DummyBlob", full_size); } // Track memory usage statistic after releasing CodeCache_lock MemoryService::track_code_cache_memory_usage(); - ::new (blob) BufferBlob("WB::DummyBlob", full_size); return blob; }