ruby: profiler: statically allocate stats variable

Couple of users observed segmentation fault when the simulator tries to
register the statistical variable m_IncompleteTimes.  It seems that there
is some problem with the initialization of these variables when allocated
in the constructor.
This commit is contained in:
Nilay Vaish 2014-03-01 23:35:21 -06:00
parent 53f697a616
commit a533f3f983
2 changed files with 1 additions and 2 deletions

View file

@ -62,7 +62,6 @@ using namespace std;
using m5::stl_helpers::operator<<;
Profiler::Profiler(const RubySystemParams *p)
: m_IncompleteTimes(MachineType_NUM)
{
m_hot_lines = p->hot_lines;
m_all_instructions = p->all_instructions;

View file

@ -125,7 +125,7 @@ class Profiler
std::vector<Stats::Histogram *> m_InitialToForwardDelayHist;
std::vector<Stats::Histogram *> m_ForwardToFirstResponseDelayHist;
std::vector<Stats::Histogram *> m_FirstResponseToCompletionDelayHist;
std::vector<Stats::Scalar> m_IncompleteTimes;
Stats::Scalar m_IncompleteTimes[MachineType_NUM];
//added by SS
bool m_hot_lines;