Coverage Report

Created: 2017-04-15 07:07

/home/travis/build/MoarVM/MoarVM/src/spesh/threshold.c
Line
Count
Source (jump to first uncovered line)
1
#include "moar.h"
2
3
/* Choose the threshold for a given static frame before we start applying
4
 * specialization to it. */
5
102k
MVMuint32 MVM_spesh_threshold(MVMThreadContext *tc, MVMStaticFrame *sf) {
6
102k
    MVMuint32 bs = sf->body.bytecode_size;
7
102k
    if (tc->instance->spesh_nodelay)
8
0
        return 1;
9
102k
    if (bs <= 256)
10
57.3k
        return 150;
11
45.2k
    else if (bs <= 512)
12
14.2k
        return 200;
13
30.9k
    else if (bs <= 2048)
14
23.3k
        return 250;
15
30.9k
    else
16
7.60k
        return 300;
17
102k
}