When building with profile-generate request that metadata is kept during the gc_sections call, as this can sometimes strip out profile data. This missing information in the prof files can then result in missing functions when using the profile information.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.