Coverage Report

Created: 2018-06-21 18:56

/home/travis/build/MoarVM/MoarVM/src/gc/orchestrate.h
Line
Count
Source (jump to first uncovered line)
1
void MVM_gc_enter_from_allocator(MVMThreadContext *tc);
2
void MVM_gc_enter_from_interrupt(MVMThreadContext *tc);
3
MVM_PUBLIC void MVM_gc_mark_thread_blocked(MVMThreadContext *tc);
4
MVM_PUBLIC void MVM_gc_mark_thread_unblocked(MVMThreadContext *tc);
5
MVM_PUBLIC MVMint32 MVM_gc_is_thread_blocked(MVMThreadContext *tc);
6
void MVM_gc_global_destruction(MVMThreadContext *tc);
7
8
struct MVMWorkThread {
9
    MVMThreadContext *tc;
10
    void             *limit;
11
};
12
13
typedef enum {
14
    MVM_GC_DEBUG_ORCHESTRATE = 1,
15
    MVM_GC_DEBUG_COLLECT = 2,
16
/*    MVM_GC_DEBUG_ = 4,
17
    MVM_GC_DEBUG_ = 8,
18
    MVM_GC_DEBUG_ = 16,
19
    MVM_GC_DEBUG_ = 32,
20
    MVM_GC_DEBUG_ = 64,
21
    MVM_GC_DEBUG_ = 128,
22
    MVM_GC_DEBUG_ = 256,
23
    MVM_GC_DEBUG_ = 512,
24
    MVM_GC_DEBUG_ = 1024,
25
    MVM_GC_DEBUG_ = 2048,
26
    MVM_GC_DEBUG_ = 4096,
27
    MVM_GC_DEBUG_ = 8192,
28
    MVM_GC_DEBUG_ = 16384,
29
    MVM_GC_DEBUG_ = 32768,
30
    MVM_GC_DEBUG_ = 65536,
31
    MVM_GC_DEBUG_ = 131072,
32
    MVM_GC_DEBUG_ = 262144,
33
    MVM_GC_DEBUG_ = 524288,
34
    MVM_GC_DEBUG_ = 1048576,
35
    MVM_GC_DEBUG_ = 2097152,
36
    MVM_GC_DEBUG_ = 4194304,
37
    MVM_GC_DEBUG_ = 8388608,
38
    MVM_GC_DEBUG_ = 16777216,
39
    MVM_GC_DEBUG_ = 33554432,
40
    MVM_GC_DEBUG_ = 67108864,
41
    MVM_GC_DEBUG_ = 134217728*/
42
} MVMGCDebugLogFlags;
43
44
/* OR together the flags you want to require, or redefine
45
 * MVM_GC_DEBUG_ENABLED(flags) if you want something more
46
 * complicated. */
47
#define MVM_GC_DEBUG_LOG_FLAGS \
48
36.6M
    0
49
50
#define MVM_GC_DEBUG_ENABLED(flags) \
51
36.6M
    ((MVM_GC_DEBUG_LOG_FLAGS) & (flags))
52
53
#ifdef _MSC_VER
54
# define GCDEBUG_LOG(tc, flags, msg, ...) \
55
    if (MVM_GC_DEBUG_ENABLED(flags)) \
56
        printf((msg), (tc)->thread_id, \
57
            MVM_load(&(tc)->instance->gc_seq_number), __VA_ARGS__)
58
#else
59
# define GCDEBUG_LOG(tc, flags, msg, ...) \
60
27.1M
    if (MVM_GC_DEBUG_ENABLED(flags)) \
61
0
        printf((msg), (tc)->thread_id, \
62
0
            (int)MVM_load(&(tc)->instance->gc_seq_number) , ##__VA_ARGS__)
63
#endif