Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Cost centres registered after the program begins are missing from the eventlog
On initialization, the RTS dumps all registered cost centres to the eventlog (`dumpCostCentresToEventLog`), and if code is loaded after that point, any cost centres it registers won’t be included. This can be observed by compiling code that uses Template Haskell using a profiled GHC: ```haskell module A where mkBigList :: Int -> [Int] mkBigList x = {-# SCC "A.mkBigList" #-} go x where go 0 = [] go x = x : go (x - 1) ``` ```haskell {-# LANGUAGE TemplateHaskell #-} module B where import Control.Exception (evaluate) import GHC.Profiling (requestHeapCensus) import Language.Haskell.TH.Syntax (lift, runIO) import System.Mem (performMajorGC) import A bigList :: [Int] bigList = $(do let x = mkBigList 10000 runIO $ do evaluate (length x) requestHeapCensus performMajorGC lift x) ``` ``` $ ghc -prof A B +RTS -l-a -hc -RTS ``` The `.hp` heap profile includes a sample that mentions `mkBigList`, but that cost centre’s definition is absent from the generated eventlog. Consequently, there is a `HEAP_PROF_SAMPLE_COST_CENTRE` event that includes a cost centre number without any corresponding definition. The RTS should probably keep track of how many cost centres have already been emitted to the eventlog and dump any that have been newly registered before writing a new heap sample.
issue