Profiler.hh revision 6145
16145Snate@binkert.org/*
26145Snate@binkert.org * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
36145Snate@binkert.org * All rights reserved.
46145Snate@binkert.org *
56145Snate@binkert.org * Redistribution and use in source and binary forms, with or without
66145Snate@binkert.org * modification, are permitted provided that the following conditions are
76145Snate@binkert.org * met: redistributions of source code must retain the above copyright
86145Snate@binkert.org * notice, this list of conditions and the following disclaimer;
96145Snate@binkert.org * redistributions in binary form must reproduce the above copyright
106145Snate@binkert.org * notice, this list of conditions and the following disclaimer in the
116145Snate@binkert.org * documentation and/or other materials provided with the distribution;
126145Snate@binkert.org * neither the name of the copyright holders nor the names of its
136145Snate@binkert.org * contributors may be used to endorse or promote products derived from
146145Snate@binkert.org * this software without specific prior written permission.
156145Snate@binkert.org *
166145Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176145Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196145Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206145Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216145Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226145Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256145Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266145Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276145Snate@binkert.org */
286145Snate@binkert.org
296145Snate@binkert.org/*
306145Snate@binkert.org   This file has been modified by Kevin Moore and Dan Nussbaum of the
316145Snate@binkert.org   Scalable Systems Research Group at Sun Microsystems Laboratories
326145Snate@binkert.org   (http://research.sun.com/scalable/) to support the Adaptive
336145Snate@binkert.org   Transactional Memory Test Platform (ATMTP).
346145Snate@binkert.org
356145Snate@binkert.org   Please send email to atmtp-interest@sun.com with feedback, questions, or
366145Snate@binkert.org   to request future announcements about ATMTP.
376145Snate@binkert.org
386145Snate@binkert.org   ----------------------------------------------------------------------
396145Snate@binkert.org
406145Snate@binkert.org   File modification date: 2008-02-23
416145Snate@binkert.org
426145Snate@binkert.org   ----------------------------------------------------------------------
436145Snate@binkert.org*/
446145Snate@binkert.org
456145Snate@binkert.org/*
466145Snate@binkert.org * Profiler.h
476145Snate@binkert.org *
486145Snate@binkert.org * Description:
496145Snate@binkert.org *
506145Snate@binkert.org * $Id$
516145Snate@binkert.org *
526145Snate@binkert.org */
536145Snate@binkert.org
546145Snate@binkert.org#ifndef PROFILER_H
556145Snate@binkert.org#define PROFILER_H
566145Snate@binkert.org
576145Snate@binkert.org#include "Global.hh"
586145Snate@binkert.org#include "GenericMachineType.hh"
596145Snate@binkert.org#include "RubyConfig.hh"
606145Snate@binkert.org#include "Histogram.hh"
616145Snate@binkert.org#include "Consumer.hh"
626145Snate@binkert.org#include "AccessModeType.hh"
636145Snate@binkert.org#include "AccessType.hh"
646145Snate@binkert.org#include "NodeID.hh"
656145Snate@binkert.org#include "MachineID.hh"
666145Snate@binkert.org#include "PrefetchBit.hh"
676145Snate@binkert.org#include "Address.hh"
686145Snate@binkert.org#include "Set.hh"
696145Snate@binkert.org#include "CacheRequestType.hh"
706145Snate@binkert.org#include "GenericRequestType.hh"
716145Snate@binkert.org//#include "XactProfiler.hh" //gem5:Arka for decomissioning og log_tm
726145Snate@binkert.org
736145Snate@binkert.orgclass CacheMsg;
746145Snate@binkert.orgclass CacheProfiler;
756145Snate@binkert.orgclass AddressProfiler;
766145Snate@binkert.org
776145Snate@binkert.orgtemplate <class KEY_TYPE, class VALUE_TYPE> class Map;
786145Snate@binkert.org
796145Snate@binkert.orgclass Profiler : public Consumer {
806145Snate@binkert.orgpublic:
816145Snate@binkert.org  // Constructors
826145Snate@binkert.org  Profiler();
836145Snate@binkert.org
846145Snate@binkert.org  // Destructor
856145Snate@binkert.org  ~Profiler();
866145Snate@binkert.org
876145Snate@binkert.org  // Public Methods
886145Snate@binkert.org  void wakeup();
896145Snate@binkert.org
906145Snate@binkert.org  void setPeriodicStatsFile(const string& filename);
916145Snate@binkert.org  void setPeriodicStatsInterval(integer_t period);
926145Snate@binkert.org
936145Snate@binkert.org  void setXactVisualizerFile(char* filename);
946145Snate@binkert.org
956145Snate@binkert.org  void printStats(ostream& out, bool short_stats=false);
966145Snate@binkert.org  void printShortStats(ostream& out) { printStats(out, true); }
976145Snate@binkert.org  void printTraceStats(ostream& out) const;
986145Snate@binkert.org  void clearStats();
996145Snate@binkert.org  void printConfig(ostream& out) const;
1006145Snate@binkert.org  void printResourceUsage(ostream& out) const;
1016145Snate@binkert.org
1026145Snate@binkert.org  AddressProfiler* getAddressProfiler() { return m_address_profiler_ptr; }
1036145Snate@binkert.org  AddressProfiler* getInstructionProfiler() { return m_inst_profiler_ptr; }
1046145Snate@binkert.org  //XactProfiler*    getXactProfiler() { return m_xact_profiler_ptr;} //gem5:Arka for decomissioning og log_tm
1056145Snate@binkert.org
1066145Snate@binkert.org  void addPrimaryStatSample(const CacheMsg& msg, NodeID id);
1076145Snate@binkert.org  void addSecondaryStatSample(GenericRequestType requestType, AccessModeType type, int msgSize, PrefetchBit pfBit, NodeID id);
1086145Snate@binkert.org  void addSecondaryStatSample(CacheRequestType requestType, AccessModeType type, int msgSize, PrefetchBit pfBit, NodeID id);
1096145Snate@binkert.org  void addAddressTraceSample(const CacheMsg& msg, NodeID id);
1106145Snate@binkert.org
1116145Snate@binkert.org  void profileRequest(const string& requestStr);
1126145Snate@binkert.org  void profileSharing(const Address& addr, AccessType type, NodeID requestor, const Set& sharers, const Set& owner);
1136145Snate@binkert.org
1146145Snate@binkert.org  void profileMulticastRetry(const Address& addr, int count);
1156145Snate@binkert.org
1166145Snate@binkert.org  void profileFilterAction(int action);
1176145Snate@binkert.org
1186145Snate@binkert.org  void profileConflictingRequests(const Address& addr);
1196145Snate@binkert.org  void profileOutstandingRequest(int outstanding) { m_outstanding_requests.add(outstanding); }
1206145Snate@binkert.org  void profileOutstandingPersistentRequest(int outstanding) { m_outstanding_persistent_requests.add(outstanding); }
1216145Snate@binkert.org  void profileAverageLatencyEstimate(int latency) { m_average_latency_estimate.add(latency); }
1226145Snate@binkert.org
1236145Snate@binkert.org  void countBAUnicast() { m_num_BA_unicasts++; }
1246145Snate@binkert.org  void countBABroadcast() { m_num_BA_broadcasts++; }
1256145Snate@binkert.org
1266145Snate@binkert.org  void recordPrediction(bool wasGood, bool wasPredicted);
1276145Snate@binkert.org
1286145Snate@binkert.org  void startTransaction(int cpu);
1296145Snate@binkert.org  void endTransaction(int cpu);
1306145Snate@binkert.org  void profilePFWait(Time waitTime);
1316145Snate@binkert.org
1326145Snate@binkert.org  void controllerBusy(MachineID machID);
1336145Snate@binkert.org  void bankBusy();
1346145Snate@binkert.org  void missLatency(Time t, CacheRequestType type, GenericMachineType respondingMach);
1356145Snate@binkert.org  void swPrefetchLatency(Time t, CacheRequestType type, GenericMachineType respondingMach);
1366145Snate@binkert.org  void stopTableUsageSample(int num) { m_stopTableProfile.add(num); }
1376145Snate@binkert.org  void L1tbeUsageSample(int num) { m_L1tbeProfile.add(num); }
1386145Snate@binkert.org  void L2tbeUsageSample(int num) { m_L2tbeProfile.add(num); }
1396145Snate@binkert.org  void sequencerRequests(int num) { m_sequencer_requests.add(num); }
1406145Snate@binkert.org  void storeBuffer(int size, int blocks) { m_store_buffer_size.add(size); m_store_buffer_blocks.add(blocks);}
1416145Snate@binkert.org
1426145Snate@binkert.org  void profileGetXMaskPrediction(const Set& pred_set);
1436145Snate@binkert.org  void profileGetSMaskPrediction(const Set& pred_set);
1446145Snate@binkert.org  void profileTrainingMask(const Set& pred_set);
1456145Snate@binkert.org  void profileTransition(const string& component, NodeID id, NodeID version, Address addr,
1466145Snate@binkert.org                         const string& state, const string& event,
1476145Snate@binkert.org                         const string& next_state, const string& note);
1486145Snate@binkert.org  void profileMsgDelay(int virtualNetwork, int delayCycles);
1496145Snate@binkert.org
1506145Snate@binkert.org  void print(ostream& out) const;
1516145Snate@binkert.org
1526145Snate@binkert.org  int64 getTotalInstructionsExecuted() const;
1536145Snate@binkert.org  int64 getTotalTransactionsExecuted() const;
1546145Snate@binkert.org
1556145Snate@binkert.org  //---- begin Transactional Memory CODE
1566145Snate@binkert.org  #if 0  //gem5:Arka for decomissioning og log_tm
1576145Snate@binkert.org  void profileTransCycles(int proc, int cycles) { getXactProfiler()->profileTransCycles(proc, cycles);}
1586145Snate@binkert.org  void profileNonTransCycles(int proc, int cycles) { getXactProfiler()->profileNonTransCycles(proc, cycles);}
1596145Snate@binkert.org  void profileStallTransCycles(int proc, int cycles) { getXactProfiler()->profileStallTransCycles(proc, cycles); }
1606145Snate@binkert.org  void profileStallNonTransCycles(int proc, int cycles) { getXactProfiler()->profileStallNonTransCycles(proc, cycles); }
1616145Snate@binkert.org  void profileAbortingTransCycles(int proc, int cycles) { getXactProfiler()->profileAbortingTransCycles(proc, cycles); }
1626145Snate@binkert.org  void profileCommitingTransCycles(int proc, int cycles) { getXactProfiler()->profileCommitingTransCycles(proc, cycles); }
1636145Snate@binkert.org  void profileBarrierCycles(int proc, int cycles) { getXactProfiler()->profileBarrierCycles(proc, cycles);}
1646145Snate@binkert.org  void profileBackoffTransCycles(int proc, int cycles) { getXactProfiler()->profileBackoffTransCycles(proc, cycles); }
1656145Snate@binkert.org  void profileGoodTransCycles(int proc, int cycles) {getXactProfiler()->profileGoodTransCycles(proc, cycles); }
1666145Snate@binkert.org
1676145Snate@binkert.org  #endif //gem5:Arka TODO clean up the rest of this functions as well
1686145Snate@binkert.org  void profileTransaction(int size, int logSize, int readS, int writeS, int overflow_readS, int overflow_writeS, int retries, int cycles, bool nacked, int loadMisses, int storeMisses, int instrCount, int xid);
1696145Snate@binkert.org  void profileBeginTransaction(NodeID id, int tid, int xid, int thread, Address pc, bool isOpen);
1706145Snate@binkert.org  void profileCommitTransaction(NodeID id, int tid, int xid, int thread, Address pc, bool isOpen);
1716145Snate@binkert.org  void profileLoadTransaction(NodeID id, int tid, int xid, int thread, Address addr, Address logicalAddress, Address pc);
1726145Snate@binkert.org  void profileLoad(NodeID id, int tid, int xid, int thread, Address addr, Address logicalAddress, Address pc);
1736145Snate@binkert.org  void profileStoreTransaction(NodeID id, int tid, int xid, int thread, Address addr, Address logicalAddress, Address pc);
1746145Snate@binkert.org  void profileStore(NodeID id, int tid, int xid, int thread, Address addr, Address logicalAddress, Address pc);
1756145Snate@binkert.org  void profileLoadOverflow(NodeID id, int tid, int xid, int thread, Address addr, bool l1_overflow);
1766145Snate@binkert.org  void profileStoreOverflow(NodeID id, int tid, int xid, int thread, Address addr, bool l1_overflow);
1776145Snate@binkert.org  void profileNack(NodeID id, int tid, int xid, int thread, int nacking_thread, NodeID nackedBy, Address addr, Address logicalAddress, Address pc, uint64 seq_ts, uint64 nack_ts, bool possibleCycle);
1786145Snate@binkert.org  void profileExposedConflict(NodeID id, int xid, int thread, Address addr, Address pc);
1796145Snate@binkert.org  void profileTransWB();
1806145Snate@binkert.org  void profileExtraWB();
1816145Snate@binkert.org  void profileInferredAbort();
1826145Snate@binkert.org  void profileAbortTransaction(NodeID id, int tid, int xid, int thread, int delay, int abortingThread, int abortingProc, Address addr, Address pc);
1836145Snate@binkert.org  void profileExceptionStart(bool xact, NodeID proc_no, int thread, int val, int trap_level, uinteger_t pc, uinteger_t npc);
1846145Snate@binkert.org  void profileExceptionDone(bool xact, NodeID proc_no, int thread, int val, int trap_level, uinteger_t pc, uinteger_t npc, uinteger_t tpc, uinteger_t tnpc);
1856145Snate@binkert.org  void profileTimerInterrupt(NodeID id,
1866145Snate@binkert.org                             uinteger_t tick, uinteger_t tick_cmpr,
1876145Snate@binkert.org                             uinteger_t stick, uinteger_t stick_cmpr,
1886145Snate@binkert.org                             int trap_level,
1896145Snate@binkert.org                             uinteger_t pc, uinteger_t npc,
1906145Snate@binkert.org                             uinteger_t pstate, int pil);
1916145Snate@binkert.org
1926145Snate@binkert.org  void profileAbortDelayConstants(int handlerStartupDelay, int handlerPerBlockDelay);
1936145Snate@binkert.org  void profileXactChange(int procs, int cycles);
1946145Snate@binkert.org  void profileReadSet(Address addr, bool bf_filter_result, bool perfect_filter_result, NodeID id, int thread);
1956145Snate@binkert.org  void profileWriteSet(Address addr, bool bf_filter_result, bool perfect_filter_result, NodeID id, int thread);
1966145Snate@binkert.org  void profileRemoteReadSet(Address addr, bool bf_filter_result, bool perfect_filter_result, NodeID id, int thread);
1976145Snate@binkert.org  void profileRemoteWriteSet(Address addr, bool bf_filter_result, bool perfect_filter_result, NodeID id, int thread);
1986145Snate@binkert.org
1996145Snate@binkert.org
2006145Snate@binkert.org  void profileReadFilterBitsSet(int xid, int bits, bool isCommit);
2016145Snate@binkert.org  void profileWriteFilterBitsSet(int xid, int bits, bool isCommit);
2026145Snate@binkert.org
2036145Snate@binkert.org  void printTransactionState(bool can_skip);
2046145Snate@binkert.org
2056145Snate@binkert.org  void watchpointsFalsePositiveTrigger();
2066145Snate@binkert.org  void watchpointsTrueTrigger();
2076145Snate@binkert.org
2086145Snate@binkert.org  void profileTransactionLogOverflow(NodeID id, Address addr, Address pc);
2096145Snate@binkert.org  void profileTransactionCacheOverflow(NodeID id, Address addr, Address pc);
2106145Snate@binkert.org  void profileGetCPS(NodeID id, uint32 cps, Address pc);
2116145Snate@binkert.org  void profileTransactionTCC(NodeID id, Address pc);
2126145Snate@binkert.org  void profileTransactionUnsupInst(NodeID id, Address pc);
2136145Snate@binkert.org  void profileTransactionSaveInst(NodeID id, Address pc);
2146145Snate@binkert.org  void profileTransactionRestoreInst(NodeID id, Address pc);
2156145Snate@binkert.org
2166145Snate@binkert.org  //---- end Transactional Memory CODE
2176145Snate@binkert.org
2186145Snate@binkert.org  void rubyWatch(int proc);
2196145Snate@binkert.org  bool watchAddress(Address addr);
2206145Snate@binkert.org
2216145Snate@binkert.org  // return Ruby's start time
2226145Snate@binkert.org  Time getRubyStartTime(){
2236145Snate@binkert.org    return m_ruby_start;
2246145Snate@binkert.org  }
2256145Snate@binkert.org
2266145Snate@binkert.org  // added for MemoryControl:
2276145Snate@binkert.org  void profileMemReq(int bank);
2286145Snate@binkert.org  void profileMemBankBusy();
2296145Snate@binkert.org  void profileMemBusBusy();
2306145Snate@binkert.org  void profileMemTfawBusy();
2316145Snate@binkert.org  void profileMemReadWriteBusy();
2326145Snate@binkert.org  void profileMemDataBusBusy();
2336145Snate@binkert.org  void profileMemRefresh();
2346145Snate@binkert.org  void profileMemRead();
2356145Snate@binkert.org  void profileMemWrite();
2366145Snate@binkert.org  void profileMemWaitCycles(int cycles);
2376145Snate@binkert.org  void profileMemInputQ(int cycles);
2386145Snate@binkert.org  void profileMemBankQ(int cycles);
2396145Snate@binkert.org  void profileMemArbWait(int cycles);
2406145Snate@binkert.org  void profileMemRandBusy();
2416145Snate@binkert.org  void profileMemNotOld();
2426145Snate@binkert.org
2436145Snate@binkert.orgprivate:
2446145Snate@binkert.org  // Private Methods
2456145Snate@binkert.org  void addL2StatSample(GenericRequestType requestType, AccessModeType type, int msgSize, PrefetchBit pfBit, NodeID id);
2466145Snate@binkert.org  void addL1DStatSample(const CacheMsg& msg, NodeID id);
2476145Snate@binkert.org  void addL1IStatSample(const CacheMsg& msg, NodeID id);
2486145Snate@binkert.org
2496145Snate@binkert.org  GenericRequestType CacheRequestType_to_GenericRequestType(const CacheRequestType& type);
2506145Snate@binkert.org
2516145Snate@binkert.org  // Private copy constructor and assignment operator
2526145Snate@binkert.org  Profiler(const Profiler& obj);
2536145Snate@binkert.org  Profiler& operator=(const Profiler& obj);
2546145Snate@binkert.org
2556145Snate@binkert.org  // Data Members (m_ prefix)
2566145Snate@binkert.org  CacheProfiler* m_L1D_cache_profiler_ptr;
2576145Snate@binkert.org  CacheProfiler* m_L1I_cache_profiler_ptr;
2586145Snate@binkert.org  CacheProfiler* m_L2_cache_profiler_ptr;
2596145Snate@binkert.org  AddressProfiler* m_address_profiler_ptr;
2606145Snate@binkert.org  AddressProfiler* m_inst_profiler_ptr;
2616145Snate@binkert.org
2626145Snate@binkert.org//  XactProfiler*   m_xact_profiler_ptr; // gem5:Arka for decomissioning of log_tm
2636145Snate@binkert.org
2646145Snate@binkert.org  Vector<int64> m_instructions_executed_at_start;
2656145Snate@binkert.org  Vector<int64> m_cycles_executed_at_start;
2666145Snate@binkert.org
2676145Snate@binkert.org  ostream* m_periodic_output_file_ptr;
2686145Snate@binkert.org  integer_t m_stats_period;
2696145Snate@binkert.org  std::fstream m_xact_visualizer;
2706145Snate@binkert.org  std::ostream *m_xact_visualizer_ptr;
2716145Snate@binkert.org
2726145Snate@binkert.org  Time m_ruby_start;
2736145Snate@binkert.org  time_t m_real_time_start_time;
2746145Snate@binkert.org
2756145Snate@binkert.org  int m_num_BA_unicasts;
2766145Snate@binkert.org  int m_num_BA_broadcasts;
2776145Snate@binkert.org
2786145Snate@binkert.org  Vector<integer_t> m_perProcTotalMisses;
2796145Snate@binkert.org  Vector<integer_t> m_perProcUserMisses;
2806145Snate@binkert.org  Vector<integer_t> m_perProcSupervisorMisses;
2816145Snate@binkert.org  Vector<integer_t> m_perProcStartTransaction;
2826145Snate@binkert.org  Vector<integer_t> m_perProcEndTransaction;
2836145Snate@binkert.org  Vector < Vector < integer_t > > m_busyControllerCount;
2846145Snate@binkert.org  integer_t m_busyBankCount;
2856145Snate@binkert.org  Histogram m_multicast_retry_histogram;
2866145Snate@binkert.org
2876145Snate@binkert.org  Histogram m_L1tbeProfile;
2886145Snate@binkert.org  Histogram m_L2tbeProfile;
2896145Snate@binkert.org  Histogram m_stopTableProfile;
2906145Snate@binkert.org
2916145Snate@binkert.org  Histogram m_filter_action_histogram;
2926145Snate@binkert.org  Histogram m_tbeProfile;
2936145Snate@binkert.org
2946145Snate@binkert.org  Histogram m_sequencer_requests;
2956145Snate@binkert.org  Histogram m_store_buffer_size;
2966145Snate@binkert.org  Histogram m_store_buffer_blocks;
2976145Snate@binkert.org  Histogram m_read_sharing_histogram;
2986145Snate@binkert.org  Histogram m_write_sharing_histogram;
2996145Snate@binkert.org  Histogram m_all_sharing_histogram;
3006145Snate@binkert.org  int64 m_cache_to_cache;
3016145Snate@binkert.org  int64 m_memory_to_cache;
3026145Snate@binkert.org
3036145Snate@binkert.org  Histogram m_prefetchWaitHistogram;
3046145Snate@binkert.org
3056145Snate@binkert.org  Vector<Histogram> m_missLatencyHistograms;
3066145Snate@binkert.org  Vector<Histogram> m_machLatencyHistograms;
3076145Snate@binkert.org  Histogram m_L2MissLatencyHistogram;
3086145Snate@binkert.org  Histogram m_allMissLatencyHistogram;
3096145Snate@binkert.org
3106145Snate@binkert.org  Histogram  m_allSWPrefetchLatencyHistogram;
3116145Snate@binkert.org  Histogram  m_SWPrefetchL2MissLatencyHistogram;
3126145Snate@binkert.org  Vector<Histogram> m_SWPrefetchLatencyHistograms;
3136145Snate@binkert.org  Vector<Histogram> m_SWPrefetchMachLatencyHistograms;
3146145Snate@binkert.org
3156145Snate@binkert.org  Histogram m_delayedCyclesHistogram;
3166145Snate@binkert.org  Histogram m_delayedCyclesNonPFHistogram;
3176145Snate@binkert.org  Vector<Histogram> m_delayedCyclesVCHistograms;
3186145Snate@binkert.org
3196145Snate@binkert.org  int m_predictions;
3206145Snate@binkert.org  int m_predictionOpportunities;
3216145Snate@binkert.org  int m_goodPredictions;
3226145Snate@binkert.org
3236145Snate@binkert.org  Histogram m_gets_mask_prediction;
3246145Snate@binkert.org  Histogram m_getx_mask_prediction;
3256145Snate@binkert.org  Histogram m_explicit_training_mask;
3266145Snate@binkert.org
3276145Snate@binkert.org  // For profiling possibly conflicting requests
3286145Snate@binkert.org  Map<Address, Time>* m_conflicting_map_ptr;
3296145Snate@binkert.org  Histogram m_conflicting_histogram;
3306145Snate@binkert.org
3316145Snate@binkert.org  Histogram m_outstanding_requests;
3326145Snate@binkert.org  Histogram m_outstanding_persistent_requests;
3336145Snate@binkert.org
3346145Snate@binkert.org  Histogram m_average_latency_estimate;
3356145Snate@binkert.org
3366145Snate@binkert.org  //---- begin Transactional Memory CODE
3376145Snate@binkert.org  Map <int, int>* m_procsInXactMap_ptr;
3386145Snate@binkert.org
3396145Snate@binkert.org  Histogram m_xactCycles;
3406145Snate@binkert.org  Histogram m_xactLogs;
3416145Snate@binkert.org  Histogram m_xactReads;
3426145Snate@binkert.org  Histogram m_xactWrites;
3436145Snate@binkert.org  Histogram m_xactOverflowReads;
3446145Snate@binkert.org  Histogram m_xactOverflowWrites;
3456145Snate@binkert.org  Histogram m_xactOverflowTotalReads;
3466145Snate@binkert.org  Histogram m_xactOverflowTotalWrites;
3476145Snate@binkert.org  Histogram m_xactSizes;
3486145Snate@binkert.org  Histogram m_xactRetries;
3496145Snate@binkert.org  Histogram m_abortDelays;
3506145Snate@binkert.org  Histogram m_xactLoadMisses;
3516145Snate@binkert.org  Histogram m_xactStoreMisses;
3526145Snate@binkert.org  Histogram m_xactInstrCount;
3536145Snate@binkert.org  int m_xactNacked;
3546145Snate@binkert.org  int m_transactionAborts;
3556145Snate@binkert.org  int m_transWBs;
3566145Snate@binkert.org  int m_extraWBs;
3576145Snate@binkert.org  int m_abortStarupDelay;
3586145Snate@binkert.org  int m_abortPerBlockDelay;
3596145Snate@binkert.org  int m_inferredAborts;
3606145Snate@binkert.org  Map <int, int>* m_nackXIDMap_ptr;
3616145Snate@binkert.org  // pairs of XIDs involved in NACKs
3626145Snate@binkert.org  Map<int, Map<int, int> * > * m_nackXIDPairMap_ptr;
3636145Snate@binkert.org  Map <Address, int>* m_nackPCMap_ptr;
3646145Snate@binkert.org  Map <int, int>* m_xactExceptionMap_ptr;
3656145Snate@binkert.org  Map <int, int>* m_abortIDMap_ptr;
3666145Snate@binkert.org  Map <int, int>* m_commitIDMap_ptr;
3676145Snate@binkert.org  Map <int, int>* m_xactRetryIDMap_ptr;
3686145Snate@binkert.org  Map <int, int>* m_xactCyclesIDMap_ptr;
3696145Snate@binkert.org  Map <int, int>* m_xactReadSetIDMap_ptr;
3706145Snate@binkert.org  Map <int, int>* m_xactWriteSetIDMap_ptr;
3716145Snate@binkert.org  Map <int, int>* m_xactLoadMissIDMap_ptr;
3726145Snate@binkert.org  Map <int, int>* m_xactStoreMissIDMap_ptr;
3736145Snate@binkert.org  Map <int, integer_t> *m_xactInstrCountIDMap_ptr;
3746145Snate@binkert.org  Map <Address, int>* m_abortPCMap_ptr;
3756145Snate@binkert.org  Map <Address, int>* m_abortAddressMap_ptr;
3766145Snate@binkert.org  Map <Address, int>* m_readSetMatch_ptr;
3776145Snate@binkert.org  Map <Address, int>* m_readSetNoMatch_ptr;
3786145Snate@binkert.org  Map <Address, int>* m_writeSetMatch_ptr;
3796145Snate@binkert.org  Map <Address, int>* m_writeSetNoMatch_ptr;
3806145Snate@binkert.org  Map <Address, int>* m_remoteReadSetMatch_ptr;
3816145Snate@binkert.org  Map <Address, int>* m_remoteReadSetNoMatch_ptr;
3826145Snate@binkert.org  Map <Address, int>* m_remoteWriteSetMatch_ptr;
3836145Snate@binkert.org  Map <Address, int>* m_remoteWriteSetNoMatch_ptr;
3846145Snate@binkert.org  long long int m_readSetEmptyChecks;
3856145Snate@binkert.org  long long int m_readSetMatch;
3866145Snate@binkert.org  long long int m_readSetNoMatch;
3876145Snate@binkert.org  long long int m_writeSetEmptyChecks;
3886145Snate@binkert.org  long long int m_writeSetMatch;
3896145Snate@binkert.org  long long int m_writeSetNoMatch;
3906145Snate@binkert.org  Map<int, Histogram> * m_xactReadFilterBitsSetOnCommit;
3916145Snate@binkert.org  Map<int, Histogram> * m_xactReadFilterBitsSetOnAbort;
3926145Snate@binkert.org  Map<int, Histogram> * m_xactWriteFilterBitsSetOnCommit;
3936145Snate@binkert.org  Map<int, Histogram> * m_xactWriteFilterBitsSetOnAbort;
3946145Snate@binkert.org
3956145Snate@binkert.org  unsigned int m_watchpointsFalsePositiveTrigger;
3966145Snate@binkert.org  unsigned int m_watchpointsTrueTrigger;
3976145Snate@binkert.org
3986145Snate@binkert.org  int m_transactionUnsupInsts;
3996145Snate@binkert.org  int m_transactionSaveRestAborts;
4006145Snate@binkert.org
4016145Snate@binkert.org  int m_transactionLogOverflows;
4026145Snate@binkert.org  int m_transactionCacheOverflows;
4036145Snate@binkert.org
4046145Snate@binkert.org  //---- end Transactional Memory CODE
4056145Snate@binkert.org
4066145Snate@binkert.org  Map<Address, int>* m_watch_address_list_ptr;
4076145Snate@binkert.org  // counts all initiated cache request including PUTs
4086145Snate@binkert.org  int m_requests;
4096145Snate@binkert.org  Map <string, int>* m_requestProfileMap_ptr;
4106145Snate@binkert.org
4116145Snate@binkert.org  Time m_xact_visualizer_last;
4126145Snate@binkert.org
4136145Snate@binkert.org  // added for MemoryControl:
4146145Snate@binkert.org  long long int m_memReq;
4156145Snate@binkert.org  long long int m_memBankBusy;
4166145Snate@binkert.org  long long int m_memBusBusy;
4176145Snate@binkert.org  long long int m_memTfawBusy;
4186145Snate@binkert.org  long long int m_memReadWriteBusy;
4196145Snate@binkert.org  long long int m_memDataBusBusy;
4206145Snate@binkert.org  long long int m_memRefresh;
4216145Snate@binkert.org  long long int m_memRead;
4226145Snate@binkert.org  long long int m_memWrite;
4236145Snate@binkert.org  long long int m_memWaitCycles;
4246145Snate@binkert.org  long long int m_memInputQ;
4256145Snate@binkert.org  long long int m_memBankQ;
4266145Snate@binkert.org  long long int m_memArbWait;
4276145Snate@binkert.org  long long int m_memRandBusy;
4286145Snate@binkert.org  long long int m_memNotOld;
4296145Snate@binkert.org  Vector<long long int> m_memBankCount;
4306145Snate@binkert.org
4316145Snate@binkert.org};
4326145Snate@binkert.org
4336145Snate@binkert.org// Output operator declaration
4346145Snate@binkert.orgostream& operator<<(ostream& out, const Profiler& obj);
4356145Snate@binkert.org
4366145Snate@binkert.org// ******************* Definitions *******************
4376145Snate@binkert.org
4386145Snate@binkert.org// Output operator definition
4396145Snate@binkert.orgextern inline
4406145Snate@binkert.orgostream& operator<<(ostream& out, const Profiler& obj)
4416145Snate@binkert.org{
4426145Snate@binkert.org  obj.print(out);
4436145Snate@binkert.org  out << flush;
4446145Snate@binkert.org  return out;
4456145Snate@binkert.org}
4466145Snate@binkert.org
4476145Snate@binkert.org#endif //PROFILER_H
4486145Snate@binkert.org
4496145Snate@binkert.org
450