void Print_Cache_Statistics_for_one_cache(CDS *cds) { fprintf(stdout, "%s: %d entries of lines of %d bytes; %s, %s, %s\n", cds->name, cds->number_of_cache_entries, cds->cache_line_size, print_sets_and_ways(cds), cds->write_back ? "write-back" : "write-thru", CRP_name(cds)); fprintf(stdout, " %d addresses (%d %s, %d %s, %d %s)\n", cds->number_of_memory_reference, cds->number_of_type[MAT_FETCH], memory_reference_type_name(MAT_FETCH), cds->number_of_type[MAT_LOAD], memory_reference_type_name(MAT_LOAD), cds->number_of_type[MAT_STORE], memory_reference_type_name(MAT_STORE)); fprintf(stdout, " %d hits (%d%%), %d misses, %d memory reads, %d memory writes\n", cds->number_cache_hits, percent(cds->number_cache_hits, cds->number_total_cache_access), cds->number_cache_misses, cds->number_memory_reads, cds->number_memory_writes); if (cds->write_back) fprintf(stdout, " %d dirty cache lines remain\n", number_dirty_lines(cds)); /* victim represents the # of victim cache entries. if you have a victim cache, this will be true. If not, victim = 0 and you do not have a victim cache. Thus, do not print out victim cache data */ if (cds->victim) fprintf(stdout, " %d victim cache hits\n", cds->number_victim_hits); fprintf(stdout, "\n"); }
void Print_Cache_Statistics_for_one_cds(CDS *cds) { fprintf(stdout, " %d addresses (%d %s, %d %s, %d %s)\n", cds->number_of_memory_reference, cds->number_of_type[MAT_FETCH], memory_reference_type_name(MAT_FETCH), cds->number_of_type[MAT_LOAD], memory_reference_type_name(MAT_LOAD), cds->number_of_type[MAT_STORE], memory_reference_type_name(MAT_STORE)); Print_Cache_Statistics_for_one_cache(cds->c); fprintf(stdout, "\n"); }
void Print_Cache_Statistics_for_one_cds(CDS *cds) { fprintf(stdout, " %d addresses (%d %s, %d %s, %d %s)\n", cds->number_of_memory_reference, cds->number_of_type[MAT_FETCH], memory_reference_type_name(MAT_FETCH), cds->number_of_type[MAT_LOAD], memory_reference_type_name(MAT_LOAD), cds->number_of_type[MAT_STORE], memory_reference_type_name(MAT_STORE)); if(cds->c->num_vic_lines > 0){ Print_Cache_Statistics_for_one_with_victim(cds->c); Print_Cache_Statistics_for_one_victim(cds->v); } else{ Print_Cache_Statistics_for_one_cache(cds->c); } fprintf(stdout, "\n"); }
void Print_Cache_Statistics_for_one_cache(CDS *cds) { fprintf(stdout, "%s: %d entries of lines of %d bytes; %s, %s, %s\n", cds->name, cds->number_of_cache_entries, cds->cache_line_size, print_sets_and_ways(cds), cds->write_back ? "write-back" : "write-thru", CRP_name(cds)); fprintf(stdout, " %d addresses (%d %s, %d %s, %d %s)\n", cds->number_of_memory_reference, cds->number_of_type[MAT_FETCH], memory_reference_type_name(MAT_FETCH), cds->number_of_type[MAT_LOAD], memory_reference_type_name(MAT_LOAD), cds->number_of_type[MAT_STORE], memory_reference_type_name(MAT_STORE)); fprintf(stdout, " %d hits, %d misses, %d memory reads, %d memory writes\n", cds->number_cache_hits, cds->number_cache_misses, cds->number_memory_reads, cds->number_memory_writes); fprintf(stdout, "\n"); }