Permalink
Browse files

Added 3C misses

  • Loading branch information...
gsiddardha authored and pksunkara committed Aug 22, 2011
1 parent fa15031 commit d1edc3b0f2cfcaef298cdd4469af556980c54af2
Showing with 17 additions and 1 deletion.
  1. +1 −0 Access.cpp
  2. +12 −0 Cache.cpp
  3. +4 −1 Cache.h
View
@@ -17,6 +17,7 @@ void Access::print(void) {
cout << "\t\tAccesses:" << this->accesses << endl;
cout << "\t\tHits: " << this->cache->get_hits() << endl;
cout << "\t\tMisses: " << this->cache->get_misses() << endl;
+ cout << "\t\tCold Misses: " << this->cache->get_cold_misses() << endl;
cout << endl << endl;
}
View
@@ -53,6 +53,18 @@ int Cache::get_misses(void) {
return this->misses[0];
}
+int Cache::get_cold_misses(void) {
+ return this->misses[1];
+}
+
+int Cache::get_capacity_misses(void) {
+ return this->misses[2];
+}
+
+int Cache::get_conflict_misses(void) {
+ return this->misses[3];
+}
+
int Cache::get_cached(int address) {
int set_num = this->set_mul & address;
int tag_num = this->tag_mul & address;
View
@@ -27,8 +27,11 @@ class Cache {
int get_hits(void);
int get_misses(void);
- int get_cached(int address);
+ int get_cold_misses(void);
+ int get_capacity_misses(void);
+ int get_conflict_misses(void);
+ int get_cached(int address);
void restart(void);
void insert_block(int address, Block* new_block);

0 comments on commit d1edc3b

Please sign in to comment.