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,268
Issues
4,268
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
408
Merge Requests
408
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
cb3cb473
Commit
cb3cb473
authored
Oct 25, 2006
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove PAR/GRAN code from the storage manager
parent
432376bd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
271 deletions
+0
-271
rts/sm/Compact.c
rts/sm/Compact.c
+0
-16
rts/sm/Evac.c
rts/sm/Evac.c
+0
-49
rts/sm/GC.c
rts/sm/GC.c
+0
-39
rts/sm/Scav.c
rts/sm/Scav.c
+0
-158
rts/sm/Storage.c
rts/sm/Storage.c
+0
-9
No files found.
rts/sm/Compact.c
View file @
cb3cb473
...
...
@@ -398,10 +398,6 @@ thread_TSO (StgTSO *tso)
if
(
tso
->
why_blocked
==
BlockedOnMVar
||
tso
->
why_blocked
==
BlockedOnBlackHole
||
tso
->
why_blocked
==
BlockedOnException
#if defined(PAR)
||
tso
->
why_blocked
==
BlockedOnGA
||
tso
->
why_blocked
==
BlockedOnGA_NoSend
#endif
)
{
thread_
(
&
tso
->
block_info
.
closure
);
}
...
...
@@ -703,10 +699,6 @@ update_fwd( bdescr *blocks )
bd
=
blocks
;
#if defined(PAR)
barf
(
"update_fwd: ToDo"
);
#endif
// cycle through all the blocks in the step
for
(;
bd
!=
NULL
;
bd
=
bd
->
link
)
{
p
=
bd
->
start
;
...
...
@@ -735,10 +727,6 @@ update_fwd_compact( bdescr *blocks )
free_bd
=
blocks
;
free
=
free_bd
->
start
;
#if defined(PAR)
barf
(
"update_fwd: ToDo"
);
#endif
// cycle through all the blocks in the step
for
(;
bd
!=
NULL
;
bd
=
bd
->
link
)
{
p
=
bd
->
start
;
...
...
@@ -818,10 +806,6 @@ update_bkwd_compact( step *stp )
free
=
free_bd
->
start
;
free_blocks
=
1
;
#if defined(PAR)
barf
(
"update_bkwd: ToDo"
);
#endif
// cycle through all the blocks in the step
for
(;
bd
!=
NULL
;
bd
=
bd
->
link
)
{
p
=
bd
->
start
;
...
...
rts/sm/Evac.c
View file @
cb3cb473
...
...
@@ -287,9 +287,6 @@ evacuate_large(StgPtr p)
REGPARM1
StgClosure
*
evacuate
(
StgClosure
*
q
)
{
#if defined(PAR)
StgClosure
*
to
;
#endif
bdescr
*
bd
=
NULL
;
step
*
stp
;
const
StgInfoTable
*
info
;
...
...
@@ -634,43 +631,6 @@ loop:
}
}
#if defined(PAR)
case
RBH
:
{
//StgInfoTable *rip = get_closure_info(q, &size, &ptrs, &nonptrs, &vhs, str);
to
=
copy
(
q
,
BLACKHOLE_sizeW
(),
stp
);
//ToDo: derive size etc from reverted IP
//to = copy(q,size,stp);
debugTrace
(
DEBUG_gc
,
"evacuate: RBH %p (%s) to %p (%s)"
,
q
,
info_type
(
q
),
to
,
info_type
(
to
));
return
to
;
}
case
BLOCKED_FETCH
:
ASSERT
(
sizeofW
(
StgBlockedFetch
)
>=
MIN_PAYLOD_SIZE
);
to
=
copy
(
q
,
sizeofW
(
StgBlockedFetch
),
stp
);
debugTrace
(
DEBUG_gc
,
"evacuate: %p (%s) to %p (%s)"
,
q
,
info_type
(
q
),
to
,
info_type
(
to
));
return
to
;
# ifdef DIST
case
REMOTE_REF
:
# endif
case
FETCH_ME
:
ASSERT
(
sizeofW
(
StgBlockedFetch
)
>=
MIN_PAYLOAD_SIZE
);
to
=
copy
(
q
,
sizeofW
(
StgFetchMe
),
stp
);
debugTrace
(
DEBUG_gc
,
"evacuate: %p (%s) to %p (%s)"
,
q
,
info_type
(
q
),
to
,
info_type
(
to
)));
return
to
;
case
FETCH_ME_BQ
:
ASSERT
(
sizeofW
(
StgBlockedFetch
)
>=
MIN_PAYLOAD_SIZE
);
to
=
copy
(
q
,
sizeofW
(
StgFetchMeBlockingQueue
),
stp
);
debugTrace
(
DEBUG_gc
,
"evacuate: %p (%s) to %p (%s)"
,
q
,
info_type
(
q
),
to
,
info_type
(
to
)));
return
to
;
#endif
case
TREC_HEADER
:
return
copy
(
q
,
sizeofW
(
StgTRecHeader
),
stp
);
...
...
@@ -927,15 +887,6 @@ selector_loop:
case
SE_CAF_BLACKHOLE
:
case
SE_BLACKHOLE
:
case
BLACKHOLE
:
#if defined(PAR)
case
RBH
:
case
BLOCKED_FETCH
:
# ifdef DIST
case
REMOTE_REF
:
# endif
case
FETCH_ME
:
case
FETCH_ME_BQ
:
#endif
// not evaluated yet
break
;
...
...
rts/sm/GC.c
View file @
cb3cb473
...
...
@@ -28,15 +28,6 @@
#include "ParTicky.h" // ToDo: move into Rts.h
#include "RtsSignals.h"
#include "STM.h"
#if defined(GRAN) || defined(PAR)
# include "GranSimRts.h"
# include "ParallelRts.h"
# include "FetchMe.h"
# if defined(DEBUG)
# include "Printer.h"
# include "ParallelDebug.h"
# endif
#endif
#include "HsFFI.h"
#include "Linker.h"
#if defined(RTS_GTK_FRONTPANEL)
...
...
@@ -235,9 +226,6 @@ GarbageCollect ( rtsBool force_major_gc )
mutlist_OTHERS
=
0
;
#endif
// Init stats and print par specific (timing) info
PAR_TICKY_PAR_START
();
// attribute any costs to CCS_GC
#ifdef PROFILING
prev_CCS
=
CCCS
;
...
...
@@ -273,9 +261,6 @@ GarbageCollect ( rtsBool force_major_gc )
#endif
// check stack sanity *before* GC (ToDo: check all threads)
#if defined(GRAN)
// ToDo!: check sanity IF_DEBUG(sanity, checkTSOsSanity());
#endif
IF_DEBUG
(
sanity
,
checkFreeListSanity
());
/* Initialise the static object lists
...
...
@@ -466,7 +451,6 @@ GarbageCollect ( rtsBool force_major_gc )
}
for
(
g
=
RtsFlags
.
GcFlags
.
generations
-
1
;
g
>
N
;
g
--
)
{
IF_PAR_DEBUG
(
verbose
,
printMutableList
(
&
generations
[
g
]));
scavenge_mutable_list
(
&
generations
[
g
]);
evac_gen
=
g
;
for
(
st
=
generations
[
g
].
n_steps
-
1
;
st
>=
0
;
st
--
)
{
...
...
@@ -485,21 +469,6 @@ GarbageCollect ( rtsBool force_major_gc )
evac_gen
=
0
;
GetRoots
(
mark_root
);
#if defined(PAR)
/* And don't forget to mark the TSO if we got here direct from
* Haskell! */
/* Not needed in a seq version?
if (CurrentTSO) {
CurrentTSO = (StgTSO *)MarkRoot((StgClosure *)CurrentTSO);
}
*/
// Mark the entries in the GALA table of the parallel system
markLocalGAs
(
major_gc
);
// Mark all entries on the list of pending fetches
markPendingFetches
(
major_gc
);
#endif
/* Mark the weak pointer list, and prepare to detect dead weak
* pointers.
*/
...
...
@@ -614,12 +583,6 @@ GarbageCollect ( rtsBool force_major_gc )
}
}
#if defined(PAR)
// Reconstruct the Global Address tables used in GUM
rebuildGAtables
(
major_gc
);
IF_DEBUG
(
sanity
,
checkLAGAtable
(
rtsTrue
/*check closures, too*/
));
#endif
// Now see which stable names are still alive.
gcStablePtrTable
();
...
...
@@ -1057,8 +1020,6 @@ GarbageCollect ( rtsBool force_major_gc )
#endif
RELEASE_SM_LOCK
;
//PAR_TICKY_TP();
}
/* -----------------------------------------------------------------------------
...
...
rts/sm/Scav.c
View file @
cb3cb473
...
...
@@ -128,10 +128,6 @@ scavengeTSO (StgTSO *tso)
if
(
tso
->
why_blocked
==
BlockedOnMVar
||
tso
->
why_blocked
==
BlockedOnBlackHole
||
tso
->
why_blocked
==
BlockedOnException
#if defined(PAR)
||
tso
->
why_blocked
==
BlockedOnGA
||
tso
->
why_blocked
==
BlockedOnGA_NoSend
#endif
)
{
tso
->
block_info
.
closure
=
evacuate
(
tso
->
block_info
.
closure
);
}
...
...
@@ -563,60 +559,6 @@ scavenge(step *stp)
break
;
}
#if defined(PAR)
case
RBH
:
{
#if 0
nat size, ptrs, nonptrs, vhs;
char str[80];
StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
#endif
StgRBH
*
rbh
=
(
StgRBH
*
)
p
;
(
StgClosure
*
)
rbh
->
blocking_queue
=
evacuate
((
StgClosure
*
)
rbh
->
blocking_queue
);
failed_to_evac
=
rtsTrue
;
// mutable anyhow.
debugTrace
(
DEBUG_gc
,
"scavenge: RBH %p (%s) (new blocking_queue link=%p)"
,
p
,
info_type
(
p
),
(
StgClosure
*
)
rbh
->
blocking_queue
);
// ToDo: use size of reverted closure here!
p
+=
BLACKHOLE_sizeW
();
break
;
}
case
BLOCKED_FETCH
:
{
StgBlockedFetch
*
bf
=
(
StgBlockedFetch
*
)
p
;
// follow the pointer to the node which is being demanded
(
StgClosure
*
)
bf
->
node
=
evacuate
((
StgClosure
*
)
bf
->
node
);
// follow the link to the rest of the blocking queue
(
StgClosure
*
)
bf
->
link
=
evacuate
((
StgClosure
*
)
bf
->
link
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s); node is now %p; exciting, isn't it"
,
bf
,
info_type
((
StgClosure
*
)
bf
),
bf
->
node
,
info_type
(
bf
->
node
)));
p
+=
sizeofW
(
StgBlockedFetch
);
break
;
}
#ifdef DIST
case
REMOTE_REF
:
#endif
case
FETCH_ME
:
p
+=
sizeofW
(
StgFetchMe
);
break
;
// nothing to do in this case
case
FETCH_ME_BQ
:
{
StgFetchMeBlockingQueue
*
fmbq
=
(
StgFetchMeBlockingQueue
*
)
p
;
(
StgClosure
*
)
fmbq
->
blocking_queue
=
evacuate
((
StgClosure
*
)
fmbq
->
blocking_queue
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s) exciting, isn't it"
,
p
,
info_type
((
StgClosure
*
)
p
)));
p
+=
sizeofW
(
StgFetchMeBlockingQueue
);
break
;
}
#endif
case
TVAR_WATCH_QUEUE
:
{
StgTVarWatchQueue
*
wq
=
((
StgTVarWatchQueue
*
)
p
);
...
...
@@ -978,55 +920,6 @@ linear_scan:
break
;
}
#if defined(PAR)
case
RBH
:
{
#if 0
nat size, ptrs, nonptrs, vhs;
char str[80];
StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
#endif
StgRBH
*
rbh
=
(
StgRBH
*
)
p
;
bh
->
blocking_queue
=
(
StgTSO
*
)
evacuate
((
StgClosure
*
)
bh
->
blocking_queue
);
failed_to_evac
=
rtsTrue
;
// mutable anyhow.
debugTrace
(
DEBUG_gc
,
"scavenge: RBH %p (%s) (new blocking_queue link=%p)"
,
p
,
info_type
(
p
),
(
StgClosure
*
)
rbh
->
blocking_queue
));
break
;
}
case
BLOCKED_FETCH
:
{
StgBlockedFetch
*
bf
=
(
StgBlockedFetch
*
)
p
;
// follow the pointer to the node which is being demanded
(
StgClosure
*
)
bf
->
node
=
evacuate
((
StgClosure
*
)
bf
->
node
);
// follow the link to the rest of the blocking queue
(
StgClosure
*
)
bf
->
link
=
evacuate
((
StgClosure
*
)
bf
->
link
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s); node is now %p; exciting, isn't it"
,
bf
,
info_type
((
StgClosure
*
)
bf
),
bf
->
node
,
info_type
(
bf
->
node
)));
break
;
}
#ifdef DIST
case
REMOTE_REF
:
#endif
case
FETCH_ME
:
break
;
// nothing to do in this case
case
FETCH_ME_BQ
:
{
StgFetchMeBlockingQueue
*
fmbq
=
(
StgFetchMeBlockingQueue
*
)
p
;
(
StgClosure
*
)
fmbq
->
blocking_queue
=
evacuate
((
StgClosure
*
)
fmbq
->
blocking_queue
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s) exciting, isn't it"
,
p
,
info_type
((
StgClosure
*
)
p
)));
break
;
}
#endif
/* PAR */
case
TVAR_WATCH_QUEUE
:
{
StgTVarWatchQueue
*
wq
=
((
StgTVarWatchQueue
*
)
p
);
...
...
@@ -1351,57 +1244,6 @@ scavenge_one(StgPtr p)
break
;
}
#if defined(PAR)
case
RBH
:
{
#if 0
nat size, ptrs, nonptrs, vhs;
char str[80];
StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
#endif
StgRBH
*
rbh
=
(
StgRBH
*
)
p
;
(
StgClosure
*
)
rbh
->
blocking_queue
=
evacuate
((
StgClosure
*
)
rbh
->
blocking_queue
);
failed_to_evac
=
rtsTrue
;
// mutable anyhow.
debugTrace
(
DEBUG_gc
,
"scavenge: RBH %p (%s) (new blocking_queue link=%p)"
,
p
,
info_type
(
p
),
(
StgClosure
*
)
rbh
->
blocking_queue
));
// ToDo: use size of reverted closure here!
break
;
}
case
BLOCKED_FETCH
:
{
StgBlockedFetch
*
bf
=
(
StgBlockedFetch
*
)
p
;
// follow the pointer to the node which is being demanded
(
StgClosure
*
)
bf
->
node
=
evacuate
((
StgClosure
*
)
bf
->
node
);
// follow the link to the rest of the blocking queue
(
StgClosure
*
)
bf
->
link
=
evacuate
((
StgClosure
*
)
bf
->
link
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s); node is now %p; exciting, isn't it"
,
bf
,
info_type
((
StgClosure
*
)
bf
),
bf
->
node
,
info_type
(
bf
->
node
)));
break
;
}
#ifdef DIST
case
REMOTE_REF
:
#endif
case
FETCH_ME
:
break
;
// nothing to do in this case
case
FETCH_ME_BQ
:
{
StgFetchMeBlockingQueue
*
fmbq
=
(
StgFetchMeBlockingQueue
*
)
p
;
(
StgClosure
*
)
fmbq
->
blocking_queue
=
evacuate
((
StgClosure
*
)
fmbq
->
blocking_queue
);
debugTrace
(
DEBUG_gc
,
"scavenge: %p (%s) exciting, isn't it"
,
p
,
info_type
((
StgClosure
*
)
p
)));
break
;
}
#endif
case
TVAR_WATCH_QUEUE
:
{
StgTVarWatchQueue
*
wq
=
((
StgTVarWatchQueue
*
)
p
);
...
...
rts/sm/Storage.c
View file @
cb3cb473
...
...
@@ -361,15 +361,6 @@ newCAF(StgClosure* caf)
}
RELEASE_SM_LOCK
;
#ifdef PAR
/* If we are PAR or DIST then we never forget a CAF */
{
globalAddr
*
newGA
;
//debugBelch("<##> Globalising CAF %08x %s",caf,info_type(caf));
newGA
=
makeGlobal
(
caf
,
rtsTrue
);
/*given full weight*/
ASSERT
(
newGA
);
}
#endif
/* PAR */
}
// An alternate version of newCaf which is used for dynamically loaded
...
...
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