mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
only profile BiFs that appear in calls we care about
This commit is contained in:
parent
7d2842e1d5
commit
f221150efa
2 changed files with 6 additions and 2 deletions
|
@ -388,7 +388,10 @@ TraversalCode ProfileFunc::PreExpr(const Expr* e) {
|
||||||
auto sf = static_cast<ScriptFunc*>(func_vf);
|
auto sf = static_cast<ScriptFunc*>(func_vf);
|
||||||
script_calls.insert(sf);
|
script_calls.insert(sf);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Track the BiF, though not if we know we're not going to
|
||||||
|
// compile the call to it.
|
||||||
|
else if ( obj_matches_opt_files(e) != AnalyzeDecision::SHOULD_NOT )
|
||||||
BiF_globals.insert(func);
|
BiF_globals.insert(func);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -256,7 +256,8 @@ protected:
|
||||||
std::unordered_set<ScriptFunc*> script_calls;
|
std::unordered_set<ScriptFunc*> script_calls;
|
||||||
|
|
||||||
// Same for BiF's, though for them we record the corresponding global
|
// Same for BiF's, though for them we record the corresponding global
|
||||||
// rather than the BuiltinFunc*.
|
// rather than the BuiltinFunc*. In addition, we only track BiFs germane
|
||||||
|
// to code we're compiling.
|
||||||
IDSet BiF_globals;
|
IDSet BiF_globals;
|
||||||
|
|
||||||
// Script functions appearing in "when" clauses.
|
// Script functions appearing in "when" clauses.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue