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
4,323
Issues
4,323
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
377
Merge Requests
377
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
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
Glasgow Haskell Compiler
GHC
Commits
4168ee3a
Commit
4168ee3a
authored
Jun 27, 2018
by
Ömer Sinan Ağacan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rts: Update some comments, minor refactoring
parent
3d002087
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
includes/rts/storage/GC.h
includes/rts/storage/GC.h
+6
-1
rts/Capability.h
rts/Capability.h
+1
-1
rts/sm/Storage.c
rts/sm/Storage.c
+8
-9
No files found.
includes/rts/storage/GC.h
View file @
4168ee3a
...
...
@@ -109,7 +109,12 @@ typedef struct generation_ {
memcount
n_compact_blocks_in_import
;
// no. of blocks used by compacts
// being imported
memcount
max_blocks
;
// max blocks
// Max blocks to allocate in this generation before collecting it. Collect
// this generation when
//
// n_blocks + n_large_blocks + n_compact_blocks > max_blocks
//
memcount
max_blocks
;
StgTSO
*
threads
;
// threads in this gen
// linked via global_link
...
...
rts/Capability.h
View file @
4168ee3a
...
...
@@ -109,7 +109,7 @@ struct Capability_ {
int
interrupt
;
// Total words allocated by this cap since rts start
// See
[Note
allocation accounting] in Storage.c
// See
Note [
allocation accounting] in Storage.c
W_
total_allocated
;
#if defined(THREADED_RTS)
...
...
rts/sm/Storage.c
View file @
4168ee3a
...
...
@@ -1158,7 +1158,7 @@ dirty_MVAR(StgRegTable *reg, StgClosure *p)
* -------------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
*
[Note
allocation accounting]
*
Note [
allocation accounting]
*
* - When cap->r.rCurrentNusery moves to a new block in the nursery,
* we add the size of the used portion of the previous block to
...
...
@@ -1271,9 +1271,8 @@ W_ gcThreadLiveBlocks (uint32_t i, uint32_t g)
extern
W_
calcNeeded
(
bool
force_major
,
memcount
*
blocks_needed
)
{
W_
needed
=
0
,
blocks
;
uint32_t
g
,
N
;
generation
*
gen
;
W_
needed
=
0
;
uint32_t
N
;
if
(
force_major
)
{
N
=
RtsFlags
.
GcFlags
.
generations
-
1
;
...
...
@@ -1281,10 +1280,10 @@ calcNeeded (bool force_major, memcount *blocks_needed)
N
=
0
;
}
for
(
g
=
0
;
g
<
RtsFlags
.
GcFlags
.
generations
;
g
++
)
{
gen
=
&
generations
[
g
];
for
(
uint32_t
g
=
0
;
g
<
RtsFlags
.
GcFlags
.
generations
;
g
++
)
{
gen
eration
*
gen
=
&
generations
[
g
];
blocks
=
gen
->
n_blocks
// or: gen->n_words / BLOCK_SIZE_W (?)
W_
blocks
=
gen
->
n_blocks
// or: gen->n_words / BLOCK_SIZE_W (?)
+
gen
->
n_large_blocks
+
gen
->
n_compact_blocks
;
...
...
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