gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
54 #include "mem/protocol/AccessType.hh"
55 #include "mem/protocol/PrefetchBit.hh"
56 #include "mem/protocol/RubyAccessMode.hh"
57 #include "mem/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__
Stats::Scalar m_IncompleteTimesSeqr[MachineType_NUM]
Definition: Profiler.hh:135
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
std::vector< Stats::Histogram * > m_hitMachLatencyHistSeqr
Histograms for profiling the latencies for requests that did not required external messages...
Definition: Profiler.hh:113
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHistSeqr
Definition: Profiler.hh:134
std::vector< Stats::Histogram * > m_missTypeLatencyHistCoalsr
Definition: Profiler.hh:121
AddressProfiler * m_address_profiler_ptr
Definition: Profiler.hh:90
const std::string & name()
Definition: trace.cc:49
void collateStats()
Definition: Profiler.cc:347
std::vector< Stats::Histogram * > m_typeLatencyHistCoalsr
Definition: Profiler.hh:104
std::vector< Stats::Histogram * > m_IssueToInitialDelayHistCoalsr
Definition: Profiler.hh:136
std::vector< Stats::Histogram * > m_hitTypeLatencyHistSeqr
Definition: Profiler.hh:109
bool getHotLines() const
Definition: Profiler.hh:82
const bool m_hot_lines
Definition: Profiler.hh:142
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2475
std::vector< Stats::Histogram * > delayVCHistogram
Definition: Profiler.hh:94
std::vector< Stats::Histogram * > m_typeLatencyHistSeqr
Definition: Profiler.hh:103
unsigned int NodeID
Definition: TypeDefines.hh:34
std::vector< Stats::Histogram * > m_missTypeLatencyHistSeqr
Definition: Profiler.hh:120
Stats::Histogram delayHistogram
Definition: Profiler.hh:93
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHistCoalsr
Definition: Profiler.hh:138
void addAddressTraceSample(const RubyRequest &msg, NodeID id)
Definition: Profiler.cc:492
std::vector< std::vector< Stats::Histogram * > > m_hitTypeMachLatencyHistSeqr
Definition: Profiler.hh:114
AddressProfiler * getAddressProfiler()
Definition: Profiler.hh:76
Stats::Histogram m_outstandReqHistSeqr
Histogram for number of outstanding requests per cycle.
Definition: Profiler.hh:97
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHistCoalsr
Definition: Profiler.hh:139
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHistSeqr
Definition: Profiler.hh:126
A simple histogram stat.
Definition: statistics.hh:2551
std::vector< Stats::Histogram * > m_InitialToForwardDelayHistSeqr
Definition: Profiler.hh:132
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
void wakeup()
void regStats(const std::string &name)
Definition: Profiler.cc:103
RubySystem * m_ruby_system
Definition: Profiler.hh:70
std::vector< Stats::Histogram * > m_InitialToForwardDelayHistCoalsr
Definition: Profiler.hh:137
const uint32_t m_num_vnets
Definition: Profiler.hh:144
AddressProfiler * getInstructionProfiler()
Definition: Profiler.hh:77
Stats::Histogram m_outstandReqHistCoalsr
Definition: Profiler.hh:98
Profiler & operator=(const Profiler &obj)
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHistSeqr
Definition: Profiler.hh:133
Stats::Histogram m_latencyHistCoalsr
Definition: Profiler.hh:102
const bool m_all_instructions
Definition: Profiler.hh:143
AddressProfiler * m_inst_profiler_ptr
Definition: Profiler.hh:91
std::vector< Stats::Histogram * > m_missMachLatencyHistCoalsr
Definition: Profiler.hh:127
~Profiler()
Definition: Profiler.cc:98
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHistCoalsr
Definition: Profiler.hh:128
Stats::Histogram m_latencyHistSeqr
Histogram for holding latency profile of all requests.
Definition: Profiler.hh:101
Bitfield< 9, 8 > rs
Definition: miscregs.hh:1560
std::vector< Stats::Histogram * > m_IssueToInitialDelayHistSeqr
Histograms for recording the breakdown of miss latency.
Definition: Profiler.hh:131
Stats::Histogram m_missLatencyHistCoalsr
Definition: Profiler.hh:119
Profiler(const RubySystemParams *params, RubySystem *rs)
Definition: Profiler.cc:82
std::vector< Stats::Histogram * > m_missMachLatencyHistSeqr
Histograms for profiling the latencies for requests that required external messages.
Definition: Profiler.hh:125
bool getAllInstructions() const
Definition: Profiler.hh:83

Generated on Fri Jun 9 2017 13:03:50 for gem5 by doxygen 1.8.6