< prev index next >
src/share/vm/code/codeBlob.cpp
Print this page
@@ -328,10 +328,34 @@
return blob;
}
//----------------------------------------------------------------------------------------------------
+// Implementation of BufferedValueTypeBlob
+BufferedValueTypeBlob::BufferedValueTypeBlob(int size, CodeBuffer* cb, int pack_fields_off, int unpack_fields_off) :
+ BufferBlob("buffered value type", size, cb),
+ _pack_fields_off(pack_fields_off),
+ _unpack_fields_off(unpack_fields_off) {
+ CodeCache::commit(this);
+}
+
+BufferedValueTypeBlob* BufferedValueTypeBlob::create(CodeBuffer* cb, int pack_fields_off, int unpack_fields_off) {
+ ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock
+
+ BufferedValueTypeBlob* blob = NULL;
+ unsigned int size = CodeBlob::allocation_size(cb, sizeof(BufferedValueTypeBlob));
+ {
+ MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
+ blob = new (size) BufferedValueTypeBlob(size, cb, pack_fields_off, unpack_fields_off);
+ }
+ // Track memory usage statistic after releasing CodeCache_lock
+ MemoryService::track_code_cache_memory_usage();
+
+ return blob;
+}
+
+//----------------------------------------------------------------------------------------------------
// Implementation of RuntimeStub
RuntimeStub::RuntimeStub(
const char* name,
CodeBuffer* cb,
< prev index next >