Skip to content

Commit

Permalink
Count spesh_produced even without spesh_limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Feb 18, 2017
1 parent f319a36 commit 56644d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/spesh/candidate.c
Expand Up @@ -38,9 +38,12 @@ MVMSpeshCandidate * MVM_spesh_candidate_setup(MVMThreadContext *tc,
MVMSpeshGraph *sg;

/* If we've reached our specialization limit, don't continue. */
if (tc->instance->spesh_limit)
if (tc->instance->spesh_limit) {
if (++tc->instance->spesh_produced > tc->instance->spesh_limit)
return NULL;
} else {
++tc->instance->spesh_produced;
}

/* If we're profiling, log we're starting spesh work. Also track entry
* to spesh when GC debugging. */
Expand Down

0 comments on commit 56644d6

Please sign in to comment.