[82] | 1 | #ifdef STATISTICS |
---|
| 2 | /* |
---|
| 3 | * $Id: Decod_queue_statistics_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace decod_unit { |
---|
| 17 | namespace decod_queue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Decod_queue::statistics_allocation" |
---|
| 22 | void Decod_queue::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics) |
---|
| 23 | { |
---|
| 24 | log_begin(Decod_queue,FUNCTION); |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | _stat = new Stat (static_cast<std::string>(_name), |
---|
| 28 | "Decod_queue", |
---|
| 29 | param_statistics); |
---|
| 30 | |
---|
[88] | 31 | _stat_use_queue = _stat->create_variable ("use_queue"); |
---|
| 32 | _stat_nb_inst = new counter_t * [_param->_nb_context]; |
---|
[82] | 33 | |
---|
| 34 | std::string expr_average_inst = ""; |
---|
| 35 | |
---|
| 36 | for (uint32_t i=0; i<_param->_nb_context; i++) |
---|
| 37 | { |
---|
[88] | 38 | _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i)); |
---|
| 39 | |
---|
| 40 | _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i)); |
---|
| 41 | _stat->create_expr_percent ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i)); |
---|
| 42 | |
---|
| 43 | if (i == 0) |
---|
| 44 | expr_average_inst = "nb_inst_"+toString(i); |
---|
[82] | 45 | else |
---|
| 46 | expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst; |
---|
| 47 | } |
---|
| 48 | |
---|
[88] | 49 | _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)")); |
---|
| 50 | _stat->create_expr_percent ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent decod_queue's occupation (all context)")); |
---|
[82] | 51 | |
---|
[88] | 52 | _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle.")); |
---|
| 53 | _stat->create_expr_percent ("percent_use_queue", "average_use_queue", toString(_param->_size_queue), _("Percent slot decod_queue occupation.")); |
---|
| 54 | |
---|
[82] | 55 | log_end(Decod_queue,FUNCTION); |
---|
| 56 | }; |
---|
| 57 | |
---|
| 58 | }; // end namespace decod_queue |
---|
| 59 | }; // end namespace decod_unit |
---|
| 60 | }; // end namespace front_end |
---|
| 61 | }; // end namespace multi_front_end |
---|
| 62 | }; // end namespace core |
---|
| 63 | |
---|
| 64 | }; // end namespace behavioural |
---|
| 65 | }; // end namespace morpheo |
---|
| 66 | #endif |
---|