Profiler.cc (6288:083a6806dd96) Profiler.cc (6372:f1a41ea3bbab)
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;

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

93 }
94*/
95 m_conflicting_map_ptr = new Map<Address, Time>;
96
97 m_real_time_start_time = time(NULL); // Not reset in clearStats()
98 m_stats_period = 1000000; // Default
99 m_periodic_output_file_ptr = &cerr;
100
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;

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

93 }
94*/
95 m_conflicting_map_ptr = new Map<Address, Time>;
96
97 m_real_time_start_time = time(NULL); // Not reset in clearStats()
98 m_stats_period = 1000000; // Default
99 m_periodic_output_file_ptr = &cerr;
100
101//changed by SS
102/*
103 // for MemoryControl:
104 m_memReq = 0;
105 m_memBankBusy = 0;
106 m_memBusBusy = 0;
107 m_memReadWriteBusy = 0;
108 m_memDataBusBusy = 0;
109 m_memTfawBusy = 0;
110 m_memRefresh = 0;
111 m_memRead = 0;
112 m_memWrite = 0;
113 m_memWaitCycles = 0;
114 m_memInputQ = 0;
115 m_memBankQ = 0;
116 m_memArbWait = 0;
117 m_memRandBusy = 0;
118 m_memNotOld = 0;
119
120
121 int totalBanks = RubyConfig::banksPerRank()
122 * RubyConfig::ranksPerDimm()
123 * RubyConfig::dimmsPerChannel();
124 m_memBankCount.setSize(totalBanks);
125*/
126}
127
128Profiler::~Profiler()
129{
130 if (m_periodic_output_file_ptr != &cerr) {
131 delete m_periodic_output_file_ptr;
132 }
133 delete m_address_profiler_ptr;

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

865
866void Profiler::addAddressTraceSample(const CacheMsg& msg, NodeID id)
867{
868 if (msg.getType() != CacheRequestType_IFETCH) {
869
870 // Note: The following line should be commented out if you want to
871 // use the special profiling that is part of the GS320 protocol
872
101}
102
103Profiler::~Profiler()
104{
105 if (m_periodic_output_file_ptr != &cerr) {
106 delete m_periodic_output_file_ptr;
107 }
108 delete m_address_profiler_ptr;

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

840
841void Profiler::addAddressTraceSample(const CacheMsg& msg, NodeID id)
842{
843 if (msg.getType() != CacheRequestType_IFETCH) {
844
845 // Note: The following line should be commented out if you want to
846 // use the special profiling that is part of the GS320 protocol
847
873 // NOTE: Unless PROFILE_HOT_LINES or RubyConfig::getProfileAllInstructions() are enabled, nothing will be profiled by the AddressProfiler
848 // NOTE: Unless PROFILE_HOT_LINES is enabled, nothing will be profiled by the AddressProfiler
874 m_address_profiler_ptr->addTraceSample(msg.getLineAddress(), msg.getProgramCounter(), msg.getType(), msg.getAccessMode(), id, false);
875 }
876}
877
878void Profiler::profileSharing(const Address& addr, AccessType type, NodeID requestor, const Set& sharers, const Set& owner)
879{
880 Set set_contacted(owner);
881 if (type == AccessType_Write) {

--- 273 unchanged lines hidden ---
849 m_address_profiler_ptr->addTraceSample(msg.getLineAddress(), msg.getProgramCounter(), msg.getType(), msg.getAccessMode(), id, false);
850 }
851}
852
853void Profiler::profileSharing(const Address& addr, AccessType type, NodeID requestor, const Set& sharers, const Set& owner)
854{
855 Set set_contacted(owner);
856 if (type == AccessType_Write) {

--- 273 unchanged lines hidden ---