mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Factor out --prof-exec section handling, add debug code
This commit is contained in:
+3
-6
@@ -156,14 +156,11 @@ AstCFunc* V3Order::order(AstNetlist* netlistp, //
|
||||
|
||||
// Assemble the body
|
||||
if (v3Global.opt.profExec()) {
|
||||
const std::string name
|
||||
= (v3Global.opt.hierChild() ? (v3Global.opt.topModule() + " ") : "") + "func " + tag;
|
||||
funcp->addStmtsp(
|
||||
new AstCStmt{flp, "VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPush(\"" + name + "\");"});
|
||||
funcp->addStmtsp(AstCStmt::profExecSectionPush(flp, "func " + tag));
|
||||
}
|
||||
funcp->addStmtsp(stmtsp);
|
||||
if (v3Global.opt.profExec()) {
|
||||
funcp->addStmtsp(new AstCStmt{flp, "VL_EXEC_TRACE_ADD_RECORD(vlSymsp).sectionPop();"});
|
||||
if (v3Global.opt.profExec()) { //
|
||||
funcp->addStmtsp(AstCStmt::profExecSectionPop(flp, "func " + tag));
|
||||
}
|
||||
|
||||
// Done
|
||||
|
||||
Reference in New Issue
Block a user