[2] | 1 | #ifdef STATISTICS |
---|
| 2 | /* |
---|
| 3 | * $Id$ |
---|
| 4 | * |
---|
| 5 | * [ Description ] |
---|
| 6 | * |
---|
| 7 | */ |
---|
| 8 | |
---|
[48] | 9 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h" |
---|
[2] | 10 | |
---|
| 11 | #include <sstream> |
---|
| 12 | using namespace std; |
---|
| 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | namespace behavioural { |
---|
[48] | 16 | namespace core { |
---|
| 17 | namespace multi_front_end { |
---|
| 18 | namespace front_end { |
---|
| 19 | namespace prediction_unit { |
---|
| 20 | namespace direction { |
---|
| 21 | |
---|
[2] | 22 | namespace meta_predictor { |
---|
| 23 | namespace two_level_branch_predictor { |
---|
| 24 | namespace pattern_history_table { |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | string Statistics::print (uint32_t depth , |
---|
| 28 | string component_stat) |
---|
| 29 | { |
---|
| 30 | log_printf(FUNC,Pattern_History_Table,"print","Begin"); |
---|
| 31 | |
---|
| 32 | string tab = string(depth,'\t'); |
---|
| 33 | ostringstream msg; |
---|
| 34 | |
---|
| 35 | msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl |
---|
| 36 | << print_body(depth+1) |
---|
| 37 | << component_stat |
---|
| 38 | << tab << "</pattern_history_table>" << endl; |
---|
| 39 | |
---|
| 40 | log_printf(FUNC,Pattern_History_Table,"print","End"); |
---|
| 41 | |
---|
| 42 | return msg.str(); |
---|
| 43 | }; |
---|
| 44 | |
---|
| 45 | string Statistics::print (uint32_t depth) |
---|
| 46 | { |
---|
| 47 | string tab = string(depth,'\t'); |
---|
| 48 | ostringstream msg; |
---|
| 49 | |
---|
| 50 | msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl |
---|
| 51 | << print_body(depth+1) << endl |
---|
| 52 | << tab << "</pattern_history_table>" << endl; |
---|
| 53 | |
---|
| 54 | return msg.str(); |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | ostream& operator<< (ostream& output_stream , |
---|
[48] | 58 | morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Statistics & x) |
---|
[2] | 59 | { |
---|
| 60 | output_stream << x.print(0); |
---|
| 61 | |
---|
| 62 | return output_stream; |
---|
| 63 | }; |
---|
| 64 | |
---|
| 65 | }; // end namespace pattern_history_table |
---|
| 66 | }; // end namespace two_level_branch_predictor |
---|
| 67 | }; // end namespace meta_predictor |
---|
| 68 | |
---|
[48] | 69 | }; // end namespace core |
---|
| 70 | }; // end namespace multi_front_end |
---|
| 71 | }; // end namespace front_end |
---|
| 72 | }; // end namespace prediction_unit |
---|
| 73 | }; // end namespace direction |
---|
| 74 | |
---|
| 75 | |
---|
[2] | 76 | }; // end namespace behavioural |
---|
| 77 | }; // end namespace morpheo |
---|
| 78 | #endif |
---|