[Git][ghc/ghc][wip/tsan/codegen] 31 commits: rts: Introduce getNumCapabilities

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Mon Nov 14 18:33:39 UTC 2022



Ben Gamari pushed to branch wip/tsan/codegen at Glasgow Haskell Compiler / GHC


Commits:
5c940c72 by Ben Gamari at 2022-11-10T12:38:18-05:00
rts: Introduce getNumCapabilities

- - - - -
a7b46140 by Ben Gamari at 2022-11-10T12:38:18-05:00
ghc: Fix data race in dump file handling

Previously the dump filename cache would use a non-atomic update which
could potentially result in lost dump contents. Note that this is still
a bit racy since the first writer may lag behind a later appending
writer.

- - - - -
e0815d4e by Ben Gamari at 2022-11-10T12:38:18-05:00
rts: Mark accesses to Capability.context_switch as relaxed

Also Capability.interrupt.

- - - - -
f64d394d by Ben Gamari at 2022-11-10T12:38:19-05:00
Note

- - - - -
0a103d2d by Ben Gamari at 2022-11-10T12:38:19-05:00
GET_INFO_ACQUIRE

- - - - -
68accaf9 by Ben Gamari at 2022-11-10T12:38:19-05:00
fences

- - - - -
04ffc731 by Ben Gamari at 2022-11-10T12:38:19-05:00
fence

- - - - -
3b75c8bc by Ben Gamari at 2022-11-10T12:38:19-05:00
nonmoving: Silence benign data race warning from TSAN

- - - - -
b8b62d78 by Ben Gamari at 2022-11-10T12:38:19-05:00
Note

- - - - -
9cfc8be3 by Ben Gamari at 2022-11-10T12:38:19-05:00
nonmoving: Fix race in marking of blackholes

We must use an acquire-fence when marking to ensure that the indirectee
is visible.

- - - - -
eab5f680 by Ben Gamari at 2022-11-10T13:17:18-05:00
fences

- - - - -
3d5b43b9 by Ben Gamari at 2022-11-10T13:17:34-05:00
nonmoving: Fix segment list races

- - - - -
1d2f83b3 by Ben Gamari at 2022-11-10T13:18:04-05:00
nonmoving: Use atomic when looking at bd->gen

- - - - -
687e4ad5 by Ben Gamari at 2022-11-10T13:29:14-05:00
nonmoving: Eliminate race in bump_static_flag

- - - - -
35bd443d by Ben Gamari at 2022-11-10T14:19:52-05:00
Note

- - - - -
c09d6f7b by Ben Gamari at 2022-11-10T14:25:41-05:00
nonmoving: Ensure that mutable fields have acquire barrier

- - - - -
2934537b by Ben Gamari at 2022-11-10T18:29:45-05:00
rts/Timer: Always use atomic operations

As noted in #22447, the existence of the pthread-based ITimer
implementation means that we cannot assume that the program is
single-threaded.

- - - - -
166fd0ea by Ben Gamari at 2022-11-10T19:31:51-05:00
rts: Encapsulate recent_activity access

- - - - -
38630874 by Ben Gamari at 2022-11-10T19:32:57-05:00
Always use atomics for context_switch and interrupt

Since these are modified by the timer handler.

- - - - -
8357f552 by Ben Gamari at 2022-11-10T19:34:12-05:00
n_capabilities

- - - - -
6b0c2c2a by Ben Gamari at 2022-11-10T19:34:32-05:00
Updates

- - - - -
4b648070 by Ben Gamari at 2022-11-10T19:34:40-05:00
Note

- - - - -
50302656 by Ben Gamari at 2022-11-10T19:35:00-05:00
nonmoving: Collection running

- - - - -
46525371 by Ben Gamari at 2022-11-10T19:47:41-05:00
Mark epoch

- - - - -
8b0ba5f6 by Ben Gamari at 2022-11-10T19:47:53-05:00
Segment state

- - - - -
767cd3ec by Ben Gamari at 2022-11-11T17:58:18-05:00
capabilities

- - - - -
58790e40 by Ben Gamari at 2022-11-11T17:59:12-05:00
rts: Encapsulate sched_state

- - - - -
5464034f by Ben Gamari at 2022-11-11T18:01:53-05:00
rts/Proftimer: Encapsulate

- - - - -
e7893bc1 by Ben Gamari at 2022-11-11T18:32:43-05:00
hadrian: Don't enable TSAN in stage0 build

- - - - -
0190fdf0 by Ben Gamari at 2022-11-14T13:31:06-05:00
nonmoving: Refactor update remembered set initialization

This avoids a lock inversion between the storage manager mutex and
the stable pointer table mutex.

- - - - -
4ed4a512 by Ben Gamari at 2022-11-14T13:32:00-05:00
nonmoving: link_field

- - - - -


30 changed files:

- compiler/GHC/Utils/Logger.hs
- hadrian/src/Flavour.hs
- rts/Capability.c
- rts/Capability.h
- rts/HeapStackCheck.cmm
- rts/Messages.h
- rts/PrimOps.cmm
- rts/Printer.c
- rts/ProfHeap.c
- rts/ProfilerReport.c
- rts/ProfilerReportJson.c
- rts/Profiling.c
- rts/Proftimer.c
- rts/RetainerProfile.c
- rts/RtsAPI.c
- rts/RtsStartup.c
- rts/SMPClosureOps.h
- rts/STM.c
- rts/Schedule.c
- rts/Schedule.h
- rts/Stats.c
- rts/StgMiscClosures.cmm
- rts/Task.c
- rts/Threads.c
- rts/Timer.c
- rts/TraverseHeap.c
- rts/Updates.h
- rts/eventlog/EventLog.c
- rts/hooks/LongGCSync.c
- rts/include/Cmm.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d883495cd2d6c5370d5db83171355be9dc17a629...4ed4a5128b29d82d4e1f0ce12a38f61b5e60d258

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d883495cd2d6c5370d5db83171355be9dc17a629...4ed4a5128b29d82d4e1f0ce12a38f61b5e60d258
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/20221114/489a0964/attachment-0001.html>


More information about the ghc-commits mailing list