fixes for ZAM profiling, which didn't get fully integrated originally

This commit is contained in:
Vern Paxson 2022-02-03 08:59:39 -08:00
parent 94e71b738a
commit 16e9af137f
4 changed files with 27 additions and 2 deletions

View file

@ -578,4 +578,23 @@ void analyze_scripts()
analyze_scripts_for_ZAM(pfs);
}
void profile_script_execution()
{
if ( analysis_options.profile_ZAM )
{
report_ZOP_profile();
for ( auto& f : funcs )
{
if ( f.Body()->Tag() == STMT_ZAM )
cast_intrusive<ZBody>(f.Body())->ProfileExecution();
}
}
}
void finish_script_execution()
{
profile_script_execution();
}
} // namespace zeek::detail