@@ -563,9 +563,9 @@ namespace PCMDaemon {
563
563
for (uint32 channel (0 ); channel < MEMORY_MAX_IMC_CHANNELS; ++channel)
564
564
{
565
565
// In case of JKT-EN, there are only three channels. Skip one and continue.
566
- bool memoryReadAvailable = getMCCounter (channel,MEMORY_READ,serverUncoreCounterStatesBefore_[skt],serverUncoreCounterStatesAfter_[skt]) == 0. 0 ;
567
- bool memoryWriteAvailable = getMCCounter (channel,MEMORY_WRITE,serverUncoreCounterStatesBefore_[skt],serverUncoreCounterStatesAfter_[skt]) == 0. 0 ;
568
- if (memoryReadAvailable && memoryWriteAvailable )
566
+ const bool memoryReadNotAvailable = getMCCounter (channel,MEMORY_READ,serverUncoreCounterStatesBefore_[skt],serverUncoreCounterStatesAfter_[skt]) == 0 ;
567
+ const bool memoryWriteNotAvailable = getMCCounter (channel,MEMORY_WRITE,serverUncoreCounterStatesBefore_[skt],serverUncoreCounterStatesAfter_[skt]) == 0 ;
568
+ if (memoryReadNotAvailable && memoryWriteNotAvailable )
569
569
{
570
570
iMC_Rd_socket_chan[skt][channel] = -1.0 ;
571
571
iMC_Wr_socket_chan[skt][channel] = -1.0 ;
@@ -593,11 +593,11 @@ namespace PCMDaemon {
593
593
for (uint64 channel (0 ); channel < MEMORY_MAX_IMC_CHANNELS; ++channel)
594
594
{
595
595
// If the channel read neg. value, the channel is not working; skip it.
596
- if (iMC_Rd_socket_chan[0 ][skt*MEMORY_MAX_IMC_CHANNELS+ channel] < 0.0 && iMC_Wr_socket_chan[0 ][skt*MEMORY_MAX_IMC_CHANNELS+ channel] < 0.0 )
596
+ if (iMC_Rd_socket_chan[skt][ channel] < 0.0 && iMC_Wr_socket_chan[skt][ channel] < 0.0 )
597
597
continue ;
598
598
599
- float socketChannelRead = iMC_Rd_socket_chan[0 ][skt*MEMORY_MAX_IMC_CHANNELS+ channel];
600
- float socketChannelWrite = iMC_Wr_socket_chan[0 ][skt*MEMORY_MAX_IMC_CHANNELS+ channel];
599
+ const float socketChannelRead = iMC_Rd_socket_chan[skt][ channel];
600
+ const float socketChannelWrite = iMC_Wr_socket_chan[skt][ channel];
601
601
602
602
memory.sockets [onlineSocketsI].channels [currentChannelI].read = socketChannelRead;
603
603
memory.sockets [onlineSocketsI].channels [currentChannelI].write = socketChannelWrite;
@@ -611,7 +611,7 @@ namespace PCMDaemon {
611
611
memory.sockets [onlineSocketsI].read = iMC_Rd_socket[skt];
612
612
memory.sockets [onlineSocketsI].write = iMC_Wr_socket[skt];
613
613
memory.sockets [onlineSocketsI].total = iMC_Rd_socket[skt] + iMC_Wr_socket[skt];
614
- if (memory.dramEnergyMetricsAvailable )
614
+ if (memory.dramEnergyMetricsAvailable )
615
615
{
616
616
memory.sockets [onlineSocketsI].dramEnergy = getDRAMConsumedJoules (socketStatesBefore_[skt], socketStatesAfter_[skt]);
617
617
}
@@ -731,5 +731,4 @@ namespace PCMDaemon {
731
731
}
732
732
}
733
733
}
734
-
735
734
}
0 commit comments