@@ -178,11 +178,11 @@ void printSocketChannelBW(PCM *m, memdata_t *md, uint32 no_columns, uint32 skt)
178178 if (md->PMM )
179179 {
180180 for (uint32 i=skt; i<(skt+no_columns); ++i) {
181- cout << " |-- PMM Reads(MB/s) : " <<setw (8 )<<md->iMC_PMM_Rd_socket_chan [i][channel]<<" --|" ;
181+ cout << " |-- PMM Reads(MB/s) : " <<setw (8 )<<md->iMC_PMM_Rd_socket_chan [i][channel]<<" --|" ;
182182 }
183183 cout << endl;
184184 for (uint32 i=skt; i<(skt+no_columns); ++i) {
185- cout << " |-- PMM Writes(MB/s): " <<setw (8 )<<md->iMC_PMM_Wr_socket_chan [i][channel]<<" --|" ;
185+ cout << " |-- PMM Writes(MB/s) : " <<setw (8 )<<md->iMC_PMM_Wr_socket_chan [i][channel]<<" --|" ;
186186 }
187187 cout << endl;
188188 }
@@ -228,11 +228,11 @@ void printSocketBWFooter(uint32 no_columns, uint32 skt, const memdata_t *md)
228228 if (md->PMM )
229229 {
230230 for (uint32 i=skt; i<(skt+no_columns); ++i) {
231- cout << " |-- NODE" <<setw (2 )<<i<<" PMM Read (MB/s):" <<setw (8 )<<md->iMC_PMM_Rd_socket [i]<<" --|" ;
231+ cout << " |-- NODE" <<setw (2 )<<i<<" PMM Read (MB/s): " <<setw (8 )<<md->iMC_PMM_Rd_socket [i]<<" --|" ;
232232 }
233233 cout << endl;
234234 for (uint32 i=skt; i<(skt+no_columns); ++i) {
235- cout << " |-- NODE" <<setw (2 )<<i<<" PMM Write(MB/s):" <<setw (8 )<<md->iMC_PMM_Wr_socket [i]<<" --|" ;
235+ cout << " |-- NODE" <<setw (2 )<<i<<" PMM Write(MB/s): " <<setw (8 )<<md->iMC_PMM_Wr_socket [i]<<" --|" ;
236236 }
237237 cout << endl;
238238 for (uint32 ctrl = 0 ; ctrl < max_imc_controllers; ++ctrl)
@@ -263,7 +263,7 @@ void printSocketBWFooter(uint32 no_columns, uint32 skt, const memdata_t *md)
263263
264264void display_bandwidth (PCM *m, memdata_t *md, uint32 no_columns, const bool show_channel_output)
265265{
266- float sysRead = 0.0 , sysWrite = 0.0 ;
266+ float sysReadDRAM = 0.0 , sysWriteDRAM = 0.0 , sysReadPMM = 0.0 , sysWritePMM = 0.0 ;
267267 uint32 numSockets = m->getNumSockets ();
268268 uint32 skt = 0 ;
269269 cout.setf (ios::fixed);
@@ -279,10 +279,10 @@ void display_bandwidth(PCM *m, memdata_t *md, uint32 no_columns, const bool show
279279 printSocketChannelBW (m, md, no_columns, skt);
280280 printSocketBWFooter (no_columns, skt, md);
281281 for (uint32 i=skt; i<(skt+no_columns); i++) {
282- sysRead += md->iMC_Rd_socket [i];
283- sysWrite += md->iMC_Wr_socket [i];
284- sysRead += md->iMC_PMM_Rd_socket [i];
285- sysWrite += md->iMC_PMM_Wr_socket [i];
282+ sysReadDRAM += md->iMC_Rd_socket [i];
283+ sysWriteDRAM += md->iMC_Wr_socket [i];
284+ sysReadPMM += md->iMC_PMM_Rd_socket [i];
285+ sysWritePMM += md->iMC_PMM_Wr_socket [i];
286286 }
287287 skt += no_columns;
288288 }
@@ -351,8 +351,8 @@ void display_bandwidth(PCM *m, memdata_t *md, uint32 no_columns, const bool show
351351 \r |---------------------------------------||---------------------------------------|\n \
352352 \r " ;
353353
354- sysRead += (md->iMC_Rd_socket [skt]+md->EDC_Rd_socket [skt]);
355- sysWrite += (md->iMC_Wr_socket [skt]+md->EDC_Wr_socket [skt]);
354+ sysReadDRAM += (md->iMC_Rd_socket [skt]+md->EDC_Rd_socket [skt]);
355+ sysWriteDRAM += (md->iMC_Wr_socket [skt]+md->EDC_Wr_socket [skt]);
356356 skt += 1 ;
357357 }
358358 else
@@ -404,18 +404,25 @@ void display_bandwidth(PCM *m, memdata_t *md, uint32 no_columns, const bool show
404404 \r |---------------------------------------|\n \
405405 \r " ;
406406
407- sysRead += md->iMC_Rd_socket [skt];
408- sysWrite += md->iMC_Wr_socket [skt];
409- sysRead += md->iMC_PMM_Rd_socket [skt];
410- sysWrite += md->iMC_PMM_Wr_socket [skt];
407+ sysReadDRAM += md->iMC_Rd_socket [skt];
408+ sysWriteDRAM += md->iMC_Wr_socket [skt];
409+ sysReadPMM += md->iMC_PMM_Rd_socket [skt];
410+ sysWritePMM += md->iMC_PMM_Wr_socket [skt];
411411 skt += 1 ;
412412 }
413413 }
414414 cout << " \
415- \r |---------------------------------------||---------------------------------------|\n \
416- \r |-- System Read Throughput(MB/s):" <<setw (14 )<<sysRead<<" --|\n \
417- \r |-- System Write Throughput(MB/s):" <<setw (14 )<<sysWrite<<" --|\n \
418- \r |-- System Memory Throughput(MB/s):" <<setw (14 )<<sysRead+sysWrite<<" --|\n \
415+ \r |---------------------------------------||---------------------------------------|\n " ;
416+ if (md->PMM )
417+ cout << " \
418+ \r |-- System DRAM Read Throughput(MB/s):" <<setw (14 )<<sysReadDRAM<<" --|\n \
419+ \r |-- System DRAM Write Throughput(MB/s):" <<setw (14 )<<sysWriteDRAM<<" --|\n \
420+ \r |-- System PMM Read Throughput(MB/s):" <<setw (14 )<<sysReadPMM<<" --|\n \
421+ \r |-- System PMM Write Throughput(MB/s):" <<setw (14 )<<sysWritePMM<<" --|\n " ;
422+ cout << " \
423+ \r |-- System Read Throughput(MB/s):" <<setw (14 )<<sysReadDRAM+sysReadPMM<<" --|\n \
424+ \r |-- System Write Throughput(MB/s):" <<setw (14 )<<sysWriteDRAM+sysWritePMM<<" --|\n \
425+ \r |-- System Memory Throughput(MB/s):" <<setw (14 )<<sysReadDRAM+sysReadPMM+sysWriteDRAM+sysWritePMM<<" --|\n \
419426 \r |---------------------------------------||---------------------------------------|" << endl;
420427 }
421428}
@@ -464,6 +471,8 @@ void display_bandwidth_csv_header(PCM *m, memdata_t *md, const bool show_channel
464471 }
465472
466473 }
474+ if (md->PMM )
475+ cout << " System;System;System;System;" ;
467476 cout << " System;System;System\n " ;
468477
469478 cout << " Date;Time;" ;
@@ -507,6 +516,8 @@ void display_bandwidth_csv_header(PCM *m, memdata_t *md, const bool show_channel
507516 }
508517 }
509518
519+ if (md->PMM )
520+ cout << " DRAMRead;DRAMWrite;PMMREAD;PMMWrite;" ;
510521 cout << " Read;Write;Memory" << endl;
511522}
512523
@@ -519,7 +530,7 @@ void display_bandwidth_csv(PCM *m, memdata_t *md, uint64 elapsedTime, const bool
519530 << tt.tm_hour << ' :' << tt.tm_min << ' :' << tt.tm_sec << ' ;' ;
520531
521532
522- float sysRead = 0.0 , sysWrite = 0.0 ;
533+ float sysReadDRAM = 0.0 , sysWriteDRAM = 0.0 , sysReadPMM = 0.0 , sysWritePMM = 0.0 ;
523534
524535 cout.setf (ios::fixed);
525536 cout.precision (2 );
@@ -556,10 +567,10 @@ void display_bandwidth_csv(PCM *m, memdata_t *md, uint64 elapsedTime, const bool
556567 }
557568 cout << setw (8 ) << md->iMC_Rd_socket [skt]+md->iMC_Wr_socket [skt] <<' ;' ;
558569
559- sysRead += md->iMC_Rd_socket [skt];
560- sysWrite += md->iMC_Wr_socket [skt];
561- sysRead += md->iMC_PMM_Rd_socket [skt];
562- sysWrite += md->iMC_PMM_Wr_socket [skt];
570+ sysReadDRAM += md->iMC_Rd_socket [skt];
571+ sysWriteDRAM += md->iMC_Wr_socket [skt];
572+ sysReadPMM += md->iMC_PMM_Rd_socket [skt];
573+ sysWritePMM += md->iMC_PMM_Wr_socket [skt];
563574
564575 if (m->MCDRAMmemoryTrafficMetricsAvailable ()) {
565576 if (show_channel_output) {
@@ -576,14 +587,20 @@ void display_bandwidth_csv(PCM *m, memdata_t *md, uint64 elapsedTime, const bool
576587 <<setw (8 ) << md->EDC_Wr_socket [skt] <<' ;'
577588 <<setw (8 ) << md->EDC_Rd_socket [skt]+md->EDC_Wr_socket [skt] <<' ;' ;
578589
579- sysRead += md->EDC_Rd_socket [skt];
580- sysWrite += md->EDC_Wr_socket [skt];
590+ sysReadDRAM += md->EDC_Rd_socket [skt];
591+ sysWriteDRAM += md->EDC_Wr_socket [skt];
581592 }
582593 }
583594
584- cout <<setw (10 ) <<sysRead <<' ;'
585- <<setw (10 ) <<sysWrite <<' ;'
586- <<setw (10 ) <<sysRead+sysWrite << endl;
595+ if (md->PMM )
596+ cout <<setw (10 ) <<sysReadDRAM <<' ;'
597+ <<setw (10 ) <<sysWriteDRAM <<' ;'
598+ <<setw (10 ) <<sysReadPMM <<' ;'
599+ <<setw (10 ) <<sysWritePMM <<' ;' ;
600+
601+ cout <<setw (10 ) <<sysReadDRAM+sysReadPMM <<' ;'
602+ <<setw (10 ) <<sysWriteDRAM+sysWritePMM <<' ;'
603+ <<setw (10 ) <<sysReadDRAM+sysReadPMM+sysWriteDRAM+sysWritePMM << endl;
587604}
588605
589606void calculate_bandwidth (PCM *m, const ServerUncorePowerState uncState1[], const ServerUncorePowerState uncState2[], uint64 elapsedTime, bool csv, bool & csvheader, uint32 no_columns, bool PMM, const bool show_channel_output)
0 commit comments