diff --git a/pando-drv/element/DrvCore.hpp b/pando-drv/element/DrvCore.hpp index 1a29623a..aa212308 100644 --- a/pando-drv/element/DrvCore.hpp +++ b/pando-drv/element/DrvCore.hpp @@ -562,7 +562,7 @@ class DrvCore : public SST::Component { void outputPhaseStatistics() { output_->verbose(CALL_INFO, 1, DEBUG_CLK, "writing phase statistics\n"); - performStatFileOutput("Dump " + std::to_string(stat_dump_cnt_)); + performStatFileOutput("Dump," + std::to_string(stat_dump_cnt_)); stat_dump_cnt_++; performGlobalStatisticOutput(); } diff --git a/pando-drv/tests/PANDOHammerDrvX.py b/pando-drv/tests/PANDOHammerDrvX.py index bfb46e37..ab7a46c3 100644 --- a/pando-drv/tests/PANDOHammerDrvX.py +++ b/pando-drv/tests/PANDOHammerDrvX.py @@ -26,6 +26,34 @@ DrvXTile.enableAllCoreStats() if (arguments.all_stats): sst.enableAllStatisticsForAllComponents() +if (arguments.perf_stats): + sst.enableStatisticsForComponentType( + "Drv.DrvCore", + ["total_stall_cycles_when_ready", + "total_stall_cycles", + "total_busy_cycles", + "phase_comp_stall_cycles_when_ready", + "phase_comm_stall_cycles_when_ready", + "phase_stall_cycles", + "phase_busy_cycles"]) + sst.enableStatisticsForComponentType( + "memHierarchy.MemNIC", + ["send_bit_count", + "recv_bit_count", + "output_port_stalls", + "idle_time"]) + sst.enableStatisticsForComponentType( + "merlin.hr_router", + ["send_bit_count", + "recv_bit_count", + "output_port_stalls", + "idle_time"]) + sst.enableStatisticsForComponentType( + "merlin.Bridge", + ["send_bit_count", + "recv_bit_count", + "output_port_stalls", + "idle_time"]) sst.setStatisticLoadLevel(arguments.stats_load_level) sst.setStatisticOutput("sst.statOutputCSV", {"filepath" : "stats.csv", "separator" : ","}) diff --git a/pando-drv/tests/drv.py b/pando-drv/tests/drv.py index 13335b23..ee696a3f 100644 --- a/pando-drv/tests/drv.py +++ b/pando-drv/tests/drv.py @@ -64,6 +64,7 @@ def set_bits(word, hi, lo, value): parser.add_argument("--test-name", type=str, default="", help="Name of the test") parser.add_argument("--core-stats", action="store_true", help="enable core statistics") parser.add_argument("--all-stats", action="store_true", help="enable all statistics") +parser.add_argument("--perf-stats", action="store_true", help="enable performance statistics") parser.add_argument("--stats-load-level", type=int, default=0, help="load level for statistics") parser.add_argument("--stats-preallocated-phase", type=int, default=16, help="preallocated number of phases for statistics") parser.add_argument("--trace-remote-pxn-memory", action="store_true", help="trace remote pxn memory accesses") diff --git a/scripts/run-drv.sh b/scripts/run-drv.sh index bbdd168d..98e888b5 100755 --- a/scripts/run-drv.sh +++ b/scripts/run-drv.sh @@ -90,7 +90,7 @@ ${DBG} sst -n ${HOST_THREADS} \ --core-threads=${HARTS} \ --drvx-stack-in-l1sp \ --pxn-dram-size=${MAIN_MEMORY_SIZE} \ - --all-stats \ + --perf-stats \ --stats-load-level=5 \ - --stats-preallocated-phase=2 \ + --stats-preallocated-phase=64 \ ${PROG} $@ diff --git a/sst-core-src/src/sst/core/statapi/statengine.cc b/sst-core-src/src/sst/core/statapi/statengine.cc index f81bf9d1..3abe6ba0 100644 --- a/sst-core-src/src/sst/core/statapi/statengine.cc +++ b/sst-core-src/src/sst/core/statapi/statengine.cc @@ -211,7 +211,7 @@ StatisticProcessingEngine::endOfSimulation() // will cause all of this code to be executed anyway // so really we are double dumping the end-of-time stats - output_to_stat_file("Simulation End"); + output_to_stat_file("Dump,Last"); // Output the Event based Statistics for ( StatisticBase* stat : m_EventStatisticArray ) { diff --git a/sst-elements-src/src/sst/elements/memHierarchy/membackend/memBackendConvertor.cc b/sst-elements-src/src/sst/elements/memHierarchy/membackend/memBackendConvertor.cc index 5d4e6e53..fecb0a0b 100644 --- a/sst-elements-src/src/sst/elements/memHierarchy/membackend/memBackendConvertor.cc +++ b/sst-elements-src/src/sst/elements/memHierarchy/membackend/memBackendConvertor.cc @@ -72,6 +72,40 @@ MemBackendConvertor::MemBackendConvertor(ComponentId_t id, Params& params, MemBa stat_cyclesAttemptIssueButRejected = registerStatistic( "cycles_attempted_issue_but_rejected" ); stat_totalCycles = registerStatistic( "total_cycles" ); + stat_GetSReqReceived->setFlagResetCountOnOutput(true); + stat_GetSXReqReceived->setFlagResetCountOnOutput(true); + stat_GetXReqReceived->setFlagResetCountOnOutput(true); + stat_WriteReqReceived->setFlagResetCountOnOutput(true); + stat_PutMReqReceived->setFlagResetCountOnOutput(true); + stat_outstandingReqs->setFlagResetCountOnOutput(true); + stat_ReqSent->setFlagResetCountOnOutput(true); + stat_ACMReqSent->setFlagResetCountOnOutput(true); + stat_GetSLatency->setFlagResetCountOnOutput(true); + stat_GetSXLatency->setFlagResetCountOnOutput(true); + stat_GetXLatency->setFlagResetCountOnOutput(true); + stat_WriteLatency->setFlagResetCountOnOutput(true); + stat_PutMLatency->setFlagResetCountOnOutput(true); + stat_cyclesWithIssue->setFlagResetCountOnOutput(true); + stat_cyclesAttemptIssueButRejected->setFlagResetCountOnOutput(true); + stat_totalCycles->setFlagResetCountOnOutput(true); + + stat_GetSReqReceived->setFlagClearDataOnOutput(true); + stat_GetSXReqReceived->setFlagClearDataOnOutput(true); + stat_GetXReqReceived->setFlagClearDataOnOutput(true); + stat_WriteReqReceived->setFlagClearDataOnOutput(true); + stat_PutMReqReceived->setFlagClearDataOnOutput(true); + stat_outstandingReqs->setFlagClearDataOnOutput(true); + stat_ReqSent->setFlagClearDataOnOutput(true); + stat_ACMReqSent->setFlagClearDataOnOutput(true); + stat_GetSLatency->setFlagClearDataOnOutput(true); + stat_GetSXLatency->setFlagClearDataOnOutput(true); + stat_GetXLatency->setFlagClearDataOnOutput(true); + stat_WriteLatency->setFlagClearDataOnOutput(true); + stat_PutMLatency->setFlagClearDataOnOutput(true); + stat_cyclesWithIssue->setFlagClearDataOnOutput(true); + stat_cyclesAttemptIssueButRejected->setFlagClearDataOnOutput(true); + stat_totalCycles->setFlagClearDataOnOutput(true); + m_clockOn = true; /* Maybe parent should set this */ // NOTE: m_secEnabled: 0 - security primitives disabled, 1 - security primitives enabled (needs m_aesEncryptOrDecrypt options to behave correctly) m_secEnabled = params.find("aes_enable_security", 0); diff --git a/sst-elements-src/src/sst/elements/merlin/bridge.h b/sst-elements-src/src/sst/elements/merlin/bridge.h index f39a9da2..aacddba5 100644 --- a/sst-elements-src/src/sst/elements/merlin/bridge.h +++ b/sst-elements-src/src/sst/elements/merlin/bridge.h @@ -226,6 +226,12 @@ class Bridge : public SST::Component { nic.stat_recv = registerStatistic("pkts_received_net" + std::to_string(id)); nic.stat_send = registerStatistic("pkts_sent_net" + std::to_string(id)); + + nic.stat_recv->setFlagResetCountOnOutput(true); + nic.stat_send->setFlagResetCountOnOutput(true); + + nic.stat_recv->setFlagClearDataOnOutput(true); + nic.stat_send->setFlagClearDataOnOutput(true); } bool handleIncoming(int vn, uint8_t id) diff --git a/sst-elements-src/src/sst/elements/merlin/hr_router/hr_router.cc b/sst-elements-src/src/sst/elements/merlin/hr_router/hr_router.cc index fda5d192..aec803a3 100644 --- a/sst-elements-src/src/sst/elements/merlin/hr_router/hr_router.cc +++ b/sst-elements-src/src/sst/elements/merlin/hr_router/hr_router.cc @@ -305,6 +305,9 @@ hr_router::hr_router(ComponentId_t cid, Params& params) : std::string port_name("port"); port_name = port_name + std::to_string(i); xbar_stalls[i] = registerStatistic("xbar_stalls",port_name); + + xbar_stalls[i]->setFlagResetCountOnOutput(true); + xbar_stalls[i]->setFlagClearDataOnOutput(true); } init_vcs(); diff --git a/sst-elements-src/src/sst/elements/merlin/interfaces/linkControl.cc b/sst-elements-src/src/sst/elements/merlin/interfaces/linkControl.cc index 4fac605c..bfa57e6d 100644 --- a/sst-elements-src/src/sst/elements/merlin/interfaces/linkControl.cc +++ b/sst-elements-src/src/sst/elements/merlin/interfaces/linkControl.cc @@ -149,6 +149,18 @@ LinkControl::LinkControl(ComponentId_t cid, Params ¶ms, int vns) : output_port_stalls = registerStatistic("output_port_stalls"); idle_time = registerStatistic("idle_time"); + packet_latency->setFlagResetCountOnOutput(true); + send_bit_count->setFlagResetCountOnOutput(true); + recv_bit_count->setFlagResetCountOnOutput(true); + output_port_stalls->setFlagResetCountOnOutput(true); + idle_time->setFlagResetCountOnOutput(true); + + packet_latency->setFlagClearDataOnOutput(true); + send_bit_count->setFlagClearDataOnOutput(true); + recv_bit_count->setFlagClearDataOnOutput(true); + output_port_stalls->setFlagClearDataOnOutput(true); + idle_time->setFlagClearDataOnOutput(true); + last_time = 0; last_recv_time = 0; } diff --git a/sst-elements-src/src/sst/elements/merlin/interfaces/portControl.cc b/sst-elements-src/src/sst/elements/merlin/interfaces/portControl.cc index 81ca9097..5773ccef 100644 --- a/sst-elements-src/src/sst/elements/merlin/interfaces/portControl.cc +++ b/sst-elements-src/src/sst/elements/merlin/interfaces/portControl.cc @@ -412,6 +412,22 @@ PortControl::PortControl(ComponentId_t cid, Params& params, Router* rif, int rt idle_time = registerStatistic("idle_time", port_name); width_adj_count = registerStatistic("width_adj_count", port_name); + send_bit_count->setFlagResetCountOnOutput(true); + recv_bit_count->setFlagResetCountOnOutput(true); + send_packet_count->setFlagResetCountOnOutput(true); + recv_packet_count->setFlagResetCountOnOutput(true); + output_port_stalls->setFlagResetCountOnOutput(true); + idle_time->setFlagResetCountOnOutput(true); + width_adj_count->setFlagResetCountOnOutput(true); + + send_bit_count->setFlagClearDataOnOutput(true); + recv_bit_count->setFlagClearDataOnOutput(true); + send_packet_count->setFlagClearDataOnOutput(true); + recv_packet_count->setFlagClearDataOnOutput(true); + output_port_stalls->setFlagClearDataOnOutput(true); + idle_time->setFlagClearDataOnOutput(true); + width_adj_count->setFlagClearDataOnOutput(true); + // set the SAI metrics to 0 stalled = 0; active = 0;