Deleted Added
sdiff udiff text old ( 11309:9be8a40026df ) new ( 11798:e034a4566653 )
full compact
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;

--- 42 unchanged lines hidden (view full) ---

51#include <fstream>
52
53#include "base/stl_helpers.hh"
54#include "base/str.hh"
55#include "mem/protocol/MachineType.hh"
56#include "mem/protocol/RubyRequest.hh"
57#include "mem/ruby/network/Network.hh"
58#include "mem/ruby/profiler/AddressProfiler.hh"
59#include "mem/ruby/system/GPUCoalescer.hh"
60#include "mem/ruby/system/Sequencer.hh"
61
62using namespace std;
63using m5::stl_helpers::operator<<;
64
65Profiler::Profiler(const RubySystemParams *p, RubySystem *rs)
66 : m_ruby_system(rs), m_hot_lines(p->hot_lines),
67 m_all_instructions(p->all_instructions),

--- 288 unchanged lines hidden (view full) ---

356 m_ruby_system->m_abstract_controls[i].begin();
357 it != m_ruby_system->m_abstract_controls[i].end(); ++it) {
358
359 AbstractController *ctr = (*it).second;
360 Sequencer *seq = ctr->getCPUSequencer();
361 if (seq != NULL) {
362 m_outstandReqHistSeqr.add(seq->getOutstandReqHist());
363 }
364 GPUCoalescer *coal = ctr->getGPUCoalescer();
365 if (coal != NULL) {
366 m_outstandReqHistCoalsr.add(coal->getOutstandReqHist());
367 }
368 }
369 }
370
371 for (uint32_t i = 0; i < MachineType_NUM; i++) {
372 for (map<uint32_t, AbstractController*>::iterator it =
373 m_ruby_system->m_abstract_controls[i].begin();
374 it != m_ruby_system->m_abstract_controls[i].end(); ++it) {
375

--- 42 unchanged lines hidden (view full) ---

418 for (uint32_t k = 0; k < MachineType_NUM; k++) {
419 m_hitTypeMachLatencyHistSeqr[j][k]->add(
420 seq->getHitTypeMachLatencyHist(j,k));
421 m_missTypeMachLatencyHistSeqr[j][k]->add(
422 seq->getMissTypeMachLatencyHist(j,k));
423 }
424 }
425 }
426
427 GPUCoalescer *coal = ctr->getGPUCoalescer();
428 if (coal != NULL) {
429 // add all the latencies
430 m_latencyHistCoalsr.add(coal->getLatencyHist());
431 m_missLatencyHistCoalsr.add(coal->getMissLatencyHist());
432
433 // add the per request type latencies
434 for (uint32_t j = 0; j < RubyRequestType_NUM; ++j) {

--- 24 unchanged lines hidden (view full) ---

459 // add the per (request, machine) type miss latencies
460 for (uint32_t j = 0; j < RubyRequestType_NUM; j++) {
461 for (uint32_t k = 0; k < MachineType_NUM; k++) {
462 m_missTypeMachLatencyHistCoalsr[j][k]->add(
463 coal->getMissTypeMachLatencyHist(j,k));
464 }
465 }
466 }
467 }
468 }
469}
470
471void
472Profiler::addAddressTraceSample(const RubyRequest& msg, NodeID id)
473{
474 if (msg.getType() != RubyRequestType_IFETCH) {
475 // Note: The following line should be commented out if you
476 // want to use the special profiling that is part of the GS320
477 // protocol
478
479 // NOTE: Unless PROFILE_HOT_LINES is enabled, nothing will be
480 // profiled by the AddressProfiler
481 m_address_profiler_ptr->
482 addTraceSample(msg.getLineAddress(), msg.getProgramCounter(),
483 msg.getType(), msg.getAccessMode(), id, false);
484 }
485}