mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fixes for propagating optimization options, and pruning script function analysis
This commit is contained in:
parent
9fc8f491ff
commit
7294bb34be
2 changed files with 8 additions and 4 deletions
|
@ -146,6 +146,10 @@ void FuncInfo::SetProfile(std::shared_ptr<ProfileFunc> _pf)
|
|||
|
||||
void analyze_func(ScriptFuncPtr f)
|
||||
{
|
||||
if ( analysis_options.only_func &&
|
||||
*analysis_options.only_func != f->Name() )
|
||||
return;
|
||||
|
||||
funcs.emplace_back(f, ScopePtr{NewRef{}, f->GetScope()}, f->CurrentBody());
|
||||
}
|
||||
|
||||
|
|
|
@ -394,6 +394,10 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
|
||||
auto options = zopts ? *zopts : parse_cmdline(argc, argv);
|
||||
|
||||
// Set up the global that facilitates access to analysis/optimization
|
||||
// options from deep within some modules.
|
||||
analysis_options = options.analysis_options;
|
||||
|
||||
if ( options.print_usage )
|
||||
usage(argv[0], 0);
|
||||
|
||||
|
@ -748,10 +752,6 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
}
|
||||
}
|
||||
|
||||
// Set up the global that facilitates access to analysis/optimization
|
||||
// options from deep within some modules.
|
||||
analysis_options = options.analysis_options;
|
||||
|
||||
analyze_scripts();
|
||||
|
||||
if ( analysis_options.report_recursive )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue