Previously we used profileIsValid to check if the function checksum is mismatched in profile matching, however I recently found profileIsValid also returns false if the function doesn't have pseudo probe desc, which doesn't match the original intention.
This tried to fix it by checking the checksum directly. Note that it could cause two changes in thin-lto pipeline that might affect the perf or even regress the perf , those are just by-design and non-trivial to fix here, so I sent this first, we can fix them in different patches depending on more perf measurements.
- Imported functions don't have the probe desc, now they will be blocked for stale profile matching.
- During profile annotation, imported functions are blocked to reload/overwrite the profile.
nit: external -> imported