1/* 2 * Copyright (c) 1999-2013 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 47 unchanged lines hidden (view full) --- 56#include "mem/ruby/profiler/AddressProfiler.hh" 57#include "mem/ruby/profiler/Profiler.hh" 58#include "mem/ruby/system/Sequencer.hh" 59 60using namespace std; 61using m5::stl_helpers::operator<<; 62 63Profiler::Profiler(const RubySystemParams *p, RubySystem *rs) |
64 : m_ruby_system(rs) |
65{ |
66 m_hot_lines = p->hot_lines; 67 m_all_instructions = p->all_instructions; 68 |
69 m_address_profiler_ptr = new AddressProfiler(p->num_of_sequencers, this); 70 m_address_profiler_ptr->setHotLines(m_hot_lines); 71 m_address_profiler_ptr->setAllInstructions(m_all_instructions); 72 73 if (m_all_instructions) { 74 m_inst_profiler_ptr = new AddressProfiler(p->num_of_sequencers, this); 75 m_inst_profiler_ptr->setHotLines(m_hot_lines); 76 m_inst_profiler_ptr->setAllInstructions(m_all_instructions); --- 16 unchanged lines hidden (view full) --- 93 } 94 95 delayHistogram 96 .init(10) 97 .name(pName + ".delayHist") 98 .desc("delay histogram for all message") 99 .flags(Stats::nozero | Stats::pdf | Stats::oneline); 100 |
101 uint32_t numVNets = Network::getNumberOfVirtualNetworks(); 102 for (int i = 0; i < numVNets; i++) { |
103 delayVCHistogram.push_back(new Stats::Histogram()); 104 delayVCHistogram[i] 105 ->init(10) 106 .name(pName + csprintf(".delayVCHist.vnet_%i", i)) 107 .desc(csprintf("delay histogram for vnet_%i", i)) 108 .flags(Stats::nozero | Stats::pdf | Stats::oneline); 109 } 110 --- 135 unchanged lines hidden (view full) --- 246 if (!m_all_instructions) { 247 m_address_profiler_ptr->collateStats(); 248 } 249 250 if (m_all_instructions) { 251 m_inst_profiler_ptr->collateStats(); 252 } 253 |
254 uint32_t numVNets = Network::getNumberOfVirtualNetworks(); |
255 for (uint32_t i = 0; i < MachineType_NUM; i++) { 256 for (map<uint32_t, AbstractController*>::iterator it = 257 m_ruby_system->m_abstract_controls[i].begin(); 258 it != m_ruby_system->m_abstract_controls[i].end(); ++it) { 259 260 AbstractController *ctr = (*it).second; 261 delayHistogram.add(ctr->getDelayHist()); 262 |
263 for (uint32_t i = 0; i < numVNets; i++) { |
264 delayVCHistogram[i]->add(ctr->getDelayVCHist(i)); 265 } 266 } 267 } 268 269 for (uint32_t i = 0; i < MachineType_NUM; i++) { 270 for (map<uint32_t, AbstractController*>::iterator it = 271 m_ruby_system->m_abstract_controls[i].begin(); --- 84 unchanged lines hidden --- |