mark functions skipped by ZAM compilation as such

This commit is contained in:
Vern Paxson 2024-08-05 09:27:33 +01:00 committed by Arne Welzel
parent 11e9135f80
commit 1253af42f9

View file

@ -507,12 +507,12 @@ static void analyze_scripts_for_ZAM(std::shared_ptr<ProfileFuncs> pfs) {
if ( ! analysis_options.compile_all && ! is_lambda && inl && inl->WasFullyInlined(func.get()) && if ( ! analysis_options.compile_all && ! is_lambda && inl && inl->WasFullyInlined(func.get()) &&
func_used_indirectly.count(func.get()) == 0 ) { func_used_indirectly.count(func.get()) == 0 ) {
// No need to compile as it won't be called directly. // No need to compile as it won't be called directly. We'd
// We'd like to zero out the body to recover the // like to zero out the body to recover the memory, but a *few*
// memory, but a *few* such functions do get called, // such functions do get called, such as by the event engine
// such as by the event engine reaching up, or // reaching up, or BiFs looking for them, so we can't safely
// BiFs looking for them, so we can't safely zero // zero them.
// them. f.SetSkip(true);
continue; continue;
} }