Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 7147:88d626e2c2a8
added TLAB fast refill stub for array allocation
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 07 Dec 2012 23:38:09 +0100 |
parents | 6c46172c04bf |
children | 5d0bb7d52783 2ae3e26b7e9a |
comparison
equal
deleted
inserted
replaced
7146:8c02d320a1ac | 7147:88d626e2c2a8 |
---|---|
510 } | 510 } |
511 return NULL; | 511 return NULL; |
512 } | 512 } |
513 Handle holder = GraalCompiler::get_JavaType(method->method_holder(), CHECK_NULL); | 513 Handle holder = GraalCompiler::get_JavaType(method->method_holder(), CHECK_NULL); |
514 return JNIHandles::make_local(THREAD, VMToCompiler::createResolvedJavaMethod(holder, method(), THREAD)); | 514 return JNIHandles::make_local(THREAD, VMToCompiler::createResolvedJavaMethod(holder, method(), THREAD)); |
515 C2V_END | |
516 | |
517 C2V_VMENTRY(jlong, getPrototypeMarkWord, (JNIEnv *, jobject, jobject klass)) | |
518 KlassHandle klass_handle(java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaMirror(klass))); | |
519 if (klass_handle->oop_is_array()) { | |
520 return (int32_t)(intptr_t) markOopDesc::prototype(); | |
521 } else { | |
522 return (jlong) (intptr_t) klass_handle->prototype_header(); | |
523 } | |
524 C2V_END | 515 C2V_END |
525 | 516 |
526 C2V_VMENTRY(jboolean, isTypeInitialized,(JNIEnv *, jobject, jobject hotspot_klass)) | 517 C2V_VMENTRY(jboolean, isTypeInitialized,(JNIEnv *, jobject, jobject hotspot_klass)) |
527 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaMirror(hotspot_klass)); | 518 Klass* klass = java_lang_Class::as_Klass(HotSpotResolvedObjectType::javaMirror(hotspot_klass)); |
528 assert(klass != NULL, "method must not be called for primitive types"); | 519 assert(klass != NULL, "method must not be called for primitive types"); |
678 set_int("tlabRefillWasteIncrement", (int32_t) ThreadLocalAllocBuffer::refill_waste_limit_increment()); | 669 set_int("tlabRefillWasteIncrement", (int32_t) ThreadLocalAllocBuffer::refill_waste_limit_increment()); |
679 set_int("klassInstanceSizeOffset", in_bytes(Klass::layout_helper_offset())); | 670 set_int("klassInstanceSizeOffset", in_bytes(Klass::layout_helper_offset())); |
680 set_boolean("tlabStats", TLABStats); | 671 set_boolean("tlabStats", TLABStats); |
681 set_boolean("inlineContiguousAllocationSupported", !CMSIncrementalMode && Universe::heap()->supports_inline_contig_alloc()); | 672 set_boolean("inlineContiguousAllocationSupported", !CMSIncrementalMode && Universe::heap()->supports_inline_contig_alloc()); |
682 | 673 |
674 set_long("arrayPrototypeMarkWord", (intptr_t)markOopDesc::prototype()); | |
675 set_int("layoutHelperLog2ElementSizeShift", Klass::_lh_log2_element_size_shift); | |
676 set_int("layoutHelperLog2ElementSizeMask", Klass::_lh_log2_element_size_mask); | |
677 set_int("layoutHelperElementTypeShift", Klass::_lh_element_type_shift); | |
678 set_int("layoutHelperElementTypeMask", Klass::_lh_element_type_mask); | |
679 set_int("layoutHelperHeaderSizeShift", Klass::_lh_header_size_shift); | |
680 set_int("layoutHelperHeaderSizeMask", Klass::_lh_header_size_mask); | |
681 set_int("layoutHelperOffset", in_bytes(Klass::layout_helper_offset())); | |
682 | |
683 set_long("debugStub", VmIds::addStub((address)warning)); | 683 set_long("debugStub", VmIds::addStub((address)warning)); |
684 set_long("instanceofStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_slow_subtype_check_id))); | 684 set_long("instanceofStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_slow_subtype_check_id))); |
685 set_long("newInstanceStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_instance_id))); | 685 set_long("newInstanceStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_instance_id))); |
686 set_long("newArrayStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_array_id))); | 686 set_long("newArrayStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_array_id))); |
687 set_long("newMultiArrayStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_multi_array_id))); | 687 set_long("newMultiArrayStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_new_multi_array_id))); |
947 {CC"lookupMethodInPool", CC"("HS_RESOLVED_TYPE"IB)"METHOD, FN_PTR(lookupMethodInPool)}, | 947 {CC"lookupMethodInPool", CC"("HS_RESOLVED_TYPE"IB)"METHOD, FN_PTR(lookupMethodInPool)}, |
948 {CC"lookupTypeInPool", CC"("HS_RESOLVED_TYPE"I)"TYPE, FN_PTR(lookupTypeInPool)}, | 948 {CC"lookupTypeInPool", CC"("HS_RESOLVED_TYPE"I)"TYPE, FN_PTR(lookupTypeInPool)}, |
949 {CC"lookupReferencedTypeInPool", CC"("HS_RESOLVED_TYPE"IB)V", FN_PTR(lookupReferencedTypeInPool)}, | 949 {CC"lookupReferencedTypeInPool", CC"("HS_RESOLVED_TYPE"IB)V", FN_PTR(lookupReferencedTypeInPool)}, |
950 {CC"lookupFieldInPool", CC"("HS_RESOLVED_TYPE"IB)"FIELD, FN_PTR(lookupFieldInPool)}, | 950 {CC"lookupFieldInPool", CC"("HS_RESOLVED_TYPE"IB)"FIELD, FN_PTR(lookupFieldInPool)}, |
951 {CC"resolveMethod", CC"("HS_RESOLVED_TYPE STRING STRING")"METHOD, FN_PTR(resolveMethod)}, | 951 {CC"resolveMethod", CC"("HS_RESOLVED_TYPE STRING STRING")"METHOD, FN_PTR(resolveMethod)}, |
952 {CC"getPrototypeMarkWord", CC"("HS_RESOLVED_TYPE")J", FN_PTR(getPrototypeMarkWord)}, | |
953 {CC"getInstanceFields", CC"("HS_RESOLVED_TYPE")["HS_RESOLVED_FIELD, FN_PTR(getInstanceFields)}, | 952 {CC"getInstanceFields", CC"("HS_RESOLVED_TYPE")["HS_RESOLVED_FIELD, FN_PTR(getInstanceFields)}, |
954 {CC"isTypeInitialized", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(isTypeInitialized)}, | 953 {CC"isTypeInitialized", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(isTypeInitialized)}, |
955 {CC"initializeType", CC"("HS_RESOLVED_TYPE")V", FN_PTR(initializeType)}, | 954 {CC"initializeType", CC"("HS_RESOLVED_TYPE")V", FN_PTR(initializeType)}, |
956 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, | 955 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, |
957 {CC"getResolvedType", CC"("CLASS")"RESOLVED_TYPE, FN_PTR(getResolvedType)}, | 956 {CC"getResolvedType", CC"("CLASS")"RESOLVED_TYPE, FN_PTR(getResolvedType)}, |