[Git][ghc/ghc][master] 4 commits: Don't compile `asBox` with -fprof-late

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Sep 26 16:08:12 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00
Don't compile `asBox` with -fprof-late

The `asBox` function is intended to store exactly the closure which the
user passes to it. Placing a cost centre on asBox introduces a thunk,
which violates this expectation and can change the result of using asBox
when profiling is enabled.

See #25212 for more details and ample opportunity to discuss if this is
a bug or not.

- - - - -
0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00
Fix normalisation of .prof files

Fix 1: If a cost centre contained CAF then the normalisation was
corrupted, now only check if CAF is at the start of a line.

Fix 2: "no location info" contain a space, which messed up the next
normalisation logic which assumed that columns didn't have spaced in.

- - - - -
9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00
testsuite: Fix normalisation of prof_files removing newlines

These normalisation steps were collapsing lines together, which made
subsequent normalisation steps fail.

```
foo x y z
CAF x y z
qux x y z
```

was getting normalised to

```
foo x y z qux x y z
```

which means that subsequent line based filters would not work correctly.

- - - - -
2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00
packaging: Enable late-ccs for release flavour

This enables late cost centres when building profiled libraries and
subsequently greatly improves the resolution of cost centre stacks when
profiling.

This patch also introduces the `grep_prof` test modifier which is used
to apply a further filter to the .prof file before they are compared.

Fixes #21732

-------------------------
Metric Increase:
    libdir
-------------------------

- - - - -


13 changed files:

- hadrian/doc/flavours.md
- hadrian/src/Flavour.hs
- hadrian/src/Settings/Flavours/Release.hs
- libraries/ghc-heap/GHC/Exts/Heap/Closures.hs
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/codeGen/should_run/cgrun057.stderr
- testsuite/tests/profiling/should_run/T12962.prof.sample
- testsuite/tests/profiling/should_run/T2552.prof.sample
- testsuite/tests/profiling/should_run/T5559.prof.sample
- testsuite/tests/profiling/should_run/T5654-O0.prof.sample
- testsuite/tests/profiling/should_run/T5654-O1.prof.sample
- testsuite/tests/profiling/should_run/T5654b-O0.prof.sample


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/383af0743a46e0961c342261f13a4527ae838873...2b25f9e28ad763739966f63664864b42766da4a2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/383af0743a46e0961c342261f13a4527ae838873...2b25f9e28ad763739966f63664864b42766da4a2
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240926/568deb8f/attachment.html>


More information about the ghc-commits mailing list