Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h" |
---|
10 | #include <sstream> |
---|
11 | using namespace std; |
---|
12 | |
---|
13 | namespace morpheo { |
---|
14 | namespace behavioural { |
---|
15 | namespace stage_1_ifetch { |
---|
16 | namespace predictor { |
---|
17 | namespace meta_predictor { |
---|
18 | namespace two_level_branch_predictor { |
---|
19 | namespace branch_history_table { |
---|
20 | |
---|
21 | string Statistics::print (uint32_t depth , |
---|
22 | string component_statistics ) |
---|
23 | { |
---|
24 | string tab = string(depth,'\t'); |
---|
25 | ostringstream msg; |
---|
26 | |
---|
27 | msg << tab << "<branch_history_table name=\"" << _name << "\" >" << endl |
---|
28 | << print_body(depth+1) |
---|
29 | << component_statistics |
---|
30 | << tab << "</branch_history_table>" << endl; |
---|
31 | |
---|
32 | return msg.str(); |
---|
33 | }; |
---|
34 | |
---|
35 | string Statistics::print (uint32_t depth) |
---|
36 | { |
---|
37 | return print(depth,""); |
---|
38 | }; |
---|
39 | |
---|
40 | ostream& operator<< (ostream& output_stream , |
---|
41 | morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table::Statistics & x) |
---|
42 | { |
---|
43 | output_stream << x.print(0); |
---|
44 | |
---|
45 | return output_stream; |
---|
46 | }; |
---|
47 | |
---|
48 | }; // end namespace branch_history_table |
---|
49 | }; // end namespace two_level_branch_predictor |
---|
50 | }; // end namespace meta_predictor |
---|
51 | }; // end namespace predictor |
---|
52 | }; // end namespace stage_1_ifetch |
---|
53 | }; // end namespace behavioural |
---|
54 | }; // end namespace morpheo |
---|
55 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.