Mercurial > hg > truffle
comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 4656:c1160de36474
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 20 Feb 2012 18:01:22 +0100 |
parents | 723df37192d6 |
children | 957c266d8bc5 |
comparison
equal
deleted
inserted
replaced
4655:0c392b1bd7cc | 4656:c1160de36474 |
---|---|
1124 // See below for example code. | 1124 // See below for example code. |
1125 void InterpreterMacroAssembler::record_klass_in_profile_helper( | 1125 void InterpreterMacroAssembler::record_klass_in_profile_helper( |
1126 Register receiver, Register mdp, | 1126 Register receiver, Register mdp, |
1127 Register reg2, int start_row, | 1127 Register reg2, int start_row, |
1128 Label& done, bool is_virtual_call) { | 1128 Label& done, bool is_virtual_call) { |
1129 #ifdef GRAAL | |
1129 // change for GRAAL (use counter to indicate polymorphic case instead of failed typechecks) | 1130 // change for GRAAL (use counter to indicate polymorphic case instead of failed typechecks) |
1130 bool use_counter_for_polymorphic_case = is_virtual_call || UseGraal; | 1131 bool use_counter_for_polymorphic_case = true; |
1132 #else | |
1133 bool use_counter_for_polymorphic_case = is_virtual_call; | |
1134 #endif | |
1131 | 1135 |
1132 if (TypeProfileWidth == 0) { | 1136 if (TypeProfileWidth == 0) { |
1133 if (use_counter_for_polymorphic_case) { | 1137 if (use_counter_for_polymorphic_case) { |
1134 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); | 1138 increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); |
1135 } | 1139 } |
1298 } | 1302 } |
1299 } | 1303 } |
1300 | 1304 |
1301 | 1305 |
1302 void InterpreterMacroAssembler::profile_typecheck_failed(Register mdp) { | 1306 void InterpreterMacroAssembler::profile_typecheck_failed(Register mdp) { |
1303 // changed for GRAAL (use counter to indicate polymorphism instead of failed typechecks) | 1307 // changed for GRAAL (use counter to indicate polymorphism instead of failed typechecks) |
1304 if (ProfileInterpreter && TypeProfileCasts && !UseGraal) { | 1308 #ifndef GRAAL |
1309 if (ProfileInterpreter && TypeProfileCasts) { | |
1305 Label profile_continue; | 1310 Label profile_continue; |
1306 | 1311 |
1307 // If no method data exists, go to profile_continue. | 1312 // If no method data exists, go to profile_continue. |
1308 test_method_data_pointer(mdp, profile_continue); | 1313 test_method_data_pointer(mdp, profile_continue); |
1309 | 1314 |
1314 // *Decrement* the counter. We expect to see zero or small negatives. | 1319 // *Decrement* the counter. We expect to see zero or small negatives. |
1315 increment_mdp_data_at(mdp, count_offset, true); | 1320 increment_mdp_data_at(mdp, count_offset, true); |
1316 | 1321 |
1317 bind (profile_continue); | 1322 bind (profile_continue); |
1318 } | 1323 } |
1324 #endif | |
1319 } | 1325 } |
1320 | 1326 |
1321 | 1327 |
1322 void InterpreterMacroAssembler::profile_typecheck(Register mdp, Register klass, Register reg2) { | 1328 void InterpreterMacroAssembler::profile_typecheck(Register mdp, Register klass, Register reg2) { |
1323 if (ProfileInterpreter) { | 1329 if (ProfileInterpreter) { |