UINT64 dcache_hit_count; UINT64 dcache_miss_count_thread; UINT64 dcache_hit_count_thread; /* you must replace this function in your source code */ void print_stats() { std::ofstream out(KNOB_OUTPUT_FILE.Value().c_str()); /* Do not modify this function. This messages will be used for grading */ out << "Total instruction: " << retired_instruction << endl; out << "Total cycles: " << cycle_count << endl; float ipc = (cycle_count ? ((float)retired_instruction/(float)cycle_count): 0 ); out << "IPC: " << ipc << endl; out << "Total D-cache miss: " << dcache_miss_count << endl; out << "Total data hazard: " << data_hazard_count << endl; out << "Total BR_mispred: " << bp_miss << endl; out << "Total BR_corrpred: " << bp_corr_predict << endl; out << "Total control hazard : " << control_hazard_count << endl; out.close(); }