#ifdef STATISTICS /* * $Id: Update_Prediction_Table_statistics_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $ * * [ Description ] * */ #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h" namespace morpheo { namespace behavioural { namespace core { namespace multi_front_end { namespace front_end { namespace prediction_unit { namespace update_prediction_table { #undef FUNCTION #define FUNCTION "Update_Prediction_Table::statistics_allocation" void Update_Prediction_Table::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics) { log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin"); _stat = new Stat (static_cast(_name), "Update_Prediction_Table", param_statistics); // _stat_nb_branch_hit = new counter_t * [_param->_nb_context]; // _stat_nb_branch_miss = new counter_t * [_param->_nb_context]; // _stat_nb_branch_unused = new counter_t * [_param->_nb_context]; // _stat_queue_nb_cycle_empty = new counter_t * [_param->_nb_context]; // _stat_queue_nb_cycle_full = new counter_t * [_param->_nb_context]; // _stat_queue_nb_elt = new counter_t * [_param->_nb_context]; // for (uint32_t i=0; i<_param->_nb_context; ++i) // { // _stat_nb_branch_hit [i] = _stat->create_counter("nb_branch_hit_" +toString(i),"",toString(_("Branch hit speculation (context %d)"),i)); // _stat_nb_branch_miss [i] = _stat->create_counter("nb_branch_miss_" +toString(i),"",toString(_("Branch miss speculation (context %d)"),i)); // _stat_nb_branch_unused [i] = _stat->create_counter("nb_branch_unused_" +toString(i),"",toString(_("Branch unused, because an previous branch have miss speculation (context %d)"),i)); // _stat_queue_nb_cycle_empty [i] = _stat->create_counter("queue_nb_cycle_empty_"+toString(i),"",toString(_("Cycle number where the Update Prediction Table is empty (context %d)"),i)); // _stat_queue_nb_cycle_full [i] = _stat->create_counter("queue_nb_cycle_full_" +toString(i),"",toString(_("Cycle number where the Update Prediction Table is full (%d elements) (context %d)"),_param->_size_queue[i],i)); // _stat_queue_nb_elt [i] = _stat->create_counter("queue_nb_elt_" +toString(i),"",toString(_("Average branchement by cycle in Update Prediction Table (context %d)"),i)); // } log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); }; }; // end namespace update_prediction_table }; // end namespace prediction_unit }; // end namespace front_end }; // end namespace multi_front_end }; // end namespace core }; // end namespace behavioural }; // end namespace morpheo #endif