Profiler.hh (6433:0f0f0fbef977) | Profiler.hh (6876:a658c315512c) |
---|---|
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; --- 57 unchanged lines hidden (view full) --- 66#include "mem/ruby/system/MachineID.hh" 67#include "mem/protocol/PrefetchBit.hh" 68#include "mem/ruby/common/Address.hh" 69#include "mem/ruby/common/Set.hh" 70#include "mem/protocol/CacheRequestType.hh" 71#include "mem/protocol/GenericRequestType.hh" 72#include "mem/ruby/system/MemoryControl.hh" 73 | 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; --- 57 unchanged lines hidden (view full) --- 66#include "mem/ruby/system/MachineID.hh" 67#include "mem/protocol/PrefetchBit.hh" 68#include "mem/ruby/common/Address.hh" 69#include "mem/ruby/common/Set.hh" 70#include "mem/protocol/CacheRequestType.hh" 71#include "mem/protocol/GenericRequestType.hh" 72#include "mem/ruby/system/MemoryControl.hh" 73 |
74#include "params/RubyProfiler.hh" 75#include "sim/sim_object.hh" 76 |
|
74class CacheMsg; 75class AddressProfiler; 76 77template <class KEY_TYPE, class VALUE_TYPE> class Map; 78 79struct memory_control_profiler { 80 long long int m_memReq; 81 long long int m_memBankBusy; --- 12 unchanged lines hidden (view full) --- 94 long long int m_memNotOld; 95 Vector<long long int> m_memBankCount; 96 int m_banks_per_rank; 97 int m_ranks_per_dimm; 98 int m_dimms_per_channel; 99}; 100 101 | 77class CacheMsg; 78class AddressProfiler; 79 80template <class KEY_TYPE, class VALUE_TYPE> class Map; 81 82struct memory_control_profiler { 83 long long int m_memReq; 84 long long int m_memBankBusy; --- 12 unchanged lines hidden (view full) --- 97 long long int m_memNotOld; 98 Vector<long long int> m_memBankCount; 99 int m_banks_per_rank; 100 int m_ranks_per_dimm; 101 int m_dimms_per_channel; 102}; 103 104 |
102class Profiler : public Consumer { | 105class Profiler : public SimObject, public Consumer { |
103public: 104 // Constructors | 106public: 107 // Constructors |
105 Profiler(const string & name); | 108 typedef RubyProfilerParams Params; 109 Profiler(const Params *); |
106 107 void init(const vector<string> & argv, vector<string> memory_control_names); 108 109 // Destructor 110 ~Profiler(); 111 112 // Public Methods 113 void wakeup(); --- 141 unchanged lines hidden (view full) --- 255 256 // added for MemoryControl: 257 //added by SS 258 map< string, memory_control_profiler* > m_memory_control_profilers; 259 260 //added by SS 261 bool m_hot_lines; 262 bool m_all_instructions; | 110 111 void init(const vector<string> & argv, vector<string> memory_control_names); 112 113 // Destructor 114 ~Profiler(); 115 116 // Public Methods 117 void wakeup(); --- 141 unchanged lines hidden (view full) --- 259 260 // added for MemoryControl: 261 //added by SS 262 map< string, memory_control_profiler* > m_memory_control_profilers; 263 264 //added by SS 265 bool m_hot_lines; 266 bool m_all_instructions; |
263 string m_name; 264 | |
265}; 266 267// Output operator declaration 268ostream& operator<<(ostream& out, const Profiler& obj); 269 270// ******************* Definitions ******************* 271 272// Output operator definition 273extern inline 274ostream& operator<<(ostream& out, const Profiler& obj) 275{ 276 obj.print(out); 277 out << flush; 278 return out; 279} 280 281#endif //PROFILER_H 282 283 | 267}; 268 269// Output operator declaration 270ostream& operator<<(ostream& out, const Profiler& obj); 271 272// ******************* Definitions ******************* 273 274// Output operator definition 275extern inline 276ostream& operator<<(ostream& out, const Profiler& obj) 277{ 278 obj.print(out); 279 out << flush; 280 return out; 281} 282 283#endif //PROFILER_H 284 285 |