[78] | 1 | #ifdef STATISTICS |
---|
| 2 | /* |
---|
| 3 | * $Id: Branch_Target_Buffer_statistics_allocation.cpp 128 2009-06-26 08:43:23Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace prediction_unit { |
---|
| 17 | namespace branch_target_buffer { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Branch_Target_Buffer::statistics_allocation" |
---|
| 22 | void Branch_Target_Buffer::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin"); |
---|
| 25 | |
---|
| 26 | _stat = new Stat (static_cast<std::string>(_name), |
---|
| 27 | "Branch_Target_Buffer", |
---|
| 28 | param_statistics); |
---|
| 29 | |
---|
| 30 | if (_param->_have_component_victim) |
---|
| 31 | { |
---|
| 32 | for (uint32_t i=0; i<_param->_nb_inst_predict; i++) |
---|
| 33 | _stat->add_stat(_component_sort [i]->_stat); |
---|
| 34 | _stat->add_stat(_component_victim ->_stat); |
---|
| 35 | } |
---|
[88] | 36 | |
---|
[128] | 37 | _stat->add_stat(_component_branch_target_buffer_glue ->_stat); |
---|
[78] | 38 | _stat->add_stat(_component_branch_target_buffer_register->_stat); |
---|
| 39 | |
---|
| 40 | log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End"); |
---|
| 41 | }; |
---|
| 42 | |
---|
| 43 | }; // end namespace branch_target_buffer |
---|
| 44 | }; // end namespace prediction_unit |
---|
| 45 | }; // end namespace front_end |
---|
| 46 | }; // end namespace multi_front_end |
---|
| 47 | }; // end namespace core |
---|
| 48 | |
---|
| 49 | }; // end namespace behavioural |
---|
| 50 | }; // end namespace morpheo |
---|
| 51 | #endif |
---|