ruby: Removed deprecated stats from the main profiler
authorBrad Beckmann <Brad.Beckmann@amd.com>
Mon, 22 Mar 2010 04:22:20 +0000 (21:22 -0700)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Mon, 22 Mar 2010 04:22:20 +0000 (21:22 -0700)
src/mem/ruby/profiler/CacheProfiler.cc
src/mem/ruby/profiler/Profiler.cc
src/mem/ruby/profiler/Profiler.hh

index 4745067345b04298ae8daefb494d1bf05ce27c36..50581fcf9ff6a9cb0d7327e0bc055bd7516e5ce8 100644 (file)
@@ -67,10 +67,6 @@ void CacheProfiler::printStats(ostream& out) const
   out << description << "_total_prefetches: " << m_prefetches << endl;
   out << description << "_total_sw_prefetches: " << m_sw_prefetches << endl;
   out << description << "_total_hw_prefetches: " << m_hw_prefetches << endl;
-
-  double trans_executed = double(g_system_ptr->getProfiler()->getTotalTransactionsExecuted());
-
-  out << description << "_misses_per_transaction: " << double(m_misses) / trans_executed << endl;
   out << endl;
 
   int requests = 0;
index 33425371f6120450175385d97cb5b48ab0ad980b..365f6cf42c6cff325111e38c3504fdc9d3c0943c 100644 (file)
@@ -126,39 +126,10 @@ void Profiler::wakeup()
     // The +1 allows us to avoid division by zero
   }
 
-  integer_t total_misses = m_perProcTotalMisses.sum();
-  integer_t simics_cycles_executed = perProcCycleCount.sum();
-  integer_t transactions_started = m_perProcStartTransaction.sum();
-  integer_t transactions_ended = m_perProcEndTransaction.sum();
-
   (*m_periodic_output_file_ptr) << "ruby_cycles: " 
                                 << g_eventQueue_ptr->getTime()-m_ruby_start 
                                 << endl;
 
-  (*m_periodic_output_file_ptr) << "total_misses: " 
-                                << total_misses 
-                                << " " 
-                                << m_perProcTotalMisses 
-                                << endl;
-
-  (*m_periodic_output_file_ptr) << "simics_cycles_executed: " 
-                                << simics_cycles_executed 
-                                << " " 
-                                << perProcCycleCount 
-                                << endl;
-
-  (*m_periodic_output_file_ptr) << "transactions_started: " 
-                                << transactions_started 
-                                << " " 
-                                << m_perProcStartTransaction 
-                                << endl;
-
-  (*m_periodic_output_file_ptr) << "transactions_ended: " 
-                                << transactions_ended 
-                                << " " 
-                                << m_perProcEndTransaction 
-                                << endl;
-
   (*m_periodic_output_file_ptr) << "mbytes_resident: " 
                                 << process_memory_resident() 
                                 << endl;
@@ -276,51 +247,14 @@ void Profiler::printStats(ostream& out, bool short_stats)
   }
 
   Vector<integer_t> perProcCycleCount;
-  Vector<double> perProcCyclesPerTrans;
-  Vector<double> perProcMissesPerTrans;
-
-
   perProcCycleCount.setSize(m_num_of_sequencers);
-  perProcCyclesPerTrans.setSize(m_num_of_sequencers);
-  perProcMissesPerTrans.setSize(m_num_of_sequencers);
 
   for(int i=0; i < m_num_of_sequencers; i++) {
     perProcCycleCount[i] = g_system_ptr->getCycleCount(i) - m_cycles_executed_at_start[i] + 1;
     // The +1 allows us to avoid division by zero
-
-    int trans = m_perProcEndTransaction[i];
-    if (trans == 0) {
-      perProcCyclesPerTrans[i] = 0;
-      perProcMissesPerTrans[i] = 0;
-    } else {
-      perProcCyclesPerTrans[i] = ruby_cycles / double(trans);
-      perProcMissesPerTrans[i] = m_perProcTotalMisses[i] / double(trans);
-    }
   }
 
-  integer_t total_misses = m_perProcTotalMisses.sum();
-  integer_t user_misses = m_perProcUserMisses.sum();
-  integer_t supervisor_misses = m_perProcSupervisorMisses.sum();
-  integer_t simics_cycles_executed = perProcCycleCount.sum();
-  integer_t transactions_started = m_perProcStartTransaction.sum();
-  integer_t transactions_ended = m_perProcEndTransaction.sum();
-
-  double cycles_per_transaction = (transactions_ended != 0) ? (m_num_of_sequencers * double(ruby_cycles)) / double(transactions_ended) : 0;
-  double misses_per_transaction = (transactions_ended != 0) ? double(total_misses) / double(transactions_ended) : 0;
-
-  out << "Total_misses: " << total_misses << endl;
-  out << "total_misses: " << total_misses << " " << m_perProcTotalMisses << endl;
-  out << "user_misses: " << user_misses << " " << m_perProcUserMisses << endl;
-  out << "supervisor_misses: " << supervisor_misses << " " << m_perProcSupervisorMisses << endl;
-  out << endl;
-  out << "ruby_cycles_executed: " << simics_cycles_executed << " " << perProcCycleCount << endl;
-  out << endl;
-  out << "transactions_started: " << transactions_started << " " << m_perProcStartTransaction << endl;
-  out << "transactions_ended: " << transactions_ended << " " << m_perProcEndTransaction << endl;
-  out << "cycles_per_transaction: " << cycles_per_transaction  << " " << perProcCyclesPerTrans << endl;
-  out << "misses_per_transaction: " << misses_per_transaction << " " << perProcMissesPerTrans << endl;
-
-  out << endl;
+  out << "ruby_cycles_executed: " << perProcCycleCount << endl;
 
   out << endl;
 
@@ -480,20 +414,6 @@ void Profiler::clearStats()
     }
   }
 
-  m_perProcTotalMisses.setSize(m_num_of_sequencers);
-  m_perProcUserMisses.setSize(m_num_of_sequencers);
-  m_perProcSupervisorMisses.setSize(m_num_of_sequencers);
-  m_perProcStartTransaction.setSize(m_num_of_sequencers);
-  m_perProcEndTransaction.setSize(m_num_of_sequencers);
-
-  for(int i=0; i < m_num_of_sequencers; i++) {
-    m_perProcTotalMisses[i] = 0;
-    m_perProcUserMisses[i] = 0;
-    m_perProcSupervisorMisses[i] = 0;
-    m_perProcStartTransaction[i] = 0;
-    m_perProcEndTransaction[i] = 0;
-  }
-
   m_busyControllerCount.setSize(MachineType_NUM); // all machines
   for(int i=0; i < MachineType_NUM; i++) {
     m_busyControllerCount[i].setSize(MachineType_base_count((MachineType)i));
@@ -610,16 +530,6 @@ void Profiler::profileRequest(const string& requestStr)
   }
 }
 
-void Profiler::startTransaction(int cpu)
-{
-  m_perProcStartTransaction[cpu]++;
-}
-
-void Profiler::endTransaction(int cpu)
-{
-  m_perProcEndTransaction[cpu]++;
-}
-
 void Profiler::controllerBusy(MachineID machID)
 {
   m_busyControllerCount[(int)machID.type][(int)machID.num]++;
@@ -709,8 +619,7 @@ static double process_memory_resident()
 }
 
 void Profiler::rubyWatch(int id){
-    //int rn_g1 = 0;//SIMICS_get_register_number(id, "g1");
-  uint64 tr = 0;//SIMICS_read_register(id, rn_g1);
+    uint64 tr = 0;
     Address watch_address = Address(tr);
     const int ID_SPACES = 3;
     const int TIME_SPACES = 7;
@@ -734,11 +643,6 @@ bool Profiler::watchAddress(Address addr){
       return false;
 }
 
-int64 Profiler::getTotalTransactionsExecuted() const {
-  return m_perProcEndTransaction.sum();
-}
-
-
 Profiler *
 RubyProfilerParams::create()
 {
index b142e94a3b82271ab5d5b64799cb787a397a2877..3ae1f5e310a182bd0b3357311a8a926fa96d735a 100644 (file)
@@ -137,8 +137,6 @@ public:
 
   void print(ostream& out) const;
 
-  int64 getTotalTransactionsExecuted() const;
-
   void rubyWatch(int proc);
   bool watchAddress(Address addr);
 
@@ -170,11 +168,6 @@ private:
   Time m_ruby_start;
   time_t m_real_time_start_time;
 
-  Vector<integer_t> m_perProcTotalMisses;
-  Vector<integer_t> m_perProcUserMisses;
-  Vector<integer_t> m_perProcSupervisorMisses;
-  Vector<integer_t> m_perProcStartTransaction;
-  Vector<integer_t> m_perProcEndTransaction;
   Vector < Vector < integer_t > > m_busyControllerCount;
   integer_t m_busyBankCount;
   Histogram m_multicast_retry_histogram;