source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp @ 145

Last change on this file since 145 was 145, checked in by rosiere, 14 years ago

1) add test with SPECINT2K
2) new config of Selftest
3) modif RAT to support multiple depth_save ... but not finish (need fix Update Prediction Table)
4) add Function_pointer but need fix

  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1#ifdef STATISTICS
2/*
3 * $Id: Commit_unit_statistics_deallocation.cpp 145 2010-10-13 18:15:51Z rosiere $
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h"
10#include "Behavioural/include/Allocation.h"
11#include "Common/include/BitManipulation.h"
12
13namespace morpheo {
14namespace behavioural {
15namespace core {
16namespace multi_ooo_engine {
17namespace ooo_engine {
18namespace commit_unit {
19
20
21#undef  FUNCTION
22#define FUNCTION "Commit_unit::statistics_deallocation"
23  void Commit_unit::statistics_deallocation (void)
24  {
25    log_begin(Commit_unit,FUNCTION);
26
27    log_printf(INFO,Commit_unit,FUNCTION,_("<%s> : Generate Statistics file"),_name.c_str());
28
29    delete _stat;
30
31    delete [] _stat_nb_inst_retire_ok;
32    delete [] _stat_nb_inst_retire_ko;
33    delete [] _stat_nb_inst_instruction;
34    delete [] _stat_nb_inst_type;
35    delete [] _stat_bank_nb_inst;
36
37    delete [] _stat_nb_cycle_state_no_event      ;
38    delete [] _stat_nb_cycle_state_not_yet_event ;
39    delete [] _stat_nb_cycle_state_event         ;
40    delete [] _stat_nb_cycle_state_wait_end      ;
41
42    delete [] _stat_nb_inst_insert;
43    delete [] _stat_nb_inst_retire;
44    delete [] _stat_nb_inst_commit;
45
46//  uint32_t mask_inst      = gen_mask<uint32_t>(SIZE_INSTRUCTION);
47    uint32_t mask_type      = gen_mask<uint32_t>(SIZE_TYPE       );
48    uint32_t mask_operation = gen_mask<uint32_t>(SIZE_OPERATION  );
49
50    msgInformation("Number of iteration couple of instructions.\n");
51
52    for (uint32_t i=0; i<_param->_nb_thread; ++i)
53      for(stat_inst_fusion_t::iterator it = _stat_inst_fusion [i].begin();
54          it != _stat_inst_fusion [i].end();
55          ++it)
56        {
57          uint32_t value = it->second;
58
59          if (value != 0)
60            {
61              uint32_t inst = it->first;
62
63              type_t   type_0      = static_cast<type_t>((inst>>(SIZE_TYPE+2*SIZE_OPERATION))&mask_type     );
64              uint32_t operation_0 =                     (inst>>(SIZE_TYPE+  SIZE_OPERATION))&mask_operation ;
65              type_t   type_1      = static_cast<type_t>((inst>>(            SIZE_OPERATION))&mask_type     );
66              uint32_t operation_1 =                      inst                               &mask_operation ;
67
68              msgInformation(
69                           //"  * %s - %s : %d\n"
70                           //,toString_instruction((inst>>SIZE_INSTRUCTION)&mask_inst).c_str()
71                           //,toString_instruction( inst                   &mask_inst).c_str(),value
72                             "  * (%d) \t%s.%s - %s.%s\n"
73                             ,value
74                             ,toString          (type_0            ).c_str()
75                             ,toString_operation(type_0,operation_0).c_str()
76                             ,toString          (type_1            ).c_str()
77                             ,toString_operation(type_1,operation_1).c_str()
78                             );
79            }
80        }
81
82 // DELETE1(_stat_last_inst          ,_param->_nb_thread);
83    DELETE1(_stat_last_inst_type     ,_param->_nb_thread);
84    DELETE1(_stat_last_inst_operation,_param->_nb_thread);
85    DELETE1(_stat_inst_fusion        ,_param->_nb_thread);
86       
87    log_end(Commit_unit,FUNCTION);
88  };
89
90}; // end namespace commit_unit
91}; // end namespace ooo_engine
92}; // end namespace multi_ooo_engine
93}; // end namespace core
94
95}; // end namespace behavioural
96}; // end namespace morpheo             
97#endif
Note: See TracBrowser for help on using the repository browser.