From: Nilay Vaish Date: Sun, 2 Mar 2014 05:35:21 +0000 (-0600) Subject: ruby: profiler: statically allocate stats variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a533f3f9831081625626f96f9434a00f3079e98e;p=gem5.git 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. --- diff --git a/src/mem/ruby/profiler/Profiler.cc b/src/mem/ruby/profiler/Profiler.cc index 6f7da1eda..f078ef2c1 100644 --- a/src/mem/ruby/profiler/Profiler.cc +++ b/src/mem/ruby/profiler/Profiler.cc @@ -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; diff --git a/src/mem/ruby/profiler/Profiler.hh b/src/mem/ruby/profiler/Profiler.hh index 247c705b0..2a0ff71b2 100644 --- a/src/mem/ruby/profiler/Profiler.hh +++ b/src/mem/ruby/profiler/Profiler.hh @@ -125,7 +125,7 @@ class Profiler std::vector m_InitialToForwardDelayHist; std::vector m_ForwardToFirstResponseDelayHist; std::vector m_FirstResponseToCompletionDelayHist; - std::vector m_IncompleteTimes; + Stats::Scalar m_IncompleteTimes[MachineType_NUM]; //added by SS bool m_hot_lines;