mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
framework for --enable-ZAM-profiling configuration
profiles go to zprof.log rather than stdout
This commit is contained in:
parent
8d762eea54
commit
dc376953fa
6 changed files with 67 additions and 5 deletions
|
@ -75,6 +75,12 @@ struct AnalyOpt {
|
|||
// Produce a profile of ZAM execution.
|
||||
bool profile_ZAM = false;
|
||||
|
||||
// ZAM profiling sampling rate. Set via ZEEK_ZAM_PROF_SAMPLING_RATE.
|
||||
int profile_sampling_rate = 100;
|
||||
|
||||
// An associated file to which to write the profile.
|
||||
FILE* profile_file = nullptr;
|
||||
|
||||
// If true, dump out transformed code: the results of reducing
|
||||
// interpreted scripts, and, if optimize is set, of then optimizing
|
||||
// them.
|
||||
|
@ -217,6 +223,10 @@ extern void analyze_global_stmts(Stmt* stmts);
|
|||
// Returns the body and scope for the previously analyzed global statements.
|
||||
extern std::pair<StmtPtr, ScopePtr> get_global_stmts();
|
||||
|
||||
// Informs script optimization that parsing is switching to the given module.
|
||||
// Used to associate module names with profiling information.
|
||||
extern void switch_to_module(const char* module);
|
||||
|
||||
// Add a pattern to the "only_funcs" list.
|
||||
extern void add_func_analysis_pattern(AnalyOpt& opts, const char* pat);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue