mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
allow profiling without updating of hash values
This commit is contained in:
parent
3962810e4b
commit
d2c6208421
3 changed files with 30 additions and 19 deletions
|
@ -391,7 +391,7 @@ static void use_CPP() {
|
|||
|
||||
int num_used = 0;
|
||||
|
||||
auto pfs = std::make_unique<ProfileFuncs>(funcs, is_CPP_compilable, false);
|
||||
auto pfs = std::make_unique<ProfileFuncs>(funcs, is_CPP_compilable, true, false);
|
||||
|
||||
for ( auto& f : funcs ) {
|
||||
auto hash = f.Profile()->HashVal();
|
||||
|
@ -435,18 +435,16 @@ static void use_CPP() {
|
|||
reporter->FatalError("no C++ functions found to use");
|
||||
}
|
||||
|
||||
static void generate_CPP() {
|
||||
static void generate_CPP(std::shared_ptr<ProfileFuncs> pfs) {
|
||||
const auto gen_name = CPP_dir + "CPP-gen.cc";
|
||||
|
||||
const bool standalone = analysis_options.gen_standalone_CPP;
|
||||
const bool report = analysis_options.report_uncompilable;
|
||||
|
||||
auto pfs = std::make_shared<ProfileFuncs>(funcs, is_CPP_compilable, false);
|
||||
|
||||
CPPCompile cpp(funcs, pfs, gen_name, standalone, report);
|
||||
}
|
||||
|
||||
static void analyze_scripts_for_ZAM() {
|
||||
static void analyze_scripts_for_ZAM(std::shared_ptr<ProfileFuncs> pfs) {
|
||||
if ( analysis_options.usage_issues > 0 && analysis_options.optimize_AST ) {
|
||||
fprintf(stderr,
|
||||
"warning: \"-O optimize-AST\" option is incompatible with -u option, "
|
||||
|
@ -454,8 +452,6 @@ static void analyze_scripts_for_ZAM() {
|
|||
analysis_options.optimize_AST = false;
|
||||
}
|
||||
|
||||
auto pfs = std::make_shared<ProfileFuncs>(funcs, nullptr, true);
|
||||
|
||||
if ( analysis_options.profile_ZAM ) {
|
||||
#ifdef ENABLE_ZAM_PROFILE
|
||||
AST_blocks = std::make_unique<ASTBlockAnalyzer>(funcs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue