Mon, 19 Sep 2011 15:21:03 -0700
7091764: Tiered: enable aastore profiling
Summary: Turn on aastore profiling
Reviewed-by: jrose, twisti
1.1 --- a/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Fri Sep 16 21:35:06 2011 -0700 1.2 +++ b/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Mon Sep 19 15:21:03 2011 -0700 1.3 @@ -328,7 +328,8 @@ 1.4 bool use_length = x->length() != NULL; 1.5 bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; 1.6 bool needs_store_check = obj_store && (x->value()->as_Constant() == NULL || 1.7 - !get_jobject_constant(x->value())->is_null_object()); 1.8 + !get_jobject_constant(x->value())->is_null_object() || 1.9 + x->should_profile()); 1.10 1.11 LIRItem array(x->array(), this); 1.12 LIRItem index(x->index(), this); 1.13 @@ -382,7 +383,7 @@ 1.14 LIR_Opr tmp3 = FrameMap::G5_opr; 1.15 1.16 CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info); 1.17 - __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info); 1.18 + __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info, x->profiled_method(), x->profiled_bci()); 1.19 } 1.20 1.21 if (obj_store) {
2.1 --- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Fri Sep 16 21:35:06 2011 -0700 2.2 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Mon Sep 19 15:21:03 2011 -0700 2.3 @@ -267,7 +267,8 @@ 2.4 bool use_length = x->length() != NULL; 2.5 bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; 2.6 bool needs_store_check = obj_store && (x->value()->as_Constant() == NULL || 2.7 - !get_jobject_constant(x->value())->is_null_object()); 2.8 + !get_jobject_constant(x->value())->is_null_object() || 2.9 + x->should_profile()); 2.10 2.11 LIRItem array(x->array(), this); 2.12 LIRItem index(x->index(), this); 2.13 @@ -321,7 +322,7 @@ 2.14 LIR_Opr tmp3 = new_register(objectType); 2.15 2.16 CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info); 2.17 - __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info); 2.18 + __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info, x->profiled_method(), x->profiled_bci()); 2.19 } 2.20 2.21 if (obj_store) {
3.1 --- a/src/share/vm/c1/c1_LIR.cpp Fri Sep 16 21:35:06 2011 -0700 3.2 +++ b/src/share/vm/c1/c1_LIR.cpp Mon Sep 19 15:21:03 2011 -0700 3.3 @@ -1394,8 +1394,15 @@ 3.4 } 3.5 3.6 3.7 -void LIR_List::store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception) { 3.8 - append(new LIR_OpTypeCheck(lir_store_check, object, array, tmp1, tmp2, tmp3, info_for_exception)); 3.9 +void LIR_List::store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, 3.10 + CodeEmitInfo* info_for_exception, ciMethod* profiled_method, int profiled_bci) { 3.11 + LIR_OpTypeCheck* c = new LIR_OpTypeCheck(lir_store_check, object, array, tmp1, tmp2, tmp3, info_for_exception); 3.12 + if (profiled_method != NULL) { 3.13 + c->set_profiled_method(profiled_method); 3.14 + c->set_profiled_bci(profiled_bci); 3.15 + c->set_should_profile(true); 3.16 + } 3.17 + append(c); 3.18 } 3.19 3.20
4.1 --- a/src/share/vm/c1/c1_LIR.hpp Fri Sep 16 21:35:06 2011 -0700 4.2 +++ b/src/share/vm/c1/c1_LIR.hpp Mon Sep 19 15:21:03 2011 -0700 4.3 @@ -2100,7 +2100,7 @@ 4.4 void fpop_raw() { append(new LIR_Op0(lir_fpop_raw)); } 4.5 4.6 void instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch, ciMethod* profiled_method, int profiled_bci); 4.7 - void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception); 4.8 + void store_check(LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception, ciMethod* profiled_method, int profiled_bci); 4.9 4.10 void checkcast (LIR_Opr result, LIR_Opr object, ciKlass* klass, 4.11 LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check,