Browse Source

Actually use hits, misses and evictions in printSummary

masstesting
Adam Goldsmith 6 years ago
parent
commit
29e74799e3
  1. 4
      csim.c

4
csim.c

@ -53,7 +53,7 @@ uint8_t VERBOSE = 0; /**< If nonzero, mprintf will not print. Set in main() if - @@ -53,7 +53,7 @@ uint8_t VERBOSE = 0; /**< If nonzero, mprintf will not print. Set in main() if -
int main(int argc, char* argv[])
{
int hits, misses, evictions;
int hits = 0, misses = 0, evictions = 0;
char buffer[20];
int set_index_bits = 0, block_bits = 0; // Not-useful input variables.
long set_indices = 0, num_lines = 0, block_size = 0; //Useful variables
@ -120,7 +120,7 @@ int main(int argc, char* argv[]) @@ -120,7 +120,7 @@ int main(int argc, char* argv[])
printf("%c %ld\n", op, address);
}
printSummary(0, 0, 0);
printSummary(hits, misses, evictions);
fclose(f);
free_cache(cache, set_index_bits);