@@ -158,13 +158,13 @@ class MMIORegister64 : public HWRegister
158
158
}
159
159
void operator = (uint64 val) override
160
160
{
161
- // std::cout << std:: hex << "MMIORegister64 writing " << val << " at offset " << offset << std::dec << std::endl ;
161
+ DBG ( 4 , std::hex , " MMIORegister64 writing " , val , " at offset " , offset , std::dec) ;
162
162
handle->write64 (offset, val);
163
163
}
164
164
operator uint64 () override
165
165
{
166
166
const uint64 val = handle->read64 (offset);
167
- // std::cout << std:: hex << "MMIORegister64 read " << val << " from offset " << offset << std::dec << std::endl ;
167
+ DBG ( 4 , std::hex , " MMIORegister64 read " , val , " from offset " , offset , std::dec) ;
168
168
return val;
169
169
}
170
170
};
@@ -181,13 +181,13 @@ class MMIORegister32 : public HWRegister
181
181
}
182
182
void operator = (uint64 val) override
183
183
{
184
- // std::cout << std:: hex << "MMIORegister32 writing " << val << " at offset " << offset << std::dec << std::endl ;
184
+ DBG ( 4 , std::hex , " MMIORegister32 writing " , val , " at offset " , offset , std::dec) ;
185
185
handle->write32 (offset, (uint32)val);
186
186
}
187
187
operator uint64 () override
188
188
{
189
189
const uint64 val = (uint64)handle->read32 (offset);
190
- // std::cout << std:: hex << "MMIORegister32 read " << val << " from offset " << offset << std::dec << std::endl ;
190
+ DBG ( 4 , std::hex , " MMIORegister32 read " , val , " from offset " , offset , std::dec) ;
191
191
return val;
192
192
}
193
193
};
@@ -210,7 +210,7 @@ class MSRRegister : public HWRegister
210
210
{
211
211
uint64 value = 0 ;
212
212
handle->read (offset, &value);
213
- // std::cout << "reading MSR " << offset << " returning " << value << std::endl ;
213
+ DBG ( 4 , " reading MSR " , offset , " returning " , value) ;
214
214
return value;
215
215
}
216
216
};
@@ -767,7 +767,7 @@ class PCM_API PCM
767
767
auto & pmu = pmuIter->second [unit];
768
768
for (size_t i = 0 ; pmu.get () != nullptr && i < pmu->size (); ++i)
769
769
{
770
- // std::cerr << "s " << socket << " d " << die << " pmu " << pmu_id << " unit " << unit << " ctr " << i << "\n" ;
770
+ DBG ( 4 , " s " , socket , " d " , die , " pmu " , pmu_id , " unit " , unit , " ctr " , i ) ;
771
771
result.Counters [die][pmu_id][unit][i] = *(pmu->counterValue [i]);
772
772
}
773
773
}
@@ -3108,7 +3108,7 @@ class BasicCounterState
3108
3108
MemoryBWLocal += o.MemoryBWLocal ;
3109
3109
MemoryBWTotal += o.MemoryBWTotal ;
3110
3110
SMICount += o.SMICount ;
3111
- // std::cout << "before PCM debug aggregate "<< FrontendBoundSlots << " " << BadSpeculationSlots << " " << BackendBoundSlots << " " << RetiringSlots << std::endl ;
3111
+ DBG ( 4 , " before PCM debug aggregate " , FrontendBoundSlots , " " , BadSpeculationSlots , " " , BackendBoundSlots , " " , RetiringSlots ) ;
3112
3112
BasicCounterState old = *this ;
3113
3113
FrontendBoundSlots += o.FrontendBoundSlots ;
3114
3114
BadSpeculationSlots += o.BadSpeculationSlots ;
@@ -3119,7 +3119,7 @@ class BasicCounterState
3119
3119
FetchLatSlots += o.FetchLatSlots ;
3120
3120
BrMispredSlots += o.BrMispredSlots ;
3121
3121
HeavyOpsSlots += o.HeavyOpsSlots ;
3122
- // std::cout << "after PCM debug aggregate "<< FrontendBoundSlots << " " << BadSpeculationSlots << " " << BackendBoundSlots << " " << RetiringSlots << std::endl ;
3122
+ DBG ( 4 , " after PCM debug aggregate " , FrontendBoundSlots , " " , BadSpeculationSlots , " " , BackendBoundSlots , " " , RetiringSlots) ;
3123
3123
assert (FrontendBoundSlots >= old.FrontendBoundSlots );
3124
3124
assert (BadSpeculationSlots >= old.BadSpeculationSlots );
3125
3125
assert (BackendBoundSlots >= old.BackendBoundSlots );
@@ -5144,7 +5144,7 @@ inline double getLocalMemoryRequestRatio(const CounterStateType & before, const
5144
5144
if (PCM::getInstance ()->localMemoryRequestRatioMetricAvailable () == false ) return -1 .;
5145
5145
const auto all = after.UncHARequests - before.UncHARequests ;
5146
5146
const auto local = after.UncHALocalRequests - before.UncHALocalRequests ;
5147
- // std::cout << "PCM DEBUG "<< 64*all/1e6 << " " << 64*local/1e6 << "\n" ;
5147
+ DBG ( 4 , 64 *all/1e6 , " " , 64 *local/1e6 ) ;
5148
5148
return double (local)/double (all);
5149
5149
}
5150
5150
@@ -5183,8 +5183,8 @@ inline uint64 getAllSlots(const CounterStateType & before, const CounterStateTyp
5183
5183
const int64 b = after.FrontendBoundSlots - before.FrontendBoundSlots ;
5184
5184
const int64 c = after.BadSpeculationSlots - before.BadSpeculationSlots ;
5185
5185
const int64 d = after.RetiringSlots - before.RetiringSlots ;
5186
- // std::cout << "before DEBUG : " << before.FrontendBoundSlots << " " << before.BadSpeculationSlots << " "<< before.BackendBoundSlots << " " << before.RetiringSlots << std::endl ;
5187
- // std::cout << "after DEBUG : " << after.FrontendBoundSlots << " " << after.BadSpeculationSlots << " " << after.BackendBoundSlots << " " << after.RetiringSlots << std::endl ;
5186
+ DBG ( 4 , " before: " , before.FrontendBoundSlots , " " , before.BadSpeculationSlots , " " , before.BackendBoundSlots , " " , before.RetiringSlots ) ;
5187
+ DBG ( 4 , " afterG : " , after.FrontendBoundSlots , " " , after.BadSpeculationSlots , " " , after.BackendBoundSlots , " " , after.RetiringSlots ) ;
5188
5188
assert (a >= 0 );
5189
5189
assert (b >= 0 );
5190
5190
assert (c >= 0 );
@@ -5202,7 +5202,7 @@ inline uint64 getAllSlotsRaw(const CounterStateType& before, const CounterStateT
5202
5202
template <class CounterStateType >
5203
5203
inline double getBackendBound (const CounterStateType & before, const CounterStateType & after)
5204
5204
{
5205
- // std::cout << "DEBUG: "<< after.BackendBoundSlots - before.BackendBoundSlots << " " << getAllSlots(before, after) << std::endl ;
5205
+ DBG ( 4 , ( after.BackendBoundSlots - before.BackendBoundSlots ) , " " , getAllSlots (before, after)) ;
5206
5206
if (PCM::getInstance ()->isHWTMAL1Supported ())
5207
5207
return double (after.BackendBoundSlots - before.BackendBoundSlots )/double (getAllSlots (before, after));
5208
5208
return 0 .;
@@ -5230,7 +5230,7 @@ inline double getCoreBound(const CounterStateType & before, const CounterStateTy
5230
5230
template <class CounterStateType >
5231
5231
inline double getFrontendBound (const CounterStateType & before, const CounterStateType & after)
5232
5232
{
5233
- // std::cout << "DEBUG: "<< after.FrontendBoundSlots - before.FrontendBoundSlots << " " << getAllSlots(before, after) << std::endl ;
5233
+ DBG ( 4 , ( after.FrontendBoundSlots - before.FrontendBoundSlots ) , " " , getAllSlots (before, after)) ;
5234
5234
if (PCM::getInstance ()->isHWTMAL1Supported ())
5235
5235
return double (after.FrontendBoundSlots - before.FrontendBoundSlots )/double (getAllSlots (before, after));
5236
5236
return 0 .;
@@ -5258,7 +5258,7 @@ inline double getFetchBandwidthBound(const CounterStateType & before, const Coun
5258
5258
template <class CounterStateType >
5259
5259
inline double getBadSpeculation (const CounterStateType & before, const CounterStateType & after)
5260
5260
{
5261
- // std::cout << "DEBUG: "<< after.BadSpeculationSlots - before.BadSpeculationSlots << " " << getAllSlots(before, after) << std::endl ;
5261
+ DBG ( 4 , ( after.BadSpeculationSlots - before.BadSpeculationSlots ) , " " , getAllSlots (before, after)) ;
5262
5262
if (PCM::getInstance ()->isHWTMAL1Supported ())
5263
5263
return double (after.BadSpeculationSlots - before.BadSpeculationSlots )/double (getAllSlots (before, after));
5264
5264
return 0 .;
@@ -5286,7 +5286,7 @@ inline double getMachineClearsBound(const CounterStateType & before, const Count
5286
5286
template <class CounterStateType >
5287
5287
inline double getRetiring (const CounterStateType & before, const CounterStateType & after)
5288
5288
{
5289
- // std::cout << "DEBUG: "<< after.RetiringSlots - before.RetiringSlots << " " << getAllSlots(before, after) << std::endl ;
5289
+ DBG ( 4 , ( after.RetiringSlots - before.RetiringSlots ) , " " , getAllSlots (before, after)) ;
5290
5290
if (PCM::getInstance ()->isHWTMAL1Supported ())
5291
5291
return double (after.RetiringSlots - before.RetiringSlots )/double (getAllSlots (before, after));
5292
5292
return 0 .;
0 commit comments