... | ... | @@ -50,7 +50,7 @@ Here are some tips and tricks: |
|
|
|
|
|
- One important thing to note is that by default, GHC does not define very many cost centers. So if you are comparing the results of two profiles, you may notice that everything gets attributed to something not very informative (e.g. `defaultCleanupHandler`). This is by design: if we slapped `-auto-all` on all of our source files, the profiles would be a lot harder to interpret because there would be so much noise. Instead, you should selectively apply `-auto-all`, probably to the files changed in the offending commit. [compiler/ghc.mk](/ghc/ghc/tree/master/ghc/compiler/ghc.mk) has some guidance on the matter: you can either set `compiler/main/GhcMake_HC_OPTS` to `-auto-all`, or you can add `{-# OPTIONS_GHC -auto-all #-}` to the top of the relevant files. The latter has the benefit that it will also properly trigger recompilation; however, if you're sharing your ``build.mk`` between the old and the new trees, adding the appropriate `HC_OPTS` to your build files prevents you from having to duplicate changes in both trees. These variables can also be passed to `make` on the command line.
|
|
|
|
|
|
- Comparing time/allocation profiles from `-p` can be a bit of a pain, especially if you're tracking a minor regression. It would be nice if there was a tool for comparing profiles. [\#9419](https://gitlab.haskell.org/ghc/ghc/issues/9419) tracks a feature request for adding a machine-parseable version of this output.
|
|
|
- Comparing time/allocation profiles from `-p` can be a bit of a pain, especially if you're tracking a minor regression. It would be nice if there was a tool for comparing profiles. #9419 tracks a feature request for adding a machine-parseable version of this output.
|
|
|
|
|
|
- If your commit updated submodules, be sure that you didn't also pull in unrelated changes when the submodule was updated. They may be the culprit, so test them seperately!
|
|
|
|
... | ... | |