Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alejandro Serrano Mena
GHC
Commits
ab5aad58
Commit
ab5aad58
authored
14 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
fix an interaction between the new pinned_object_block policy and
globalisation.
parent
faf62056
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rts/sm/Globalise.c
+14
-1
14 additions, 1 deletion
rts/sm/Globalise.c
rts/sm/Storage.c
+8
-4
8 additions, 4 deletions
rts/sm/Storage.c
with
22 additions
and
5 deletions
rts/sm/Globalise.c
+
14
−
1
View file @
ab5aad58
...
@@ -217,7 +217,20 @@ globalise_large (StgPtr p)
...
@@ -217,7 +217,20 @@ globalise_large (StgPtr p)
ACQUIRE_SPIN_LOCK
(
&
gen
->
sync
);
ACQUIRE_SPIN_LOCK
(
&
gen
->
sync
);
// remove from large_object list
// the object we need to globalise might be in the
// pinned_object_block, which is still being allocated into. In
// that case, we just mark the pinned_object_block with the global
// generation, and allocatePinned() will attach the block to the
// correct gen->large_objects list when it is full.
if
(
bd
==
gct
->
cap
->
pinned_object_block
)
{
new_gen
=
&
all_generations
[
global_gen_ix
];
initBdescr
(
bd
,
new_gen
,
new_gen
->
to
);
RELEASE_SPIN_LOCK
(
&
gen
->
sync
);
return
;
}
// remove from large_object list
if
(
bd
->
u
.
back
)
{
if
(
bd
->
u
.
back
)
{
bd
->
u
.
back
->
link
=
bd
->
link
;
bd
->
u
.
back
->
link
=
bd
->
link
;
}
else
{
// first object in the list
}
else
{
// first object in the list
...
...
This diff is collapsed.
Click to expand it.
rts/sm/Storage.c
+
8
−
4
View file @
ab5aad58
...
@@ -778,16 +778,20 @@ allocatePinned (Capability *cap, lnat n)
...
@@ -778,16 +778,20 @@ allocatePinned (Capability *cap, lnat n)
// the next GC the BF_EVACUATED flag will be cleared, and the
// the next GC the BF_EVACUATED flag will be cleared, and the
// block will be promoted as usual (if anything in it is
// block will be promoted as usual (if anything in it is
// live).
// live).
ACQUIRE_SM_LOCK
;
gen
=
cap
->
r
.
rG0
;
// use our local G0
if
(
bd
!=
NULL
)
{
if
(
bd
!=
NULL
)
{
gen
=
bd
->
gen
;
// attach it to the correct generation - the block might
// have been globalised by now (see globalise_large()).
if
(
gen
->
no
!=
0
)
{
ACQUIRE_SPIN_LOCK
(
&
gen
->
sync
);
}
dbl_link_onto
(
bd
,
&
gen
->
large_objects
);
dbl_link_onto
(
bd
,
&
gen
->
large_objects
);
gen
->
n_large_blocks
++
;
gen
->
n_large_blocks
++
;
g0
->
n_new_large_words
+=
bd
->
free
-
bd
->
start
;
gen
->
n_new_large_words
+=
bd
->
free
-
bd
->
start
;
if
(
gen
->
no
!=
0
)
{
RELEASE_SPIN_LOCK
(
&
gen
->
sync
);
}
}
}
ACQUIRE_SM_LOCK
;
cap
->
pinned_object_block
=
bd
=
allocBlock
();
cap
->
pinned_object_block
=
bd
=
allocBlock
();
RELEASE_SM_LOCK
;
RELEASE_SM_LOCK
;
initBdescr
(
bd
,
gen
,
gen
);
initBdescr
(
bd
,
cap
->
r
.
rG0
,
cap
->
r
.
rG0
);
// use our local G0
bd
->
flags
=
BF_PINNED
|
BF_LARGE
|
BF_EVACUATED
;
bd
->
flags
=
BF_PINNED
|
BF_LARGE
|
BF_EVACUATED
;
bd
->
free
=
bd
->
start
;
bd
->
free
=
bd
->
start
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment