| 1 |
global x0, x1, x2, x3, x4 |
| 2 |
probe begin { |
| 3 |
printf("BEGIN\n") |
| 4 |
} |
| 5 |
|
| 6 |
probe perf.type(0).config(9).sample(10000000) { // hw |
| 7 |
x0++ |
| 8 |
} |
| 9 |
|
| 10 |
probe perf.type(1).config(0).hz(100) { // sw |
| 11 |
x1++ |
| 12 |
} |
| 13 |
|
| 14 |
probe perf.type(2).config(100).hz(1) { // tracepoint |
| 15 |
x2++ |
| 16 |
} |
| 17 |
|
| 18 |
probe perf.type(3).config(0).hz(1) { // hw cache |
| 19 |
x3++ |
| 20 |
} |
| 21 |
|
| 22 |
probe perf.type(4).config(0).hz(1) { // raw |
| 23 |
x4++ |
| 24 |
} |
| 25 |
|
| 26 |
probe timer.s(5) { |
| 27 |
exit() |
| 28 |
} |
| 29 |
|
| 30 |
probe end { |
| 31 |
if (x0 + x1 + x2 + x3 + x4 >= 200) |
| 32 |
printf("END PASS\n") |
| 33 |
else |
| 34 |
printf("END FAIL\n") |
| 35 |
} |