Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 7154:5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Dec 2012 21:36:40 +0100 |
parents | 88d626e2c2a8 |
children | 291ffc492eb6 8a3efb8c831d |
comparison
equal
deleted
inserted
replaced
7153:c421c19b7bf8 | 7154:5d0bb7d52783 |
---|---|
587 #define set_object(name, value) do { env->SetObjectField(config, getFieldID(env, config, name, "Ljava/lang/Object;"), value); } while (0) | 587 #define set_object(name, value) do { env->SetObjectField(config, getFieldID(env, config, name, "Ljava/lang/Object;"), value); } while (0) |
588 #define set_int_array(name, value) do { env->SetObjectField(config, getFieldID(env, config, name, "[I"), value); } while (0) | 588 #define set_int_array(name, value) do { env->SetObjectField(config, getFieldID(env, config, name, "[I"), value); } while (0) |
589 | 589 |
590 guarantee(HeapWordSize == sizeof(char*), "Graal assumption that HeadWordSize == machine word size is wrong"); | 590 guarantee(HeapWordSize == sizeof(char*), "Graal assumption that HeadWordSize == machine word size is wrong"); |
591 #ifdef _WIN64 | 591 #ifdef _WIN64 |
592 set_boolean(env, config, "windowsOs", true); | 592 set_boolean("windowsOs", true); |
593 #else | 593 #else |
594 set_boolean("windowsOs", false); | 594 set_boolean("windowsOs", false); |
595 #endif | 595 #endif |
596 set_boolean("verifyOops", VerifyOops); | 596 set_boolean("verifyOops", VerifyOops); |
597 set_boolean("useFastLocking", UseFastLocking); | 597 set_boolean("useFastLocking", GraalUseFastLocking); |
598 set_boolean("useFastNewObjectArray", UseFastNewObjectArray); | |
599 set_boolean("useBiasedLocking", UseBiasedLocking); | 598 set_boolean("useBiasedLocking", UseBiasedLocking); |
600 set_boolean("useFastNewTypeArray", UseFastNewTypeArray); | |
601 set_boolean("useTLAB", UseTLAB); | 599 set_boolean("useTLAB", UseTLAB); |
602 set_int("codeEntryAlignment", CodeEntryAlignment); | 600 set_int("codeEntryAlignment", CodeEntryAlignment); |
603 set_int("vmPageSize", os::vm_page_size()); | 601 set_int("vmPageSize", os::vm_page_size()); |
604 set_int("stackShadowPages", StackShadowPages); | 602 set_int("stackShadowPages", StackShadowPages); |
605 set_int("hubOffset", oopDesc::klass_offset_in_bytes()); | 603 set_int("hubOffset", oopDesc::klass_offset_in_bytes()); |
626 set_int("extraStackEntries", Method::extra_stack_entries()); | 624 set_int("extraStackEntries", Method::extra_stack_entries()); |
627 set_int("methodAccessFlagsOffset", in_bytes(Method::access_flags_offset())); | 625 set_int("methodAccessFlagsOffset", in_bytes(Method::access_flags_offset())); |
628 set_int("klassHasFinalizerFlag", JVM_ACC_HAS_FINALIZER); | 626 set_int("klassHasFinalizerFlag", JVM_ACC_HAS_FINALIZER); |
629 set_int("threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset())); | 627 set_int("threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset())); |
630 set_int("threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset())); | 628 set_int("threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset())); |
631 set_long("safepointPollingAddress", (jlong)(os::get_polling_page() + (SafepointPollOffset % os::vm_page_size()))); | |
632 set_boolean("isPollingPageFar", Assembler::is_polling_page_far()); | 629 set_boolean("isPollingPageFar", Assembler::is_polling_page_far()); |
633 set_int("classMirrorOffset", in_bytes(Klass::java_mirror_offset())); | 630 set_int("classMirrorOffset", in_bytes(Klass::java_mirror_offset())); |
634 set_int("runtimeCallStackSize", (jint)frame::arg_reg_save_area_bytes); | 631 set_int("runtimeCallStackSize", (jint)frame::arg_reg_save_area_bytes); |
635 set_int("klassModifierFlagsOffset", in_bytes(Klass::modifier_flags_offset())); | 632 set_int("klassModifierFlagsOffset", in_bytes(Klass::modifier_flags_offset())); |
636 set_int("klassAccessFlagsOffset", in_bytes(Klass::access_flags_offset())); | 633 set_int("klassAccessFlagsOffset", in_bytes(Klass::access_flags_offset())); |
707 set_long("arithmeticCosStub", VmIds::addStub(CAST_FROM_FN_PTR(address, SharedRuntime::dcos))); | 704 set_long("arithmeticCosStub", VmIds::addStub(CAST_FROM_FN_PTR(address, SharedRuntime::dcos))); |
708 set_long("arithmeticTanStub", VmIds::addStub(CAST_FROM_FN_PTR(address, SharedRuntime::dtan))); | 705 set_long("arithmeticTanStub", VmIds::addStub(CAST_FROM_FN_PTR(address, SharedRuntime::dtan))); |
709 set_long("logPrimitiveStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_primitive_id))); | 706 set_long("logPrimitiveStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_primitive_id))); |
710 set_long("logObjectStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_object_id))); | 707 set_long("logObjectStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_object_id))); |
711 set_long("logPrintfStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_printf_id))); | 708 set_long("logPrintfStub", VmIds::addStub(GraalRuntime::entry_for(GraalRuntime::graal_log_printf_id))); |
709 | |
710 set_int("deoptReasonNone", Deoptimization::Reason_none); | |
711 set_int("deoptReasonNullCheck", Deoptimization::Reason_null_check); | |
712 set_int("deoptReasonRangeCheck", Deoptimization::Reason_range_check); | |
713 set_int("deoptReasonClassCheck", Deoptimization::Reason_class_check); | |
714 set_int("deoptReasonArrayCheck", Deoptimization::Reason_array_check); | |
715 set_int("deoptReasonUnreached0", Deoptimization::Reason_unreached0); | |
716 set_int("deoptReasonTypeCheckInlining", Deoptimization::Reason_type_checked_inlining); | |
717 set_int("deoptReasonOptimizedTypeCheck", Deoptimization::Reason_optimized_type_check); | |
718 set_int("deoptReasonNotCompiledExceptionHandler", Deoptimization::Reason_not_compiled_exception_handler); | |
719 set_int("deoptReasonUnresolved", Deoptimization::Reason_unresolved); | |
720 set_int("deoptReasonJsrMismatch", Deoptimization::Reason_jsr_mismatch); | |
721 set_int("deoptReasonDiv0Check", Deoptimization::Reason_div0_check); | |
722 set_int("deoptReasonConstraint", Deoptimization::Reason_constraint); | |
723 | |
724 set_int("deoptActionNone", Deoptimization::Action_none); | |
725 set_int("deoptActionMaybeRecompile", Deoptimization::Action_maybe_recompile); | |
726 set_int("deoptActionReinterpret", Deoptimization::Action_reinterpret); | |
727 set_int("deoptActionMakeNotEntrant", Deoptimization::Action_make_not_entrant); | |
728 set_int("deoptActionMakeNotCompilable", Deoptimization::Action_make_not_compilable); | |
712 | 729 |
713 | 730 |
714 BarrierSet* bs = Universe::heap()->barrier_set(); | 731 BarrierSet* bs = Universe::heap()->barrier_set(); |
715 switch (bs->kind()) { | 732 switch (bs->kind()) { |
716 case BarrierSet::CardTableModRef: | 733 case BarrierSet::CardTableModRef: |