Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- perf_ev_read_values(perf_ctr[0]);
- for (i = 0; i < 1000; ++i) {
- int j;
- uint64_t pattern = (random() << 32) | random();
- for (j = 0; j < sizeof(random_data) / sizeof(*random_data); ++j)
- random_data[j] += pattern;
- }
- perf_ev_read_values(perf_ctr[1]);
- perf_ev_dump(perf_ctr[1], perf_ctr[0]);
- $ ./bts
- Counter 0 (PERF_COUNT_HW_CPU_CYCLES) = 3346189600 with scale factor 0.750343
- Counter 1 (PERF_COUNT_HW_CACHE_REFERENCES) = 78374001 with scale factor 0.666576
- Counter 2 (PERF_COUNT_HW_CACHE_MISSES) = 23865535 with scale factor 0.749301
- Counter 3 (PERF_COUNT_HW_CACHE_L1D:WRITE:MISS) = 131175956 with scale factor 0.749562
- Counter 4 (PERF_COUNT_HW_CACHE_L1D:READ:MISS) = 133660840 with scale factor 0.749873
- Counter 5 (PERF_COUNT_HW_CACHE_L1D:WRITE:ACCESS) = 639065235 with scale factor 0.750234
- Counter 6 (PERF_COUNT_HW_CACHE_L1D:READ:ACCESS) = 240331315 with scale factor 0.750373
- Counter 7 (PERF_COUNT_HW_CACHE_L1I:READ:MISS) = 1233104 with scale factor 0.750501
- Counter 8 (PERF_COUNT_HW_BUS_CYCLES) = 78916929 with scale factor 0.750348
- Counter 9 (PERF_COUNT_HW_BRANCH_MISSES) = 23503 with scale factor 0.666875
- Counter 10 (PERF_COUNT_HW_BRANCH_INSTRUCTIONS) = 1060756421 with scale factor 0.666009
- Counter 11 (PERF_COUNT_HW_INSTRUCTIONS) = 4268286707 with scale factor 0.749214
Add Comment
Please, Sign In to add comment