[Git][ghc/ghc][wip/nonmoving-fixes] 19 commits: Fix haddock parse error

Ben Gamari gitlab at gitlab.haskell.org
Thu Nov 26 23:16:18 UTC 2020



Ben Gamari pushed to branch wip/nonmoving-fixes at Glasgow Haskell Compiler / GHC


Commits:
faa95a99 by Matthew Pickering at 2020-11-18T13:42:30+00:00
Fix haddock parse error

- - - - -
4addeede by Matthew Pickering at 2020-11-18T16:24:25+00:00
Revert "Remove GHC.Types.Unique.Map module"

This reverts commit 1c7c6f1afc8e7f7ba5d256780bc9d5bb5f3e7601.

- - - - -
ff1846e0 by Matthew Pickering at 2020-11-23T10:42:39+00:00
Profiling by info table mode (-hi)

This profiling mode creates bands by the address of the info table for
each closure. This provides a much more fine-grained profiling output
than any of the other profiling modes.

The `-hi` profiling mode does not require a profiling build.

- - - - -
4e2fe44f by Matthew Pickering at 2020-11-23T11:18:16+00:00
Add -finfo-table-map which maps info tables to source positions

This new flag embeds a lookup table from the address of an info table
to information about that info table.

The main interface for consulting the map is the `lookupIPE` C function

> InfoProvEnt * lookupIPE(StgInfoTable *info)

The `InfoProvEnt` has the following structure:

> typedef struct InfoProv_{
>     char * table_name;
>     char * closure_desc;
>     char * ty_desc;
>     char * label;
>     char * module;
>     char * srcloc;
> } InfoProv;
>
> typedef struct InfoProvEnt_ {
>     StgInfoTable * info;
>     InfoProv prov;
>     struct InfoProvEnt_ *link;
> } InfoProvEnt;

The source positions are approximated in a similar way to the source
positions for DWARF debugging information. They are only approximate but
in our experience provide a good enough hint about where the problem
might be. It is therefore recommended to use this flag in conjunction
with `-g<n>` for more accurate locations.

The lookup table is also emitted into the eventlog when it is available
as it is intended to be used with the `-hi` profiling mode.

Using this flag will significantly increase the size of the resulting
object file but only by a factor of 2-3x in our experience.

- - - - -
960108eb by Matthew Pickering at 2020-11-23T11:18:42+00:00
Add option to give each usage of a data constructor its own info table

The `-fdistinct-constructor-tables` flag will generate a fresh info
table for the usage of any data constructor. This is useful for
debugging as now by inspecting the info table, you can determine which
usage of a constructor caused that allocation rather than the old
situation where the info table always mapped to the definition site of
the data constructor which is useless.

In conjunction with `-hi` and `-finfo-table-map` this gives a more fine
grained understanding of where constructor allocations arise from in a
program.

- - - - -
e1270f24 by Matthew Pickering at 2020-11-23T11:18:44+00:00
Add whereFrom and whereFrom# primop

The `whereFrom` function provides a Haskell interface for using the
information created by `-finfo-table-map`. Given a Haskell value, the
info table address will be passed to the `lookupIPE` function in order
to attempt to find the source location information for that particular closure.

At the moment it's not possible to distinguish the absense of the map
and a failed lookup.

- - - - -
e1fb2d2b by Matthew Pickering at 2020-11-23T11:18:44+00:00
Add test for whereFrom#

- - - - -
364ceb53 by Matthew Pickering at 2020-11-23T11:18:44+00:00
Add release notes for -hi, -finfo-table-map and -fdistinct-constructor-tables

- - - - -
570ea663 by David Eichmann at 2020-11-23T11:27:07+00:00
ghc-heap: partial TSO/STACK decoding

Co-authored-by: Sven Tennie <sven.tennie at gmail.com>
Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com>
Co-authored-by: Ben Gamari <bgamari.foss at gmail.com>

- - - - -
a45694db by Matthew Pickering at 2020-11-23T11:27:07+00:00
Remove special case for GHC.ByteCode.Instr

This was added in
https://github.com/nomeata/ghc-heap-view/commit/34935206e51b9c86902481d84d2f368a6fd93423

It now points to the wrong place, and should be dealt with in client
code.

- - - - -
2b9dfd09 by Matthew Pickering at 2020-11-23T11:33:17+00:00
Split Up getClosureDataFromHeapRep

Motivation

1. Don't enforce the repeated decoding of an info table, when the client
can cache it (ghc-debug)
2. Allow the constructor information decoding to be overridden, this
casues segfaults in ghc-debug

- - - - -
293cf770 by GHC GitLab CI at 2020-11-25T23:09:19+00:00
ThreadPaused: Don't zero slop until free vars are pushed

When threadPaused blackholes a thunk it calls `OVERWRITING_CLOSURE` to
zero the slop for the benefit of the sanity checker. Previously this was
done *before* pushing the thunk's free variables to the update
remembered set. Consequently we would pull zero'd pointers to the update
remembered set.

- - - - -
5b73212e by GHC GitLab CI at 2020-11-25T23:09:35+00:00
nonmoving: Fix regression from TSAN work

The TSAN rework (specifically aad1f803) introduced a subtle regression
in GC.c, swapping `g0` in place of `gen`. Whoops!

Fixes #18997.

- - - - -
3d6d269b by GHC GitLab CI at 2020-11-26T00:10:26+00:00
rts/Messages: Add missing write barrier in THROWTO message update

After a THROWTO message has been handle the message closure is
overwritten by a NULL message. We must ensure that the original
closure's pointers continue to be visible to the nonmoving GC.

- - - - -
5aabe473 by GHC GitLab CI at 2020-11-26T00:11:41+00:00
nonmoving: Add missing write barrier in shrinkSmallByteArray

- - - - -
ab1e1929 by GHC GitLab CI at 2020-11-26T01:01:18+00:00
Updates: Don't zero slop until closure has been pushed

Ensure that the the free variables have been pushed to the update
remembered set before we zero the slop.

- - - - -
51ad8e05 by GHC GitLab CI at 2020-11-26T01:06:32+00:00
OSThreads: Fix error code checking

pthread_join returns its error code and apparently doesn't set errno.

- - - - -
dce82a43 by GHC GitLab CI at 2020-11-26T01:07:24+00:00
nonmoving: Don't join to mark_thread on shutdown

The mark thread is not joinable as we detach from it on creation.

- - - - -
576f4d94 by GHC GitLab CI at 2020-11-26T23:15:11+00:00
nonmoving: Ensure that evacuated large objects are marked

See Note [Non-moving GC: Marking evacuated objects].

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Stg/CSE.hs
- + compiler/GHC/Stg/Debug.hs
- compiler/GHC/Stg/DepAnal.hs
- compiler/GHC/Stg/FVs.hs
- compiler/GHC/Stg/Lift.hs
- compiler/GHC/Stg/Lift/Analysis.hs
- compiler/GHC/Stg/Lift/Monad.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Stats.hs
- compiler/GHC/Stg/Syntax.hs
- compiler/GHC/Stg/Unarise.hs
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/StgToCmm/DataCon.hs
- compiler/GHC/StgToCmm/Expr.hs
- compiler/GHC/StgToCmm/Monad.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToCmm/Prof.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e151c961266e3b4fdc966918f2cbde9aa657436a...576f4d948127bf7edbb3055793d6400be22aa233

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e151c961266e3b4fdc966918f2cbde9aa657436a...576f4d948127bf7edbb3055793d6400be22aa233
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/20201126/26f12435/attachment.html>


More information about the ghc-commits mailing list