fixed for profiling missing some profile elements

This commit is contained in:
Vern Paxson 2021-12-12 12:33:06 -08:00
parent ce7f886077
commit 4ea5785908

View file

@ -470,6 +470,8 @@ ProfileFuncs::ProfileFuncs(std::vector<FuncInfo>& funcs, is_compilable_pred pred
// functions. Recursively compute their hashes. // functions. Recursively compute their hashes.
ComputeTypeHashes(main_types); ComputeTypeHashes(main_types);
do
{
// Computing the hashes can have marked expressions (seen in // Computing the hashes can have marked expressions (seen in
// record attributes) for further analysis. Likewise, when // record attributes) for further analysis. Likewise, when
// doing the profile merges above we may have noted lambda // doing the profile merges above we may have noted lambda
@ -480,6 +482,10 @@ ProfileFuncs::ProfileFuncs(std::vector<FuncInfo>& funcs, is_compilable_pred pred
// We now have all the information we need to form definitive, // We now have all the information we need to form definitive,
// deterministic hashes. // deterministic hashes.
ComputeBodyHashes(funcs); ComputeBodyHashes(funcs);
// Computing those hashes could have led to traversals that
// create more pending expressions to analyze.
} while ( ! pending_exprs.empty() );
} }
void ProfileFuncs::MergeInProfile(ProfileFunc* pf) void ProfileFuncs::MergeInProfile(ProfileFunc* pf)