@@ -846,7 +846,7 @@ int calibratedSleep(const double delay, const char* sysCmd, const MainLoop& main
846
846
{
847
847
if (delay_ms > 0 )
848
848
{
849
- // std::cerr << "DEBUG: sleeping for " << std::dec << delay_ms << " ms...\n" ;
849
+ DBG ( 1 , " sleeping for " , std::dec , delay_ms , " ms..." ) ;
850
850
MySleepMs (delay_ms);
851
851
}
852
852
}
@@ -1261,7 +1261,7 @@ int load_events(const std::string &fn, std::map<std::string, uint32_t> &ofm,
1261
1261
nameMap[h_name] = nameMap_value;
1262
1262
}
1263
1263
ctr.h_id = (uint32_t )nameMap.size () - 1 ;
1264
- // cout << "h_name:" << ctr.h_event_name << "h_id: "<< ctr.h_id << "\n" ;
1264
+ DBG ( 2 , " h_name:" , ctr.h_event_name , " h_id: " , ctr.h_id ) ;
1265
1265
break ;
1266
1266
case PCM::V_EVENT_NAME:
1267
1267
{
@@ -1273,7 +1273,7 @@ int load_events(const std::string &fn, std::map<std::string, uint32_t> &ofm,
1273
1273
if (v_nameMap.find (v_name) == v_nameMap.end ())
1274
1274
{
1275
1275
v_nameMap[v_name] = (unsigned int )v_nameMap.size () - 1 ;
1276
- // cout << "v_name(" << v_name << ")="<< v_nameMap[v_name] << "\n" ;
1276
+ DBG ( 2 , " v_name(" , v_name , " )=" , v_nameMap[v_name]) ;
1277
1277
}
1278
1278
else
1279
1279
{
@@ -1282,7 +1282,7 @@ int load_events(const std::string &fn, std::map<std::string, uint32_t> &ofm,
1282
1282
throw std::invalid_argument (err_msg);
1283
1283
}
1284
1284
ctr.v_id = (uint32_t )v_nameMap.size () - 1 ;
1285
- // cout << "h_name:" << ctr.h_event_name << ",hid=" << ctr.h_id << ",v_name:" << ctr.v_event_name << ",v_id: "<< ctr.v_id << "\n" ;
1285
+ DBG ( 2 , " h_name:" , ctr.h_event_name , " ,hid=" , ctr.h_id , " ,v_name:" , ctr.v_event_name , " ,v_id: " , ctr.v_id ) ;
1286
1286
break ;
1287
1287
}
1288
1288
// TODO: double type for multiplier. drop divider variable
@@ -1307,7 +1307,7 @@ int load_events(const std::string &fn, std::map<std::string, uint32_t> &ofm,
1307
1307
}
1308
1308
}
1309
1309
1310
- // std::cout << "Finish parsing: " << line << "\n" ;
1310
+ DBG ( 2 , " Finished parsing: " , line) ;
1311
1311
if (pfn_evtcb (EVT_LINE_COMPLETE, evtcb_ctx, ctr, ofm, " " , 0 ))
1312
1312
{
1313
1313
in.close ();
@@ -1331,7 +1331,7 @@ int load_events(const std::string &fn, std::map<std::string, uint32_t> &ofm,
1331
1331
1332
1332
bool get_cpu_bus (uint32 msmDomain, uint32 msmBus, uint32 msmDev, uint32 msmFunc, uint32 &cpuBusValid, std::vector<uint32> &cpuBusNo, int &cpuPackageId)
1333
1333
{
1334
- // std::cout << "get_cpu_bus: d=" << std::hex << msmDomain << ",b=" << msmBus << ",d=" << msmDev << ",f=" << msmFunc << std::dec << " \n" ;
1334
+ DBG ( 2 , " get_cpu_bus: d=" , std::hex , msmDomain , " ,b=" , msmBus , " ,d=" , msmDev , " ,f=" , msmFunc , std::dec ) ;
1335
1335
try
1336
1336
{
1337
1337
PciHandleType h (msmDomain, msmBus, msmDev, msmFunc);
@@ -1483,7 +1483,7 @@ bool readMapFromSysFS(const char * path, std::unordered_map<std::string, uint32>
1483
1483
std::istringstream iss2 (value);
1484
1484
iss2 >> std::setbase (0 ) >> numValue;
1485
1485
result.insert (std::pair<std::string, uint32>(key, numValue));
1486
- // std::cerr << "readMapFromSysFS:" << key << "=" << numValue << ".\n" ;
1486
+ DBG ( 3 , " readMapFromSysFS:" , key , " =" , numValue , " ." ) ;
1487
1487
}
1488
1488
1489
1489
fclose (f);
0 commit comments