diff -r df8e64db0fd8 -r a3a1b771b3d0 src/mem/ruby/profiler/Profiler.hh --- a/src/mem/ruby/profiler/Profiler.hh Tue Apr 23 15:21:32 2013 -0500 +++ b/src/mem/ruby/profiler/Profiler.hh Wed Apr 24 13:00:38 2013 -0500 @@ -76,11 +76,6 @@ Profiler(const Params *); ~Profiler(); - void wakeup(); - - void setPeriodicStatsFile(const std::string& filename); - void setPeriodicStatsInterval(int64_t period); - void printStats(std::ostream& out, bool short_stats=false); void printShortStats(std::ostream& out) { printStats(out, true); } void printTraceStats(std::ostream& out) const; @@ -209,20 +204,6 @@ bool m_all_instructions; int m_num_of_sequencers; - - protected: - class ProfileEvent : public Event - { - public: - ProfileEvent(Profiler *_profiler) - { - profiler = _profiler; - } - private: - void process() { profiler->wakeup(); } - Profiler *profiler; - }; - ProfileEvent m_event; }; inline std::ostream& diff -r df8e64db0fd8 -r a3a1b771b3d0 src/mem/ruby/profiler/Profiler.cc --- a/src/mem/ruby/profiler/Profiler.cc Tue Apr 23 15:21:32 2013 -0500 +++ b/src/mem/ruby/profiler/Profiler.cc Wed Apr 24 13:00:38 2013 -0500 @@ -68,7 +68,7 @@ static double process_memory_resident(); Profiler::Profiler(const Params *p) - : SimObject(p), m_event(this) + : SimObject(p) { m_inst_profiler_ptr = NULL; m_address_profiler_ptr = NULL; @@ -106,66 +106,6 @@ } void -Profiler::wakeup() -{ - // FIXME - avoid the repeated code - - vector perProcCycleCount(m_num_of_sequencers); - - for (int i = 0; i < m_num_of_sequencers; i++) { - perProcCycleCount[i] = - g_system_ptr->curCycle() - m_cycles_executed_at_start[i] + 1; - // The +1 allows us to avoid division by zero - } - - ostream &out = *m_periodic_output_file_ptr; - - out << "ruby_cycles: " << g_system_ptr->curCycle()-m_ruby_start << endl - << "mbytes_resident: " << process_memory_resident() << endl - << "mbytes_total: " << process_memory_total() << endl; - - if (process_memory_total() > 0) { - out << "resident_ratio: " - << process_memory_resident() / process_memory_total() << endl; - } - - out << "miss_latency: " << m_allMissLatencyHistogram << endl; - - out << endl; - - if (m_all_instructions) { - m_inst_profiler_ptr->printStats(out); - } - - //g_system_ptr->getNetwork()->printStats(out); - schedule(m_event, g_system_ptr->clockEdge(Cycles(m_stats_period))); -} - -void -Profiler::setPeriodicStatsFile(const string& filename) -{ - cout << "Recording periodic statistics to file '" << filename << "' every " - << m_stats_period << " Ruby cycles" << endl; - - if (m_periodic_output_file_ptr != &cerr) { - delete m_periodic_output_file_ptr; - } - - m_periodic_output_file_ptr = new ofstream(filename.c_str()); - schedule(m_event, g_system_ptr->clockEdge(Cycles(1))); -} - -void -Profiler::setPeriodicStatsInterval(int64_t period) -{ - cout << "Recording periodic statistics every " << m_stats_period - << " Ruby cycles" << endl; - - m_stats_period = period; - schedule(m_event, g_system_ptr->clockEdge(Cycles(1))); -} - -void Profiler::print(ostream& out) const { out << "[Profiler]";