Mercurial > hg > graal-jvmci-8
changeset 5618:60ca7d300b8f
reverted to using fast_new_instance_init_check_id stub to use fast TLAB refilling
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 15 Jun 2012 13:16:43 +0200 |
parents | 19ca9e48cd31 |
children | d50c788195a5 |
files | src/cpu/x86/vm/c1_Runtime1_x86.cpp src/share/vm/graal/graalCompilerToVM.cpp |
diffstat | 2 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri Jun 15 12:05:13 2012 +0200 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp Fri Jun 15 13:16:43 2012 +0200 @@ -1036,6 +1036,10 @@ __ push(rdi); __ push(rbx); +#ifdef GRAAL + __ push(rcx); + __ push(rsi); +#endif if (id == fast_new_instance_init_check_id) { // make sure the klass is initialized @@ -1074,6 +1078,10 @@ __ initialize_object(obj, klass, obj_size, 0, t1, t2); __ verify_oop(obj); +#ifdef GRAAL + __ pop(rsi); + __ pop(rcx); +#endif __ pop(rbx); __ pop(rdi); __ ret(0); @@ -1087,11 +1095,19 @@ __ initialize_object(obj, klass, obj_size, 0, t1, t2); __ verify_oop(obj); +#ifdef GRAAL + __ pop(rsi); + __ pop(rcx); +#endif __ pop(rbx); __ pop(rdi); __ ret(0); __ bind(slow_path); +#ifdef GRAAL + __ pop(rsi); + __ pop(rcx); +#endif __ pop(rbx); __ pop(rdi); }
--- a/src/share/vm/graal/graalCompilerToVM.cpp Fri Jun 15 12:05:13 2012 +0200 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Fri Jun 15 13:16:43 2012 +0200 @@ -816,10 +816,15 @@ set_int(env, config, "bciProfileWidth", BciProfileWidth); set_int(env, config, "typeProfileWidth", TypeProfileWidth); + // We use the fast path stub so that we get TLAB refills whenever possible instead of + // unconditionally allocating directly from the heap (which the slow path does). + // The stub must also do initialization when the compiled check fails. + Runtime1::StubID newInstanceStub = Runtime1::fast_new_instance_init_check_id; + set_long(env, config, "debugStub", VmIds::addStub((address)warning)); set_long(env, config, "instanceofStub", VmIds::addStub(Runtime1::entry_for(Runtime1::slow_subtype_check_id))); set_long(env, config, "verifyPointerStub", VmIds::addStub(Runtime1::entry_for(Runtime1::graal_verify_pointer_id))); - set_long(env, config, "newInstanceStub", VmIds::addStub(Runtime1::entry_for(Runtime1::new_instance_id))); + set_long(env, config, "newInstanceStub", VmIds::addStub(Runtime1::entry_for(newInstanceStub))); set_long(env, config, "newTypeArrayStub", VmIds::addStub(Runtime1::entry_for(Runtime1::new_type_array_id))); set_long(env, config, "newObjectArrayStub", VmIds::addStub(Runtime1::entry_for(Runtime1::new_object_array_id))); set_long(env, config, "newMultiArrayStub", VmIds::addStub(Runtime1::entry_for(Runtime1::new_multi_array_id)));