mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
extend ZEEK_PROFILER_FILE profiling to include summaries for functions/hooks/event handlers
This commit is contained in:
parent
32926e8def
commit
5b98538c8b
6 changed files with 67 additions and 28 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "zeek/IntrusivePtr.h"
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/Scope.h"
|
||||
#include "zeek/ScriptCoverageManager.h"
|
||||
#include "zeek/Stmt.h"
|
||||
#include "zeek/Traverse.h"
|
||||
#include "zeek/Val.h"
|
||||
|
@ -859,6 +860,8 @@ void end_func(StmtPtr body, const char* module_name, bool free_of_conditionals)
|
|||
ingredients->FrameSize(), ingredients->Priority(),
|
||||
ingredients->Groups());
|
||||
|
||||
script_coverage_mgr.AddFunction(id, ingredients->Body());
|
||||
|
||||
auto func_ptr = cast_intrusive<FuncVal>(id->GetVal())->AsFuncPtr();
|
||||
auto func = cast_intrusive<ScriptFunc>(func_ptr);
|
||||
func->SetScope(ingredients->Scope());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue