Randomize penalties for aborts and add blacklisting.

This commit is contained in:
Mike Pall
2010-02-23 18:27:39 +01:00
parent d5c8fe4b90
commit 8ae2f9feaa
6 changed files with 50 additions and 23 deletions

View File

@@ -419,9 +419,9 @@ static int innerloopleft(jit_State *J, const BCIns *pc)
{
ptrdiff_t i;
for (i = 0; i < PENALTY_SLOTS; i++)
if (J->penalty[i].pc == pc) {
if (mref(J->penalty[i].pc, const BCIns) == pc) {
if (J->penalty[i].reason == LJ_TRERR_LLEAVE &&
J->penalty[i].val >= 2*HOTCOUNT_MIN_PENALTY)
J->penalty[i].val >= 2*PENALTY_MIN)
return 1;
break;
}
@@ -2149,7 +2149,7 @@ void lj_record_ins(jit_State *J)
case BC_ILOOP:
case BC_IFUNCF:
case BC_IFUNCV:
lj_trace_err(J, LJ_TRERR_LBLACKL);
lj_trace_err(J, LJ_TRERR_BLACKL);
break;
case BC_JMP: