@@ -405,10 +405,6 @@ void InterpreterMacroAssembler::gen_subtype_check( Register Rsup_klass, Register
405405
406406 // Do the check.
407407 check_klass_subtype (Rsub_klass, Rsup_klass, T1, ok_is_subtype); // blows T1
408-
409- // Profile the failure of the check.
410- profile_typecheck_failed (T4); // blows T4
411-
412408}
413409
414410
@@ -1252,7 +1248,7 @@ void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
12521248 }
12531249
12541250 // Record the receiver type.
1255- record_klass_in_profile (receiver, mdp, reg2, true );
1251+ record_klass_in_profile (receiver, mdp, reg2);
12561252 bind (skip_receiver_profile);
12571253
12581254 // The method data pointer needs to be updated to reflect the new target.
@@ -1277,36 +1273,18 @@ void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
12771273void InterpreterMacroAssembler::record_klass_in_profile_helper (
12781274 Register receiver, Register mdp,
12791275 Register reg2, int start_row,
1280- Label& done, bool is_virtual_call ) {
1276+ Label& done) {
12811277 if (TypeProfileWidth == 0 ) {
1282- if (is_virtual_call) {
1283- increment_mdp_data_at (mdp, in_bytes (CounterData::count_offset ()));
1284- }
1285- #if INCLUDE_JVMCI
1286- else if (EnableJVMCI) {
1287- increment_mdp_data_at (mdp, in_bytes (ReceiverTypeData::nonprofiled_receiver_count_offset ()));
1288- }
1289- #endif // INCLUDE_JVMCI
1278+ increment_mdp_data_at (mdp, in_bytes (CounterData::count_offset ()));
12901279 } else {
1291- int non_profiled_offset = -1 ;
1292- if (is_virtual_call) {
1293- non_profiled_offset = in_bytes (CounterData::count_offset ());
1294- }
1295- #if INCLUDE_JVMCI
1296- else if (EnableJVMCI) {
1297- non_profiled_offset = in_bytes (ReceiverTypeData::nonprofiled_receiver_count_offset ());
1298- }
1299- #endif // INCLUDE_JVMCI
1300-
13011280 record_item_in_profile_helper (receiver, mdp, reg2, 0 , done, TypeProfileWidth,
1302- &VirtualCallData::receiver_offset, &VirtualCallData::receiver_count_offset, non_profiled_offset );
1281+ &VirtualCallData::receiver_offset, &VirtualCallData::receiver_count_offset);
13031282 }
13041283}
13051284
13061285void InterpreterMacroAssembler::record_item_in_profile_helper (Register item, Register mdp,
13071286 Register reg2, int start_row, Label& done, int total_rows,
1308- OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn,
1309- int non_profiled_offset) {
1287+ OffsetFunction item_offset_fn, OffsetFunction item_count_offset_fn) {
13101288 int last_row = total_rows - 1 ;
13111289 assert (start_row <= last_row, " must be work left to do" );
13121290 // Test this row for both the item and for null.
@@ -1337,24 +1315,20 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(Register item, Reg
13371315 // Failed the equality check on item[n]... Test for null.
13381316 if (start_row == last_row) {
13391317 // The only thing left to do is handle the null case.
1340- if (non_profiled_offset >= 0 ) {
1341- beqz (reg2, found_null);
1342- // Item did not match any saved item and there is no empty row for it.
1343- // Increment total counter to indicate polymorphic case.
1344- increment_mdp_data_at (mdp, non_profiled_offset);
1345- b (done);
1346- bind (found_null);
1347- } else {
1348- bnez (reg2, done);
1349- }
1318+ beqz (reg2, found_null);
1319+ // Item did not match any saved item and there is no empty row for it.
1320+ // Increment total counter to indicate polymorphic case.
1321+ increment_mdp_data_at (mdp, in_bytes (CounterData::count_offset ()));
1322+ b (done);
1323+ bind (found_null);
13501324 break ;
13511325 }
13521326 // Since null is rare, make it be the branch-taken case.
13531327 beqz (reg2, found_null);
13541328
13551329 // Put all the "Case 3" tests here.
13561330 record_item_in_profile_helper (item, mdp, reg2, start_row + 1 , done, total_rows,
1357- item_offset_fn, item_count_offset_fn, non_profiled_offset );
1331+ item_offset_fn, item_count_offset_fn);
13581332
13591333 // Found a null. Keep searching for a matching item,
13601334 // but remember that this is an empty (unused) slot.
@@ -1401,12 +1375,11 @@ void InterpreterMacroAssembler::record_item_in_profile_helper(Register item, Reg
14011375// done:
14021376
14031377void InterpreterMacroAssembler::record_klass_in_profile (Register receiver,
1404- Register mdp, Register reg2,
1405- bool is_virtual_call) {
1378+ Register mdp, Register reg2) {
14061379 assert (ProfileInterpreter, " must be profiling" );
14071380 Label done;
14081381
1409- record_klass_in_profile_helper (receiver, mdp, reg2, 0 , done, is_virtual_call );
1382+ record_klass_in_profile_helper (receiver, mdp, reg2, 0 , done);
14101383
14111384 bind (done);
14121385}
@@ -1469,26 +1442,6 @@ void InterpreterMacroAssembler::profile_null_seen(Register mdp) {
14691442 }
14701443}
14711444
1472-
1473- void InterpreterMacroAssembler::profile_typecheck_failed (Register mdp) {
1474- if (ProfileInterpreter && TypeProfileCasts) {
1475- Label profile_continue;
1476-
1477- // If no method data exists, go to profile_continue.
1478- test_method_data_pointer (mdp, profile_continue);
1479-
1480- int count_offset = in_bytes (CounterData::count_offset ());
1481- // Back up the address, since we have already bumped the mdp.
1482- count_offset -= in_bytes (VirtualCallData::virtual_call_data_size ());
1483-
1484- // *Decrement* the counter. We expect to see zero or small negatives.
1485- increment_mdp_data_at (mdp, count_offset, true );
1486-
1487- bind (profile_continue);
1488- }
1489- }
1490-
1491-
14921445void InterpreterMacroAssembler::profile_typecheck (Register mdp, Register klass, Register reg2) {
14931446 if (ProfileInterpreter) {
14941447 Label profile_continue;
@@ -1502,7 +1455,7 @@ void InterpreterMacroAssembler::profile_typecheck(Register mdp, Register klass,
15021455 mdp_delta = in_bytes (VirtualCallData::virtual_call_data_size ());
15031456
15041457 // Record the object type.
1505- record_klass_in_profile (klass, mdp, reg2, false );
1458+ record_klass_in_profile (klass, mdp, reg2);
15061459 }
15071460 update_mdp_by_constant (mdp, mdp_delta);
15081461
0 commit comments