Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Decking
GHC
Commits
c00b6d20
Commit
c00b6d20
authored
Mar 30, 2018
by
Ömer Sinan Ağacan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update a few comments regarding CAF lists
[skip ci]
parent
0017a7b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
includes/rts/storage/Closures.h
includes/rts/storage/Closures.h
+3
-1
rts/sm/GC.c
rts/sm/GC.c
+2
-2
rts/sm/Storage.c
rts/sm/Storage.c
+5
-5
No files found.
includes/rts/storage/Closures.h
View file @
c00b6d20
...
...
@@ -122,8 +122,10 @@ typedef struct {
typedef
struct
{
StgHeader
header
;
StgClosure
*
indirectee
;
StgClosure
*
static_link
;
StgClosure
*
static_link
;
// See Note [CAF lists]
const
StgInfoTable
*
saved_info
;
// `saved_info` also used for the link field for `debug_caf_list`,
// see `newCAF` and Note [CAF lists]
}
StgIndStatic
;
typedef
struct
StgBlockingQueue_
{
...
...
rts/sm/GC.c
View file @
c00b6d20
...
...
@@ -1831,8 +1831,8 @@ resize_nursery (void)
Sanity code for CAF garbage collection.
With DEBUG turned on, we manage a CAF list in addition to the SRT
mechanism. After GC, we run down the CAF list and
blackhol
e any
CAFs which have been garbage collected. This means we get an error
mechanism. After GC, we run down the CAF list and
mak
e any
CAFs which have been garbage collected
GCD_CAF
. This means we get an error
whenever the program tries to enter a garbage collected CAF.
Any garbage collected CAFs are taken off the CAF list at the same
...
...
rts/sm/Storage.c
View file @
c00b6d20
...
...
@@ -303,10 +303,10 @@ freeStorage (bool free_heap)
The entry code for every CAF does the following:
- calls newC
af
, which builds a CAF_BLACKHOLE on the heap and atomically
- calls newC
AF
, which builds a CAF_BLACKHOLE on the heap and atomically
updates the CAF with IND_STATIC pointing to the CAF_BLACKHOLE
- if newC
af
returns zero, it re-enters the CAF (see Note [atomic
- if newC
AF
returns zero, it re-enters the CAF (see Note [atomic
CAF entry])
- pushes an update frame pointing to the CAF_BLACKHOLE
...
...
@@ -317,7 +317,7 @@ freeStorage (bool free_heap)
too, and various other parts of the RTS that deal with update
frames would also need special cases for static update frames.
newC
af
() does the following:
newC
AF
() does the following:
- atomically locks the CAF (see [atomic CAF entry])
...
...
@@ -335,7 +335,7 @@ freeStorage (bool free_heap)
------------------
Note [atomic CAF entry]
With THREADED_RTS, newC
af
() is required to be atomic (see
With THREADED_RTS, newC
AF
() is required to be atomic (see
#5558). This is because if two threads happened to enter the same
CAF simultaneously, they would create two distinct CAF_BLACKHOLEs,
and so the normal threadPaused() machinery for detecting duplicate
...
...
@@ -355,7 +355,7 @@ freeStorage (bool free_heap)
- we must be able to *revert* CAFs that have been evaluated, to
their pre-evaluated form.
To do this, we use an additional CAF list. When newC
af
() is
To do this, we use an additional CAF list. When newC
AF
() is
called on a dynamically-loaded CAF, we add it to the CAF list
instead of the old-generation mutable list, and save away its
old info pointer (in caf->saved_info) for later reversion.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment