mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
support for more in-depth AST profiling
This commit is contained in:
parent
d2c6208421
commit
857df9f063
2 changed files with 34 additions and 4 deletions
|
@ -607,17 +607,23 @@ void analyze_scripts(bool no_unused_warnings) {
|
|||
if ( analysis_options.use_CPP )
|
||||
use_CPP();
|
||||
|
||||
std::shared_ptr<ProfileFuncs> pfs;
|
||||
// Note, in the following it's not clear whether the final argument
|
||||
// for absolute/relative record fields matters any more ...
|
||||
if ( generating_CPP )
|
||||
pfs = std::make_shared<ProfileFuncs>(funcs, is_CPP_compilable, true, false);
|
||||
else
|
||||
pfs = std::make_shared<ProfileFuncs>(funcs, nullptr, true, true);
|
||||
|
||||
if ( generating_CPP ) {
|
||||
if ( analysis_options.gen_ZAM )
|
||||
reporter->FatalError("-O ZAM and -O gen-C++ conflict");
|
||||
|
||||
generate_CPP();
|
||||
generate_CPP(pfs);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// At this point we're done with C++ considerations, so instead
|
||||
// are compiling to ZAM.
|
||||
analyze_scripts_for_ZAM();
|
||||
analyze_scripts_for_ZAM(pfs);
|
||||
|
||||
if ( reporter->Errors() > 0 )
|
||||
reporter->FatalError("Optimized script execution aborted due to errors");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue