@@ -1356,11 +1356,6 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
13561356
13571357 __ testptr (obj, obj);
13581358 if (op->should_profile ()) {
1359- int profile_capture_ratio = ProfileCaptureRatio;
1360- int ratio_shift = exact_log2 (profile_capture_ratio);
1361- auto threshold = (UCONST64 (1 ) << 32 ) >> ratio_shift;
1362- assert (threshold > 0 , " must be" );
1363-
13641359 Label not_null;
13651360 Register mdo = klass_RInfo;
13661361 __ mov_metadata (mdo, md->constant_encoding ());
@@ -1372,33 +1367,9 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
13721367 __ jmp (*obj_is_null);
13731368 __ bind (not_null);
13741369
1375- ProfileStub *stub
1376- = profile_capture_ratio > 1 ? new ProfileStub () : nullptr ;
1377-
1378- auto lambda = [stub, md, mdo, data, k_RInfo, obj, Rtmp1, tmp_load_klass]
1379- (LIR_Assembler* ce, LIR_Op* base_op) {
1380- auto masm = [=]() { return ce->masm (); };
1381- if (stub != nullptr ) __ bind (*stub->entry ());
1382-
1383- Register recv = k_RInfo;
1384- __ load_klass (recv, obj, tmp_load_klass);
1385- ce->type_profile_helper (mdo, md, data, recv, Rtmp1);
1386-
1387- if (stub != nullptr ) __ jmp (*stub->continuation ());
1388- };
1389-
1390- if (stub != nullptr ) {
1391- __ cmpl (r_profile_rng, threshold);
1392- __ jcc (Assembler::below, *stub->entry ());
1393- __ bind (*stub->continuation ());
1394- __ step_random (r_profile_rng, rscratch1);
1395-
1396- stub->set_action (lambda, op);
1397- stub->set_name (" Typecheck stub" );
1398- append_code_stub (stub);
1399- } else {
1400- lambda (this , op);
1401- }
1370+ Register recv = k_RInfo;
1371+ __ load_klass (recv, obj, tmp_load_klass);
1372+ type_profile_helper (mdo, md, data, recv, Rtmp1);
14021373 } else {
14031374 __ jcc (Assembler::equal, *obj_is_null);
14041375 }
0 commit comments