Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Jorim committed Jul 21, 2022
1 parent 6108117 commit 7a59e17
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions prime-probe-test2.c
Original file line number Diff line number Diff line change
@@ -185,12 +185,9 @@ int main() {
flush(&prime_data[i * CACHE_LINE_SIZE]);
}

uint8_t is_target = 0;
for (int i=0; i<4; i++) {
if (cached_timings[i] < threshold) {
is_target = 1;
printf("cache set %d is target: %d\n", j, is_target);
printf("values: %lu %lu %lu %lu\n", cached_timings[0], cached_timings[1], cached_timings[2], cached_timings[3]);
possible_cache_sets[j] = 0;
break;
}
}
@@ -199,4 +196,10 @@ int main() {
pthread_join(thread, NULL);
}
}
// print possibe cache sets
for (int i=0; i<128; i++) {
if (possible_cache_sets[i]) {
printf("%d\n", i);
}
}
}

0 comments on commit 7a59e17

Please sign in to comment.