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