Mercurial > hg > truffle
comparison src/share/vm/code/codeBlob.cpp @ 1663:7139e81efd2d
6970566: runThese fails with SIGSEGV
Reviewed-by: kvn
author | never |
---|---|
date | Thu, 22 Jul 2010 15:29:22 -0700 |
parents | 2a47bd84841f |
children | 126ea7725993 |
comparison
equal
deleted
inserted
replaced
1662:e0ba4e04c839 | 1663:7139e81efd2d |
---|---|
200 | 200 |
201 | 201 |
202 //---------------------------------------------------------------------------------------------------- | 202 //---------------------------------------------------------------------------------------------------- |
203 // Implementation of AdapterBlob | 203 // Implementation of AdapterBlob |
204 | 204 |
205 AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) : | |
206 BufferBlob("I2C/C2I adapters", size, cb) { | |
207 CodeCache::commit(this); | |
208 } | |
209 | |
205 AdapterBlob* AdapterBlob::create(CodeBuffer* cb) { | 210 AdapterBlob* AdapterBlob::create(CodeBuffer* cb) { |
206 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock | 211 ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock |
207 | 212 |
208 AdapterBlob* blob = NULL; | 213 AdapterBlob* blob = NULL; |
209 unsigned int size = allocation_size(cb, sizeof(AdapterBlob)); | 214 unsigned int size = allocation_size(cb, sizeof(AdapterBlob)); |
210 { | 215 { |
211 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | 216 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
212 blob = new (size) AdapterBlob(size, cb); | 217 blob = new (size) AdapterBlob(size, cb); |
213 CodeCache::commit(blob); | |
214 } | 218 } |
215 // Track memory usage statistic after releasing CodeCache_lock | 219 // Track memory usage statistic after releasing CodeCache_lock |
216 MemoryService::track_code_cache_memory_usage(); | 220 MemoryService::track_code_cache_memory_usage(); |
217 | 221 |
218 return blob; | 222 return blob; |