Coverage Report

Created: 2018-06-21 18:56

/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
306k
MVMuint32 MVM_spesh_threshold(MVMThreadContext *tc, MVMStaticFrame *sf) {
6
306k
    MVMuint32 bs = sf->body.bytecode_size;
7
306k
    if (tc->instance->spesh_nodelay)
8
0
        return 1;
9
306k
    if (bs <= 256)
10
139k
        return 100;
11
166k
    else if (bs <= 512)
12
37.5k
        return 150;
13
129k
    else if (bs <= 2048)
14
94.2k
        return 200;
15
34.8k
    else if (bs <= 8192)
16
33.1k
        return 250;
17
34.8k
    else
18
1.71k
        return 300;
19
306k
}