comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 1791:3a294e483abc

6919069: client compiler needs to capture more profile information for tiered work Summary: Added profiling of instanceof and aastore. Reviewed-by: kvn, jrose, never
author iveresov
date Mon, 13 Sep 2010 12:10:49 -0700
parents d5d065957597
children f02a8bbe6ed4
comparison
equal deleted inserted replaced
1790:7f9553bedfd5 1791:3a294e483abc
965 length = append(new ArrayLength(array, lock_stack())); 965 length = append(new ArrayLength(array, lock_stack()));
966 } 966 }
967 StoreIndexed* result = new StoreIndexed(array, index, length, type, value, lock_stack()); 967 StoreIndexed* result = new StoreIndexed(array, index, length, type, value, lock_stack());
968 append(result); 968 append(result);
969 _memory->store_value(value); 969 _memory->store_value(value);
970
971 if (type == T_OBJECT && is_profiling()) {
972 // Note that we'd collect profile data in this method if we wanted it.
973 compilation()->set_would_profile(true);
974
975 if (profile_checkcasts()) {
976 result->set_profiled_method(method());
977 result->set_profiled_bci(bci());
978 result->set_should_profile(true);
979 }
980 }
970 } 981 }
971 982
972 983
973 void GraphBuilder::stack_op(Bytecodes::Code code) { 984 void GraphBuilder::stack_op(Bytecodes::Code code) {
974 switch (code) { 985 switch (code) {
1850 ciKlass* klass = stream()->get_klass(will_link); 1861 ciKlass* klass = stream()->get_klass(will_link);
1851 ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL; 1862 ValueStack* state_before = !klass->is_loaded() || PatchALot ? state()->copy() : NULL;
1852 InstanceOf* i = new InstanceOf(klass, apop(), state_before); 1863 InstanceOf* i = new InstanceOf(klass, apop(), state_before);
1853 ipush(append_split(i)); 1864 ipush(append_split(i));
1854 i->set_direct_compare(direct_compare(klass)); 1865 i->set_direct_compare(direct_compare(klass));
1866
1867 if (is_profiling()) {
1868 // Note that we'd collect profile data in this method if we wanted it.
1869 compilation()->set_would_profile(true);
1870
1871 if (profile_checkcasts()) {
1872 i->set_profiled_method(method());
1873 i->set_profiled_bci(bci());
1874 i->set_should_profile(true);
1875 }
1876 }
1855 } 1877 }
1856 1878
1857 1879
1858 void GraphBuilder::monitorenter(Value x, int bci) { 1880 void GraphBuilder::monitorenter(Value x, int bci) {
1859 // save state before locking in case of deoptimization after a NullPointerException 1881 // save state before locking in case of deoptimization after a NullPointerException