gem5  v21.1.0.2
Profiler.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1999-2008 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;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 /*
30  This file has been modified by Kevin Moore and Dan Nussbaum of the
31  Scalable Systems Research Group at Sun Microsystems Laboratories
32  (http://research.sun.com/scalable/) to support the Adaptive
33  Transactional Memory Test Platform (ATMTP).
34 
35  Please send email to atmtp-interest@sun.com with feedback, questions, or
36  to request future announcements about ATMTP.
37 
38  ----------------------------------------------------------------------
39 
40  File modification date: 2008-02-23
41 
42  ----------------------------------------------------------------------
43 */
44 
45 #ifndef __MEM_RUBY_PROFILER_PROFILER_HH__
46 #define __MEM_RUBY_PROFILER_PROFILER_HH__
47 
48 #include <map>
49 #include <memory>
50 #include <string>
51 #include <vector>
52 
53 #include "base/callback.hh"
54 #include "base/statistics.hh"
56 #include "mem/ruby/protocol/AccessType.hh"
57 #include "mem/ruby/protocol/PrefetchBit.hh"
58 #include "mem/ruby/protocol/RubyAccessMode.hh"
59 #include "mem/ruby/protocol/RubyRequestType.hh"
60 #include "params/RubySystem.hh"
61 
62 namespace gem5
63 {
64 
65 namespace ruby
66 {
67 
68 class RubyRequest;
69 class AddressProfiler;
70 
71 class Profiler
72 {
73  public:
74  Profiler(const RubySystemParams &params, RubySystem *rs);
75  ~Profiler();
76 
78 
79  void wakeup();
80  void regStats();
81  void collateStats();
82 
85 
86  void addAddressTraceSample(const RubyRequest& msg, NodeID id);
87 
88  // added by SS
89  bool getHotLines() const { return m_hot_lines; }
90  bool getAllInstructions() const { return m_all_instructions; }
91 
92  private:
93  // Private copy constructor and assignment operator
94  Profiler(const Profiler& obj);
95  Profiler& operator=(const Profiler& obj);
96 
99 
101  {
102  ProfilerStats(statistics::Group *parent, Profiler *profiler);
103 
105  {
107 
108  // Histogram of the latency of each request type
111 
112  // Histogram of the latency of requests that hit in the controller
113  // connected to this sequencer for each type of request
115 
116  // Histogram of the latency of requests that miss in the controller
117  // connected to this sequencer for each type of request
121 
123  {
125 
129 
134 
153 
155  {
157 
162 
170 
173 
177 
181 
185 
190  };
191 
192  //added by SS
193  const bool m_hot_lines;
194  const bool m_all_instructions;
195  const uint32_t m_num_vnets;
196 
197 
198  public:
200 };
201 
202 } // namespace ruby
203 } // namespace gem5
204 
205 #endif // __MEM_RUBY_PROFILER_PROFILER_HH__
MachineID.hh
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats::m_hitTypeMachLatencyHistSeqr
std::vector< std::vector< statistics::Histogram * > > m_hitTypeMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages.
Definition: Profiler.hh:161
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_ForwardToFirstResponseDelayHistSeqr
std::vector< statistics::Histogram * > m_ForwardToFirstResponseDelayHistSeqr
Definition: Profiler.hh:140
gem5::ruby::Profiler::ProfilerStats::m_latencyHistSeqr
statistics::Histogram m_latencyHistSeqr
Histogram for holding latency profile of all requests.
Definition: Profiler.hh:179
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_missMachLatencyHistCoalsr
std::vector< statistics::Histogram * > m_missMachLatencyHistCoalsr
Definition: Profiler.hh:133
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_IssueToInitialDelayHistCoalsr
std::vector< statistics::Histogram * > m_IssueToInitialDelayHistCoalsr
Definition: Profiler.hh:145
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats
Definition: Profiler.hh:154
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_InitialToForwardDelayHistCoalsr
std::vector< statistics::Histogram * > m_InitialToForwardDelayHistCoalsr
Definition: Profiler.hh:147
gem5::ruby::Profiler::ProfilerStats::perRequestTypeMachineTypeStats
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats perRequestTypeMachineTypeStats
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats::m_missTypeMachLatencyHistCoalsr
std::vector< std::vector< statistics::Histogram * > > m_missTypeMachLatencyHistCoalsr
Definition: Profiler.hh:168
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_IncompleteTimesSeqr
std::vector< statistics::Scalar * > m_IncompleteTimesSeqr
Definition: Profiler.hh:143
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_hitMachLatencyHistSeqr
std::vector< statistics::Histogram * > m_hitMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages.
Definition: Profiler.hh:128
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::m_missTypeLatencyHistCoalsr
std::vector< statistics::Histogram * > m_missTypeLatencyHistCoalsr
Definition: Profiler.hh:119
std::vector
STL vector class.
Definition: stl.hh:37
gem5::ruby::Profiler::Profiler
Profiler(const RubySystemParams &params, RubySystem *rs)
Definition: Profiler.cc:89
gem5::ruby::Profiler::ProfilerStats::m_missLatencyHistSeqr
statistics::Histogram m_missLatencyHistSeqr
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
Definition: Profiler.hh:188
gem5::ruby::Profiler::ProfilerStats::perMachineTypeStats
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats perMachineTypeStats
gem5::ruby::Profiler::ProfilerStats::delayVCHistogram
std::vector< statistics::Histogram * > delayVCHistogram
Definition: Profiler.hh:172
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_InitialToForwardDelayHistSeqr
std::vector< statistics::Histogram * > m_InitialToForwardDelayHistSeqr
Definition: Profiler.hh:138
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::m_hitTypeLatencyHistSeqr
std::vector< statistics::Histogram * > m_hitTypeLatencyHistSeqr
Definition: Profiler.hh:114
gem5::statistics::Histogram
A simple histogram stat.
Definition: statistics.hh:2123
gem5::ruby::Profiler::m_ruby_system
RubySystem * m_ruby_system
Definition: Profiler.hh:77
gem5::ruby::Profiler::ProfilerStats::ProfilerStats
ProfilerStats(statistics::Group *parent, Profiler *profiler)
Definition: Profiler.cc:111
gem5::ruby::Profiler::getHotLines
bool getHotLines() const
Definition: Profiler.hh:89
gem5::ruby::RubyRequest
Definition: RubyRequest.hh:61
gem5::ruby::Profiler::wakeup
void wakeup()
gem5::ruby::Profiler::getAllInstructions
bool getAllInstructions() const
Definition: Profiler.hh:90
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::PerMachineTypeStats
PerMachineTypeStats(statistics::Group *parent)
Definition: Profiler.cc:210
gem5::ruby::Profiler::ProfilerStats::m_outstandReqHistSeqr
statistics::Histogram m_outstandReqHistSeqr
Histogram for number of outstanding requests per cycle.
Definition: Profiler.hh:175
gem5::ruby::Profiler::m_hot_lines
const bool m_hot_lines
Definition: Profiler.hh:193
statistics.hh
gem5::ruby::Profiler::ProfilerStats::m_latencyHistCoalsr
statistics::Histogram m_latencyHistCoalsr
Definition: Profiler.hh:180
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats
Definition: Profiler.hh:122
gem5::ruby::AddressProfiler
Definition: AddressProfiler.hh:50
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats
Definition: Profiler.hh:104
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats::PerRequestTypeMachineTypeStats
PerRequestTypeMachineTypeStats(statistics::Group *parent)
Definition: Profiler.cc:325
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_missMachLatencyHistSeqr
std::vector< statistics::Histogram * > m_missMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
Definition: Profiler.hh:132
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::PerRequestTypeStats
PerRequestTypeStats(statistics::Group *parent)
Definition: Profiler.cc:168
gem5::ruby::Profiler::regStats
void regStats()
gem5::ruby::Profiler::ProfilerStats::m_hitLatencyHistSeqr
statistics::Histogram m_hitLatencyHistSeqr
Histogram for holding latency profile of all requests that hit in the controller connected to this se...
Definition: Profiler.hh:184
gem5::ruby::Profiler::m_all_instructions
const bool m_all_instructions
Definition: Profiler.hh:194
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_ForwardToFirstResponseDelayHistCoalsr
std::vector< statistics::Histogram * > m_ForwardToFirstResponseDelayHistCoalsr
Definition: Profiler.hh:149
gem5::ruby::Profiler::addAddressTraceSample
void addAddressTraceSample(const RubyRequest &msg, NodeID id)
Definition: Profiler.cc:572
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeMachineTypeStats::m_missTypeMachLatencyHistSeqr
std::vector< std::vector< statistics::Histogram * > > m_missTypeMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
Definition: Profiler.hh:166
gem5::ruby::Profiler::ProfilerStats
Definition: Profiler.hh:100
gem5::ruby::RubySystem
Definition: RubySystem.hh:63
gem5::ruby::Profiler::ProfilerStats::perRequestTypeStats
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats perRequestTypeStats
gem5::ruby::Profiler::collateStats
void collateStats()
Definition: Profiler.cc:371
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_FirstResponseToCompletionDelayHistSeqr
std::vector< statistics::Histogram * > m_FirstResponseToCompletionDelayHistSeqr
Definition: Profiler.hh:142
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_IssueToInitialDelayHistSeqr
std::vector< statistics::Histogram * > m_IssueToInitialDelayHistSeqr
Histograms for recording the breakdown of miss latency.
Definition: Profiler.hh:136
gem5::statistics::Group
Statistics container.
Definition: group.hh:93
gem5::ruby::Profiler::ProfilerStats::m_missLatencyHistCoalsr
statistics::Histogram m_missLatencyHistCoalsr
Definition: Profiler.hh:189
gem5::ruby::NodeID
unsigned int NodeID
Definition: TypeDefines.hh:40
gem5::ruby::Profiler::getInstructionProfiler
AddressProfiler * getInstructionProfiler()
Definition: Profiler.hh:84
gem5::ruby::Profiler::getAddressProfiler
AddressProfiler * getAddressProfiler()
Definition: Profiler.hh:83
gem5::ruby::Profiler::ProfilerStats::PerMachineTypeStats::m_FirstResponseToCompletionDelayHistCoalsr
std::vector< statistics::Histogram * > m_FirstResponseToCompletionDelayHistCoalsr
Definition: Profiler.hh:151
gem5::ruby::Profiler::~Profiler
~Profiler()
Definition: Profiler.cc:106
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::m_typeLatencyHistSeqr
std::vector< statistics::Histogram * > m_typeLatencyHistSeqr
Definition: Profiler.hh:109
gem5::ruby::Profiler::ProfilerStats::delayHistogram
statistics::Histogram delayHistogram
Definition: Profiler.hh:171
gem5::ruby::Profiler::m_num_vnets
const uint32_t m_num_vnets
Definition: Profiler.hh:195
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::m_typeLatencyHistCoalsr
std::vector< statistics::Histogram * > m_typeLatencyHistCoalsr
Definition: Profiler.hh:110
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::ruby::Profiler::rubyProfilerStats
ProfilerStats rubyProfilerStats
Definition: Profiler.hh:199
gem5::ruby::Profiler
Definition: Profiler.hh:71
gem5::ruby::Profiler::ProfilerStats::m_outstandReqHistCoalsr
statistics::Histogram m_outstandReqHistCoalsr
Definition: Profiler.hh:176
gem5::ruby::Profiler::ProfilerStats::PerRequestTypeStats::m_missTypeLatencyHistSeqr
std::vector< statistics::Histogram * > m_missTypeLatencyHistSeqr
Definition: Profiler.hh:118
callback.hh
gem5::ArmISA::rs
Bitfield< 9, 8 > rs
Definition: misc_types.hh:376
gem5::ruby::Profiler::m_inst_profiler_ptr
AddressProfiler * m_inst_profiler_ptr
Definition: Profiler.hh:98
gem5::ruby::Profiler::operator=
Profiler & operator=(const Profiler &obj)
gem5::ruby::Profiler::m_address_profiler_ptr
AddressProfiler * m_address_profiler_ptr
Definition: Profiler.hh:97

Generated on Tue Sep 21 2021 12:25:41 for gem5 by doxygen 1.8.17