avoid script coverage overhead (especially memory) when using ZAM

This commit is contained in:
Vern Paxson 2023-07-20 10:28:33 -07:00
parent 3f64858335
commit 2355f5af47
2 changed files with 7 additions and 2 deletions

View file

@ -845,7 +845,8 @@ void end_func(StmtPtr body, const char* module_name, bool free_of_conditionals)
id->GetVal()->AsFunc()->AddBody(*ingredients);
script_coverage_mgr.AddFunction(id, ingredients->Body());
if ( ! analysis_options.gen_ZAM )
script_coverage_mgr.AddFunction(id, ingredients->Body());
auto func_ptr = cast_intrusive<FuncVal>(id->GetVal())->AsFuncPtr();
auto func = cast_intrusive<ScriptFunc>(func_ptr);