Yuchen Wu | aae8801 | 2013-11-13 22:50:15 +0000 | [diff] [blame] | 1 | -: 0:Source:test.cpp |
2 | -: 0:Graph:test.gcno | ||||
3 | -: 0:Data:test.gcda | ||||
4 | -: 0:Runs:2 | ||||
5 | -: 0:Programs:1 | ||||
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 6 | -: 1:#include "test.h" |
7 | -: 2:#include <cstdlib> | ||||
8 | -: 3: | ||||
9 | -: 4:bool on = false; | ||||
10 | -: 5:int len = 42; | ||||
11 | -: 6:double grid[10][10] = {0}; | ||||
12 | -: 7:const char * hello = "world"; | ||||
13 | -: 8:const char * world = "hello"; | ||||
14 | -: 9: | ||||
15 | 8589934592: 10:void A::B() {} | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 16 | 8589934592: 10-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 17 | -: 11: |
18 | #####: 12:void useless() {} | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 19 | $$$$$: 12-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 20 | -: 13: |
21 | -: 14:double more_useless() { | ||||
22 | #####: 15: return 0; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 23 | $$$$$: 15-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 24 | -: 16:} |
25 | -: 17: | ||||
26 | -: 18:int foo() { | ||||
27 | 2: 19: on = true; | ||||
28 | 2: 20: return 3; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 29 | 2: 20-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 30 | -: 21:} |
31 | -: 22: | ||||
32 | -: 23:int bar() { | ||||
33 | #####: 24: len--; | ||||
34 | #####: 25: return foo() + 45; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 35 | $$$$$: 25-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 36 | -: 26:} |
37 | -: 27: | ||||
38 | 8: 28:void assign(int ii, int jj) { | ||||
39 | 8: 29: grid[ii][jj] = (ii+1) * (jj+1); | ||||
40 | 8: 30:} | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 41 | 8: 30-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 42 | -: 31: |
43 | -: 32:void initialize_grid() { | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 44 | 6: 33: for (int ii = 0; ii < 2; ii++) |
45 | 2: 33-block 0 | ||||
46 | 6: 33-block 1 | ||||
47 | 4: 33-block 2 | ||||
48 | 12: 34: for (int jj = 0; jj < 2; jj++) | ||||
49 | 4: 34-block 0 | ||||
50 | 12: 34-block 1 | ||||
51 | 8: 34-block 2 | ||||
52 | 8: 35: assign(ii, jj); | ||||
53 | 8: 35-block 0 | ||||
54 | 4: 35-block 1 | ||||
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 55 | 2: 36:} |
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 56 | 2: 36-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 57 | -: 37: |
58 | -: 38:int main() { | ||||
59 | 2: 39: initialize_grid(); | ||||
Yuchen Wu | aae8801 | 2013-11-13 22:50:15 +0000 | [diff] [blame] | 60 | -: 40: |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 61 | 2: 41: int a = 2; |
62 | 2: 42: on = rand() % 2; | ||||
63 | 2: 43: if (on) { | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 64 | 2: 43-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 65 | 2: 44: foo(); |
66 | 2: 45: ++a; | ||||
67 | 2: 46: } else { | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 68 | 2: 46-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 69 | #####: 47: bar(); |
70 | #####: 48: a += rand(); | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 71 | $$$$$: 48-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 72 | -: 49: } |
73 | -: 50: | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 74 | 22: 51: for (int ii = 0; ii < 10; ++ii) { |
75 | 2: 51-block 0 | ||||
76 | 22: 51-block 1 | ||||
77 | 20: 51-block 2 | ||||
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 78 | 20: 52: switch (rand() % 5) { |
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 79 | 20: 52-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 80 | -: 53: case 0: |
81 | 4: 54: a += rand(); | ||||
82 | 4: 55: break; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 83 | 4: 55-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 84 | -: 56: case 1: |
85 | -: 57: case 2: | ||||
86 | 2: 58: a += rand() / rand(); | ||||
87 | 2: 59: break; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 88 | 2: 59-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 89 | -: 60: case 3: |
90 | 6: 61: a -= rand(); | ||||
91 | 6: 62: break; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 92 | 6: 62-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 93 | -: 63: default: |
94 | 8: 64: a = -1; | ||||
95 | 8: 65: } | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 96 | 8: 65-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 97 | 20: 66: } |
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 98 | 20: 66-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 99 | -: 67: |
100 | 2: 68: A thing; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 101 | 8589934594: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii) |
102 | 2: 69-block 0 | ||||
103 | 8589934594: 69-block 1 | ||||
104 | 8589934592: 69-block 2 | ||||
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 105 | 8589934592: 70: thing.B(); |
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 106 | 8589934592: 70-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 107 | -: 71: |
108 | 2: 72: return a + 8 + grid[2][3] + len; | ||||
Yuchen Wu | 8c6bb5f | 2013-12-10 01:02:07 +0000 | [diff] [blame] | 109 | 2: 72-block 0 |
Yuchen Wu | a3bed4b | 2013-12-07 01:28:11 +0000 | [diff] [blame] | 110 | -: 73: return more_useless(); |
111 | -: 74:} |