mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Improve --prof-exec infrastructure and report
Again --prof-exec have bit-rotted a little with all the recent changes to the structure of the generated code. This patch contains a few improvements: - Repalce the eval/evl_loop begin/end events with generic section_push/section_pop events, that can be arbitrarily sprinkled into the generate code (so long as they are matched correctly) to measure various sections. The report then contains a nested profile of the sections, and the VCD trace shows the section names. - Better handling of exec graphs - Clearer overall statistics
This commit is contained in:
@@ -403,7 +403,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
|
||||
if (v3Global.opt.profExec()) {
|
||||
puts("vlSymsp->__Vm_executionProfilerp->configure();\n");
|
||||
puts("VL_EXEC_TRACE_ADD_RECORD(vlSymsp).evalBegin();\n");
|
||||
puts("VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPush(\"eval\");\n");
|
||||
}
|
||||
|
||||
puts("VL_DEBUG_IF(VL_DBG_MSGF(\"+ Eval\\n\"););\n");
|
||||
@@ -412,7 +412,7 @@ class EmitCModel final : public EmitCFunc {
|
||||
putsDecoration("// Evaluate cleanup\n");
|
||||
puts("Verilated::endOfEval(vlSymsp->__Vm_evalMsgQp);\n");
|
||||
|
||||
if (v3Global.opt.profExec()) puts("VL_EXEC_TRACE_ADD_RECORD(vlSymsp).evalEnd();\n");
|
||||
if (v3Global.opt.profExec()) puts("VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPop();\n");
|
||||
puts("}\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user