[Git][ghc/ghc][wip/andreask/9.10.4-batch1] RTS: fix warnings with doing*Profiling (#24918)