Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceMirrorKlass.cpp @ 4009:e5928e7dab26
7098528: crash with java -XX:+ExtendedDTraceProbes
Reviewed-by: kvn
author | never |
---|---|
date | Mon, 17 Oct 2011 21:38:29 -0700 |
parents | c7f3d0b4570f |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
4008:8187c94a9a87 | 4009:e5928e7dab26 |
---|---|
286 | 286 |
287 instanceOop instanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { | 287 instanceOop instanceMirrorKlass::allocate_instance(KlassHandle k, TRAPS) { |
288 // Query before forming handle. | 288 // Query before forming handle. |
289 int size = instance_size(k); | 289 int size = instance_size(k); |
290 KlassHandle h_k(THREAD, as_klassOop()); | 290 KlassHandle h_k(THREAD, as_klassOop()); |
291 instanceOop i; | 291 instanceOop i = (instanceOop) CollectedHeap::Class_obj_allocate(h_k, size, k, CHECK_NULL); |
292 | |
293 if (JavaObjectsInPerm) { | |
294 i = (instanceOop) CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL); | |
295 } else { | |
296 assert(ScavengeRootsInCode > 0, "must be"); | |
297 i = (instanceOop) CollectedHeap::obj_allocate(h_k, size, CHECK_NULL); | |
298 } | |
299 | |
300 return i; | 292 return i; |
301 } | 293 } |
302 | 294 |
303 int instanceMirrorKlass::oop_size(oop obj) const { | 295 int instanceMirrorKlass::oop_size(oop obj) const { |
304 return java_lang_Class::oop_size(obj); | 296 return java_lang_Class::oop_size(obj); |