55#include "config/build_gpu.hh"
58#include "mem/ruby/protocol/MachineType.hh"
59#include "mem/ruby/protocol/RubyRequest.hh"
87using stl_helpers::operator<<;
90 : m_ruby_system(
rs), m_hot_lines(
p.hot_lines),
91 m_all_instructions(
p.all_instructions),
92 m_num_vnets(
p.number_of_virtual_networks),
93 rubyProfilerStats(
rs, this)
112 : statistics::
Group(parent),
113 perRequestTypeStats(parent),
114 perMachineTypeStats(parent),
115 perRequestTypeMachineTypeStats(parent),
116 ADD_STAT(delayHistogram,
"delay histogram for all message"),
117 ADD_STAT(m_outstandReqHistSeqr,
""),
118 ADD_STAT(m_outstandReqHistCoalsr,
""),
122 ADD_STAT(m_missLatencyHistSeqr,
""),
123 ADD_STAT(m_missLatencyHistCoalsr,
"")
169 : statistics::
Group(parent,
"RequestType")
171 for (
int i = 0;
i < RubyRequestType_NUM;
i++) {
175 .name(
csprintf(
"%s.latency_hist_seqr", RubyRequestType(
i)))
182 .name(
csprintf(
"%s.latency_hist_coalsr", RubyRequestType(
i)))
189 .name(
csprintf(
"%s.hit_latency_hist_seqr", RubyRequestType(
i)))
196 .name(
csprintf(
"%s.miss_latency_hist_seqr", RubyRequestType(
i)))
203 .name(
csprintf(
"%s.miss_latency_hist_coalsr", RubyRequestType(
i)))
211 : statistics::
Group(parent,
"MachineType")
213 for (
int i = 0;
i < MachineType_NUM;
i++) {
217 .name(
csprintf(
"%s.hit_mach_latency_hist_seqr", MachineType(
i)))
224 .name(
csprintf(
"%s.miss_mach_latency_hist_seqr", MachineType(
i)))
231 .name(
csprintf(
"%s.miss_mach_latency_hist_coalsr",
241 "%s.miss_latency_hist_seqr.issue_to_initial_request",
251 "%s.miss_latency_hist_coalsr.issue_to_initial_request",
260 .name(
csprintf(
"%s.miss_latency_hist_seqr.initial_to_forward",
269 .name(
csprintf(
"%s.miss_latency_hist_coalsr.initial_to_forward",
280 "%s.miss_latency_hist_seqr.forward_to_first_response",
290 "%s.miss_latency_hist_coalsr.forward_to_first_response",
300 "%s.miss_latency_hist_seqr.first_response_to_completion",
310 "%s.miss_latency_hist_coalsr.first_response_to_completion",
317 ->name(
csprintf(
"%s.incomplete_times_seqr", MachineType(
i)))
326 : statistics::
Group(parent,
"RequestTypeMachineType")
328 for (
int i = 0;
i < RubyRequestType_NUM;
i++) {
336 for (
int j = 0; j < MachineType_NUM; j++) {
341 .name(
csprintf(
"%s.%s.hit_type_mach_latency_hist_seqr",
342 RubyRequestType(
i), MachineType(j)))
351 .name(
csprintf(
"%s.%s.miss_type_mach_latency_hist_seqr",
352 RubyRequestType(
i), MachineType(j)))
361 .name(
csprintf(
"%s.%s.miss_type_mach_latency_hist_coalsr",
362 RubyRequestType(
i), MachineType(j)))
381 for (uint32_t
i = 0;
i < MachineType_NUM;
i++) {
382 for (std::map<uint32_t, AbstractController*>::iterator it =
396 for (uint32_t
i = 0;
i < MachineType_NUM;
i++) {
397 for (std::map<uint32_t, AbstractController*>::iterator it =
417 for (uint32_t
i = 0;
i < MachineType_NUM;
i++) {
418 for (std::map<uint32_t, AbstractController*>::iterator it =
434 for (uint32_t j = 0; j < RubyRequestType_NUM; ++j) {
450 for (uint32_t j = 0; j < MachineType_NUM; ++j) {
469 ->getInitialToForwardDelayHist(MachineType(j)));
474 ->getForwardRequestToFirstResponseHist(
481 ->getFirstResponseToCompletionDelayHist(
491 for (uint32_t j = 0; j < RubyRequestType_NUM; j++) {
492 for (uint32_t
k = 0;
k < MachineType_NUM;
k++) {
514 for (uint32_t j = 0; j < RubyRequestType_NUM; ++j) {
526 for (uint32_t j = 0; j < MachineType_NUM; ++j) {
557 for (uint32_t j = 0; j < RubyRequestType_NUM; j++) {
558 for (uint32_t
k = 0;
k < MachineType_NUM;
k++) {
574 if (msg.
getType() != RubyRequestType_IFETCH) {
statistics::Histogram & getDelayVCHist(uint32_t index)
virtual Sequencer * getCPUSequencer() const =0
virtual GPUCoalescer * getGPUCoalescer() const =0
statistics::Histogram & getDelayHist()
void setHotLines(bool hot_lines)
void setAllInstructions(bool all_instructions)
statistics::Histogram & getFirstResponseToCompletionDelayHist(const MachineType t) const
statistics::Histogram & getInitialToForwardDelayHist(const MachineType t) const
statistics::Histogram & getIssueToInitialDelayHist(uint32_t t) const
statistics::Histogram & getOutstandReqHist()
statistics::Histogram & getForwardRequestToFirstResponseHist(const MachineType t) const
statistics::Histogram & getTypeLatencyHist(uint32_t t)
statistics::Histogram & getMissLatencyHist()
statistics::Histogram & getMissTypeMachLatencyHist(uint32_t r, uint32_t t) const
statistics::Histogram & getMissMachLatencyHist(uint32_t t) const
statistics::Histogram & getMissTypeLatencyHist(uint32_t t)
statistics::Histogram & getLatencyHist()
AddressProfiler * m_inst_profiler_ptr
ProfilerStats rubyProfilerStats
const uint32_t m_num_vnets
AddressProfiler * m_address_profiler_ptr
RubySystem * m_ruby_system
const bool m_all_instructions
void addAddressTraceSample(const RubyRequest &msg, NodeID id)
Profiler(const RubySystemParams ¶ms, RubySystem *rs)
Addr getLineAddress() const
const RubyRequestType & getType() const
const RubyAccessMode & getAccessMode() const
Addr getProgramCounter() const
std::vector< std::map< uint32_t, AbstractController * > > m_abstract_controls
statistics::Histogram & getLatencyHist()
statistics::Histogram & getMissTypeLatencyHist(uint32_t t)
statistics::Histogram & getMissMachLatencyHist(uint32_t t) const
statistics::Histogram & getHitTypeMachLatencyHist(uint32_t r, uint32_t t)
statistics::Histogram & getTypeLatencyHist(uint32_t t)
statistics::Counter getIncompleteTimes(const MachineType t) const
statistics::Histogram & getHitMachLatencyHist(uint32_t t)
statistics::Histogram & getIssueToInitialDelayHist(uint32_t t) const
statistics::Histogram & getMissTypeMachLatencyHist(uint32_t r, uint32_t t) const
statistics::Histogram & getOutstandReqHist()
statistics::Histogram & getHitLatencyHist()
statistics::Histogram & getHitTypeLatencyHist(uint32_t t)
statistics::Histogram & getMissLatencyHist()
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
void add(DistBase &d)
Add the argument distribution to the this distribution.
Histogram & init(size_type size)
Set the parameters of this histogram.
This is a simple scalar statistic, like a counter.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
const FlagsType pdf
Print the percent of the total that this entry represents.
const FlagsType oneline
Print all values on a single line.
const FlagsType nozero
Don't print if this is zero.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::string csprintf(const char *format, const Args &...args)
std::vector< statistics::Histogram * > m_missMachLatencyHistCoalsr
std::vector< statistics::Histogram * > m_FirstResponseToCompletionDelayHistSeqr
std::vector< statistics::Histogram * > m_IssueToInitialDelayHistSeqr
Histograms for recording the breakdown of miss latency.
std::vector< statistics::Histogram * > m_ForwardToFirstResponseDelayHistCoalsr
std::vector< statistics::Scalar * > m_IncompleteTimesSeqr
std::vector< statistics::Histogram * > m_FirstResponseToCompletionDelayHistCoalsr
std::vector< statistics::Histogram * > m_InitialToForwardDelayHistSeqr
std::vector< statistics::Histogram * > m_ForwardToFirstResponseDelayHistSeqr
std::vector< statistics::Histogram * > m_InitialToForwardDelayHistCoalsr
std::vector< statistics::Histogram * > m_IssueToInitialDelayHistCoalsr
std::vector< statistics::Histogram * > m_hitMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages.
std::vector< statistics::Histogram * > m_missMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
PerMachineTypeStats(statistics::Group *parent)
PerRequestTypeMachineTypeStats(statistics::Group *parent)
std::vector< std::vector< statistics::Histogram * > > m_missTypeMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
std::vector< std::vector< statistics::Histogram * > > m_missTypeMachLatencyHistCoalsr
std::vector< std::vector< statistics::Histogram * > > m_hitTypeMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages.
std::vector< statistics::Histogram * > m_missTypeLatencyHistSeqr
std::vector< statistics::Histogram * > m_hitTypeLatencyHistSeqr
std::vector< statistics::Histogram * > m_typeLatencyHistSeqr
std::vector< statistics::Histogram * > m_typeLatencyHistCoalsr
std::vector< statistics::Histogram * > m_missTypeLatencyHistCoalsr
PerRequestTypeStats(statistics::Group *parent)
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats perRequestTypeStats
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats perRequestTypeMachineTypeStats
statistics::Histogram m_latencyHistSeqr
Histogram for holding latency profile of all requests.
statistics::Histogram m_missLatencyHistCoalsr
statistics::Histogram m_missLatencyHistSeqr
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
statistics::Histogram m_outstandReqHistCoalsr
statistics::Histogram m_latencyHistCoalsr
std::vector< statistics::Histogram * > delayVCHistogram
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats perMachineTypeStats
statistics::Histogram m_outstandReqHistSeqr
Histogram for number of outstanding requests per cycle.
ProfilerStats(statistics::Group *parent, Profiler *profiler)
statistics::Histogram m_hitLatencyHistSeqr
Histogram for holding latency profile of all requests that hit in the controller connected to this se...
statistics::Histogram delayHistogram