Profiler.hh (9117:49116b947194) Profiler.hh (9171:ae88ecf37145)
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;

--- 44 unchanged lines hidden (view full) ---

53#include "base/hashmap.hh"
54#include "mem/protocol/AccessType.hh"
55#include "mem/protocol/GenericMachineType.hh"
56#include "mem/protocol/GenericRequestType.hh"
57#include "mem/protocol/PrefetchBit.hh"
58#include "mem/protocol/RubyAccessMode.hh"
59#include "mem/protocol/RubyRequestType.hh"
60#include "mem/ruby/common/Address.hh"
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;

--- 44 unchanged lines hidden (view full) ---

53#include "base/hashmap.hh"
54#include "mem/protocol/AccessType.hh"
55#include "mem/protocol/GenericMachineType.hh"
56#include "mem/protocol/GenericRequestType.hh"
57#include "mem/protocol/PrefetchBit.hh"
58#include "mem/protocol/RubyAccessMode.hh"
59#include "mem/protocol/RubyRequestType.hh"
60#include "mem/ruby/common/Address.hh"
61#include "mem/ruby/common/Consumer.hh"
62#include "mem/ruby/common/Global.hh"
63#include "mem/ruby/common/Histogram.hh"
64#include "mem/ruby/common/Set.hh"
65#include "mem/ruby/system/MachineID.hh"
66#include "mem/ruby/system/MemoryControl.hh"
67#include "params/RubyProfiler.hh"
68#include "sim/sim_object.hh"
69
70class RubyRequest;
71class AddressProfiler;
72
61#include "mem/ruby/common/Global.hh"
62#include "mem/ruby/common/Histogram.hh"
63#include "mem/ruby/common/Set.hh"
64#include "mem/ruby/system/MachineID.hh"
65#include "mem/ruby/system/MemoryControl.hh"
66#include "params/RubyProfiler.hh"
67#include "sim/sim_object.hh"
68
69class RubyRequest;
70class AddressProfiler;
71
73class Profiler : public SimObject, public Consumer
72class Profiler : public SimObject
74{
75 public:
76 typedef RubyProfilerParams Params;
77 Profiler(const Params *);
78 ~Profiler();
79
80 void wakeup();
81

--- 157 unchanged lines hidden (view full) ---

239 int m_requests;
240 std::map<std::string, int> m_requestProfileMap;
241
242 //added by SS
243 bool m_hot_lines;
244 bool m_all_instructions;
245
246 int m_num_of_sequencers;
73{
74 public:
75 typedef RubyProfilerParams Params;
76 Profiler(const Params *);
77 ~Profiler();
78
79 void wakeup();
80

--- 157 unchanged lines hidden (view full) ---

238 int m_requests;
239 std::map<std::string, int> m_requestProfileMap;
240
241 //added by SS
242 bool m_hot_lines;
243 bool m_all_instructions;
244
245 int m_num_of_sequencers;
246
247 protected:
248 class ProfileEvent : public Event
249 {
250 public:
251 ProfileEvent(Profiler *_profiler)
252 {
253 profiler = _profiler;
254 }
255 private:
256 void process() { profiler->wakeup(); }
257 Profiler *profiler;
258 };
259 ProfileEvent m_event;
247};
248
249inline std::ostream&
250operator<<(std::ostream& out, const Profiler& obj)
251{
252 obj.print(out);
253 out << std::flush;
254 return out;
255}
256
257#endif // __MEM_RUBY_PROFILER_PROFILER_HH__
260};
261
262inline std::ostream&
263operator<<(std::ostream& out, const Profiler& obj)
264{
265 obj.print(out);
266 out << std::flush;
267 return out;
268}
269
270#endif // __MEM_RUBY_PROFILER_PROFILER_HH__
258
259