gem5  v20.1.0.0
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 <string>
50 #include <vector>
51 
52 #include "base/callback.hh"
53 #include "base/statistics.hh"
55 #include "mem/ruby/protocol/AccessType.hh"
56 #include "mem/ruby/protocol/PrefetchBit.hh"
57 #include "mem/ruby/protocol/RubyAccessMode.hh"
58 #include "mem/ruby/protocol/RubyRequestType.hh"
59 #include "params/RubySystem.hh"
60 
61 class RubyRequest;
62 class AddressProfiler;
63 
64 class Profiler
65 {
66  public:
67  Profiler(const RubySystemParams *params, RubySystem *rs);
68  ~Profiler();
69 
71 
72  void wakeup();
73  void regStats(const std::string &name);
74  void collateStats();
75 
78 
79  void addAddressTraceSample(const RubyRequest& msg, NodeID id);
80 
81  // added by SS
82  bool getHotLines() const { return m_hot_lines; }
83  bool getAllInstructions() const { return m_all_instructions; }
84 
85  private:
86  // Private copy constructor and assignment operator
87  Profiler(const Profiler& obj);
88  Profiler& operator=(const Profiler& obj);
89 
92 
95 
99 
105 
110 
115 
122 
129 
140 
141  //added by SS
142  const bool m_hot_lines;
143  const bool m_all_instructions;
144  const uint32_t m_num_vnets;
145 };
146 
147 #endif // __MEM_RUBY_PROFILER_PROFILER_HH__
MachineID.hh
Profiler::delayVCHistogram
std::vector< Stats::Histogram * > delayVCHistogram
Definition: Profiler.hh:94
Profiler::m_IssueToInitialDelayHistCoalsr
std::vector< Stats::Histogram * > m_IssueToInitialDelayHistCoalsr
Definition: Profiler.hh:136
Profiler::regStats
void regStats(const std::string &name)
Definition: Profiler.cc:104
Profiler::m_latencyHistCoalsr
Stats::Histogram m_latencyHistCoalsr
Definition: Profiler.hh:102
Profiler::m_missTypeLatencyHistSeqr
std::vector< Stats::Histogram * > m_missTypeLatencyHistSeqr
Definition: Profiler.hh:120
Profiler::m_missTypeLatencyHistCoalsr
std::vector< Stats::Histogram * > m_missTypeLatencyHistCoalsr
Definition: Profiler.hh:121
Profiler::m_missMachLatencyHistCoalsr
std::vector< Stats::Histogram * > m_missMachLatencyHistCoalsr
Definition: Profiler.hh:127
Profiler::getAddressProfiler
AddressProfiler * getAddressProfiler()
Definition: Profiler.hh:76
Profiler::m_FirstResponseToCompletionDelayHistCoalsr
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHistCoalsr
Definition: Profiler.hh:139
AddressProfiler
Definition: AddressProfiler.hh:44
Profiler::Profiler
Profiler(const RubySystemParams *params, RubySystem *rs)
Definition: Profiler.cc:83
Profiler::getInstructionProfiler
AddressProfiler * getInstructionProfiler()
Definition: Profiler.hh:77
Profiler::m_missTypeMachLatencyHistSeqr
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHistSeqr
Definition: Profiler.hh:126
Profiler::m_ForwardToFirstResponseDelayHistSeqr
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHistSeqr
Definition: Profiler.hh:133
std::vector< Stats::Histogram * >
Profiler::m_latencyHistSeqr
Stats::Histogram m_latencyHistSeqr
Histogram for holding latency profile of all requests.
Definition: Profiler.hh:101
Stats::Histogram
A simple histogram stat.
Definition: statistics.hh:2654
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
Profiler::m_outstandReqHistCoalsr
Stats::Histogram m_outstandReqHistCoalsr
Definition: Profiler.hh:98
Profiler::m_hitLatencyHistSeqr
Stats::Histogram m_hitLatencyHistSeqr
Histogram for holding latency profile of all requests that hit in the controller connected to this se...
Definition: Profiler.hh:108
Profiler::m_typeLatencyHistSeqr
std::vector< Stats::Histogram * > m_typeLatencyHistSeqr
Definition: Profiler.hh:103
Profiler::m_hitTypeLatencyHistSeqr
std::vector< Stats::Histogram * > m_hitTypeLatencyHistSeqr
Definition: Profiler.hh:109
Profiler
Definition: Profiler.hh:64
RubySystem
Definition: RubySystem.hh:52
Profiler::m_inst_profiler_ptr
AddressProfiler * m_inst_profiler_ptr
Definition: Profiler.hh:91
statistics.hh
RubyRequest
Definition: RubyRequest.hh:55
Profiler::m_IssueToInitialDelayHistSeqr
std::vector< Stats::Histogram * > m_IssueToInitialDelayHistSeqr
Histograms for recording the breakdown of miss latency.
Definition: Profiler.hh:131
Profiler::m_InitialToForwardDelayHistCoalsr
std::vector< Stats::Histogram * > m_InitialToForwardDelayHistCoalsr
Definition: Profiler.hh:137
Profiler::addAddressTraceSample
void addAddressTraceSample(const RubyRequest &msg, NodeID id)
Definition: Profiler.cc:493
Profiler::m_missLatencyHistCoalsr
Stats::Histogram m_missLatencyHistCoalsr
Definition: Profiler.hh:119
Profiler::getAllInstructions
bool getAllInstructions() const
Definition: Profiler.hh:83
Profiler::m_address_profiler_ptr
AddressProfiler * m_address_profiler_ptr
Definition: Profiler.hh:90
Profiler::m_num_vnets
const uint32_t m_num_vnets
Definition: Profiler.hh:144
Profiler::m_hitTypeMachLatencyHistSeqr
std::vector< std::vector< Stats::Histogram * > > m_hitTypeMachLatencyHistSeqr
Definition: Profiler.hh:114
Profiler::m_InitialToForwardDelayHistSeqr
std::vector< Stats::Histogram * > m_InitialToForwardDelayHistSeqr
Definition: Profiler.hh:132
Profiler::m_all_instructions
const bool m_all_instructions
Definition: Profiler.hh:143
name
const std::string & name()
Definition: trace.cc:50
Profiler::~Profiler
~Profiler()
Definition: Profiler.cc:99
Profiler::m_FirstResponseToCompletionDelayHistSeqr
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHistSeqr
Definition: Profiler.hh:134
Profiler::m_hot_lines
const bool m_hot_lines
Definition: Profiler.hh:142
Profiler::m_missMachLatencyHistSeqr
std::vector< Stats::Histogram * > m_missMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
Definition: Profiler.hh:125
Profiler::wakeup
void wakeup()
Profiler::m_ruby_system
RubySystem * m_ruby_system
Definition: Profiler.hh:70
Profiler::delayHistogram
Stats::Histogram delayHistogram
Definition: Profiler.hh:93
ArmISA::rs
Bitfield< 9, 8 > rs
Definition: miscregs_types.hh:372
NodeID
unsigned int NodeID
Definition: TypeDefines.hh:34
Profiler::m_missTypeMachLatencyHistCoalsr
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHistCoalsr
Definition: Profiler.hh:128
Profiler::m_IncompleteTimesSeqr
Stats::Scalar m_IncompleteTimesSeqr[MachineType_NUM]
Definition: Profiler.hh:135
Profiler::operator=
Profiler & operator=(const Profiler &obj)
Profiler::m_typeLatencyHistCoalsr
std::vector< Stats::Histogram * > m_typeLatencyHistCoalsr
Definition: Profiler.hh:104
Profiler::m_hitMachLatencyHistSeqr
std::vector< Stats::Histogram * > m_hitMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages.
Definition: Profiler.hh:113
Profiler::getHotLines
bool getHotLines() const
Definition: Profiler.hh:82
Profiler::m_ForwardToFirstResponseDelayHistCoalsr
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHistCoalsr
Definition: Profiler.hh:138
Profiler::collateStats
void collateStats()
Definition: Profiler.cc:348
callback.hh
Profiler::m_outstandReqHistSeqr
Stats::Histogram m_outstandReqHistSeqr
Histogram for number of outstanding requests per cycle.
Definition: Profiler.hh:97
Profiler::m_missLatencyHistSeqr
Stats::Histogram m_missLatencyHistSeqr
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
Definition: Profiler.hh:118

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17