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
dd56e9ab
Commit
dd56e9ab
authored
Jun 02, 2009
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old GUM/GranSim code
parent
cfe2fd2a
Changes
43
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
31 additions
and
4164 deletions
+31
-4164
compiler/codeGen/SMRep.lhs
compiler/codeGen/SMRep.lhs
+1
-5
compiler/main/Constants.lhs
compiler/main/Constants.lhs
+0
-3
includes/ClosureMacros.h
includes/ClosureMacros.h
+0
-18
includes/Closures.h
includes/Closures.h
+0
-77
includes/Hooks.h
includes/Hooks.h
+0
-4
includes/InfoTables.h
includes/InfoTables.h
+0
-67
includes/README
includes/README
+1
-0
includes/Rts.h
includes/Rts.h
+0
-19
includes/RtsConfig.h
includes/RtsConfig.h
+1
-3
includes/RtsFlags.h
includes/RtsFlags.h
+1
-169
includes/RtsTypes.h
includes/RtsTypes.h
+0
-46
includes/SMP.h
includes/SMP.h
+1
-1
includes/SchedAPI.h
includes/SchedAPI.h
+0
-9
includes/Stg.h
includes/Stg.h
+0
-2
includes/StgMiscClosures.h
includes/StgMiscClosures.h
+0
-12
includes/TSO.h
includes/TSO.h
+0
-47
includes/TickyCounters.h
includes/TickyCounters.h
+0
-13
includes/mkDerivedConstants.c
includes/mkDerivedConstants.c
+1
-8
rts/Capability.c
rts/Capability.c
+1
-1
rts/HeapStackCheck.cmm
rts/HeapStackCheck.cmm
+0
-290
rts/Linker.c
rts/Linker.c
+0
-5
rts/Printer.c
rts/Printer.c
+0
-45
rts/RtsAPI.c
rts/RtsAPI.c
+0
-12
rts/RtsFlags.c
rts/RtsFlags.c
+15
-1228
rts/RtsMain.c
rts/RtsMain.c
+0
-56
rts/RtsSignals.h
rts/RtsSignals.h
+1
-1
rts/RtsStartup.c
rts/RtsStartup.c
+0
-78
rts/RtsUtils.c
rts/RtsUtils.c
+0
-37
rts/RtsUtils.h
rts/RtsUtils.h
+0
-4
rts/Sanity.c
rts/Sanity.c
+0
-326
rts/Sanity.h
rts/Sanity.h
+0
-15
rts/Schedule.c
rts/Schedule.c
+6
-121
rts/Schedule.h
rts/Schedule.h
+0
-23
rts/Sparks.c
rts/Sparks.c
+2
-660
rts/Sparks.h
rts/Sparks.h
+0
-4
rts/StgMiscClosures.cmm
rts/StgMiscClosures.cmm
+0
-44
rts/Threads.c
rts/Threads.c
+0
-544
rts/Threads.h
rts/Threads.h
+0
-9
rts/Ticky.c
rts/Ticky.c
+0
-59
rts/Trace.c
rts/Trace.c
+0
-2
rts/Updates.h
rts/Updates.h
+0
-55
rts/hooks/InitEachPE.c
rts/hooks/InitEachPE.c
+0
-23
rts/hooks/ShutdownEachPEHook.c
rts/hooks/ShutdownEachPEHook.c
+0
-19
No files found.
compiler/codeGen/SMRep.lhs
View file @
dd56e9ab
...
...
@@ -258,16 +258,12 @@ Size of a closure header.
\begin{code}
fixedHdrSize :: WordOff
fixedHdrSize = sTD_HDR_SIZE + profHdrSize
+ granHdrSize
fixedHdrSize = sTD_HDR_SIZE + profHdrSize
profHdrSize :: WordOff
profHdrSize | opt_SccProfilingOn = pROF_HDR_SIZE
| otherwise = 0
granHdrSize :: WordOff
granHdrSize | opt_GranMacros = gRAN_HDR_SIZE
| otherwise = 0
arrWordsHdrSize :: ByteOff
arrWordsHdrSize = fixedHdrSize*wORD_SIZE + sIZEOF_StgArrWords_NoHdr
...
...
compiler/main/Constants.lhs
View file @
dd56e9ab
...
...
@@ -107,9 +107,6 @@ sTD_HDR_SIZE = STD_HDR_SIZE
pROF_HDR_SIZE :: Int
pROF_HDR_SIZE = PROF_HDR_SIZE
gRAN_HDR_SIZE :: Int
gRAN_HDR_SIZE = GRAN_HDR_SIZE
\end{code}
Size of a double in StgWords.
...
...
includes/ClosureMacros.h
View file @
dd56e9ab
...
...
@@ -127,22 +127,6 @@
#define SET_STATIC_PROF_HDR(ccs)
#endif
#ifdef GRAN
#define SET_GRAN_HDR(c,pe) (c)->header.gran.procs = pe
#define SET_STATIC_GRAN_HDR gran : { procs : Everywhere },
#else
#define SET_GRAN_HDR(c,pe)
#define SET_STATIC_GRAN_HDR
#endif
#ifdef PAR
#define SET_PAR_HDR(c,stuff)
#define SET_STATIC_PAR_HDR(stuff)
#else
#define SET_PAR_HDR(c,stuff)
#define SET_STATIC_PAR_HDR(stuff)
#endif
#ifdef TICKY_TICKY
#define SET_TICKY_HDR(c,stuff)
/* old: (c)->header.ticky.updated = stuff */
#define SET_STATIC_TICKY_HDR(stuff)
/* old: ticky : { updated : stuff } */
...
...
@@ -154,8 +138,6 @@
#define SET_HDR(c,_info,ccs) \
{ \
(c)->header.info = _info; \
SET_GRAN_HDR((StgClosure *)(c),ThisPE); \
SET_PAR_HDR((StgClosure *)(c),LOCAL_GA); \
SET_PROF_HDR((StgClosure *)(c),ccs); \
SET_TICKY_HDR((StgClosure *)(c),0); \
}
...
...
includes/Closures.h
View file @
dd56e9ab
...
...
@@ -26,14 +26,6 @@ typedef struct {
}
hp
;
}
StgProfHeader
;
/* -----------------------------------------------------------------------------
The GranSim header
-------------------------------------------------------------------------- */
typedef
struct
{
StgWord
procs
;
/* bitmask indicating on which PEs this closure resides */
}
StgGranHeader
;
/* -----------------------------------------------------------------------------
The SMP header
...
...
@@ -63,18 +55,12 @@ typedef struct {
#ifdef PROFILING
StgProfHeader
prof
;
#endif
#ifdef GRAN
StgGranHeader
gran
;
#endif
}
StgHeader
;
typedef
struct
{
const
struct
_StgInfoTable
*
info
;
#ifdef PROFILING
StgProfHeader
prof
;
#endif
#ifdef GRAN
StgGranHeader
gran
;
#endif
StgSMPThunkHeader
smp
;
}
StgThunkHeader
;
...
...
@@ -427,67 +413,4 @@ typedef struct {
StgClosure
*
alt_code
;
}
StgCatchRetryFrame
;
#if defined(PAR) || defined(GRAN)
/*
StgBlockingQueueElement is a ``collective type'' representing the types
of closures that can be found on a blocking queue: StgTSO, StgRBHSave,
StgBlockedFetch. (StgRBHSave can only appear at the end of a blocking
queue). Logically, this is a union type, but defining another struct
with a common layout is easier to handle in the code.
Note that in the standard setup only StgTSOs can be on a blocking queue.
This is one of the main reasons for slightly different code in files
such as Schedule.c.
*/
typedef
struct
StgBlockingQueueElement_
{
StgHeader
header
;
struct
StgBlockingQueueElement_
*
link
;
/* next elem in BQ */
struct
StgClosure_
*
payload
[
FLEXIBLE_ARRAY
];
/* contents of the closure */
}
StgBlockingQueueElement
;
/* only difference to std code is type of the elem in the BQ */
typedef
struct
StgBlockingQueue_
{
StgHeader
header
;
struct
StgBlockingQueueElement_
*
blocking_queue
;
/* start of the BQ */
}
StgBlockingQueue
;
/* this closure is hanging at the end of a blocking queue in (see RBH.c) */
typedef
struct
StgRBHSave_
{
StgHeader
header
;
StgClosure
*
payload
[
FLEXIBLE_ARRAY
];
/* 2 words ripped out of the guts of the */
}
StgRBHSave
;
/* closure holding the blocking queue */
typedef
struct
StgRBH_
{
StgHeader
header
;
struct
StgBlockingQueueElement_
*
blocking_queue
;
/* start of the BQ */
}
StgRBH
;
#endif
#if defined(PAR)
/* global indirections aka FETCH_ME closures */
typedef
struct
StgFetchMe_
{
StgHeader
header
;
globalAddr
*
ga
;
/* ptr to unique id for a closure */
}
StgFetchMe
;
/* same contents as an ordinary StgBlockingQueue */
typedef
struct
StgFetchMeBlockingQueue_
{
StgHeader
header
;
struct
StgBlockingQueueElement_
*
blocking_queue
;
/* start of the BQ */
}
StgFetchMeBlockingQueue
;
/* This is an entry in a blocking queue. It indicates a fetch request from a
TSO on another PE demanding the value of this closur. Note that a
StgBlockedFetch can only occur in a BQ. Once the node is evaluated and
updated with the result, the result will be sent back (the PE is encoded
in the globalAddr) and the StgBlockedFetch closure will be nuked.
*/
typedef
struct
StgBlockedFetch_
{
StgHeader
header
;
struct
StgBlockingQueueElement_
*
link
;
/* next elem in the BQ */
StgClosure
*
node
;
/* node to fetch */
globalAddr
ga
;
/* where to send the result to */
}
StgBlockedFetch
;
/* NB: not just a ptr to a GA */
#endif
#endif
/* CLOSURES_H */
includes/Hooks.h
View file @
dd56e9ab
...
...
@@ -14,7 +14,3 @@ extern void StackOverflowHook (unsigned long stack_size);
extern
void
OutOfHeapHook
(
unsigned
long
request_size
,
unsigned
long
heap_size
);
extern
void
MallocFailHook
(
unsigned
long
request_size
/* in bytes */
,
char
*
msg
);
extern
void
defaultsHook
(
void
);
#if defined(PAR)
extern
void
InitEachPEHook
(
void
);
extern
void
ShutdownEachPEHook
(
void
);
#endif
includes/InfoTables.h
View file @
dd56e9ab
...
...
@@ -53,70 +53,6 @@ typedef struct {
#endif
}
StgProfInfo
;
/* -----------------------------------------------------------------------------
Parallelism info
-------------------------------------------------------------------------- */
#if 0 && (defined(PAR) || defined(GRAN))
/* CURRENTLY UNUSED
ToDo: use this in StgInfoTable (mutually recursive) -- HWL */
typedef struct {
StgInfoTable *rbh_infoptr; /* infoptr to the RBH */
} StgParInfo;
#endif /* 0 */
/*
Copied from ghc-0.29; ToDo: check this code -- HWL
In the parallel system, all updatable closures have corresponding
revertible black holes. When we are assembly-mangling, we guarantee
that the revertible black hole code precedes the normal entry code, so
that the RBH info table resides at a fixed offset from the normal info
table. Otherwise, we add the RBH info table pointer to the end of the
normal info table and vice versa.
Currently has to use a !RBH_MAGIC_OFFSET setting.
Still todo: init of par.infoptr field in all infotables!!
*/
#if defined(PAR) || defined(GRAN)
# ifdef RBH_MAGIC_OFFSET
# error magic offset not yet implemented
# define RBH_INFO_WORDS 0
# define INCLUDE_RBH_INFO(infoptr)
# define RBH_INFOPTR(infoptr) (((P_)infoptr) - RBH_MAGIC_OFFSET)
# define REVERT_INFOPTR(infoptr) (((P_)infoptr) + RBH_MAGIC_OFFSET)
# else
# define RBH_INFO_WORDS 1
# define INCLUDE_RBH_INFO(info) rbh_infoptr : &(info)
# define RBH_INFOPTR(infoptr) (((StgInfoTable *)(infoptr))->rbh_infoptr)
# define REVERT_INFOPTR(infoptr) (((StgInfoTable *)(infoptr))->rbh_infoptr)
# endif
/* see ParallelRts.h */
/*
EXTFUN(RBH_entry);
StgClosure *convertToRBH(StgClosure *closure);
#if defined(GRAN)
void convertFromRBH(StgClosure *closure);
#elif defined(PAR)
void convertToFetchMe(StgPtr closure, globalAddr *ga);
#endif
*/
#endif
/* -----------------------------------------------------------------------------
Ticky info
...
...
@@ -282,9 +218,6 @@ typedef struct _StgInfoTable {
StgFunPtr
entry
;
/* pointer to the entry code */
#endif
#if defined(PAR) || defined(GRAN)
struct
_StgInfoTable
*
rbh_infoptr
;
#endif
#ifdef PROFILING
StgProfInfo
prof
;
#endif
...
...
includes/README
View file @
dd56e9ab
...
...
@@ -64,6 +64,7 @@ Rts.h
StgDLL.h /* stuff related to Windows DLLs */
MachRegs.h /* global register assignments for this arch */
Regs.h /* "registers" in the virtual machine */
TickyCounters.h
StgMiscClosures.h /* decls for closures & info tables in the RTS */
SMP.h /* basic primitives for synchronisation */
...
...
includes/Rts.h
View file @
dd56e9ab
...
...
@@ -170,11 +170,7 @@ TAG_CLOSURE(StgWord tag,StgClosure * p)
/* Info tables, closures & code fragments defined in the RTS */
#include "StgMiscClosures.h"
/* Simulated-parallel information */
#include "GranSim.h"
/* Parallel information */
#include "Parallel.h"
#include "OSThreads.h"
#include "SMPClosureOps.h"
#include "SpinLock.h"
...
...
@@ -190,9 +186,6 @@ TAG_CLOSURE(StgWord tag,StgClosure * p)
#include "Block.h"
#include "ClosureMacros.h"
/* Ticky-ticky counters */
#include "TickyCounters.h"
/* Runtime-system hooks */
#include "Hooks.h"
#include "RtsMessages.h"
...
...
@@ -287,18 +280,6 @@ TICK_VAR(2)
#define DEBUG_ONLY(s) doNothing()
#endif
#if defined(GRAN) && defined(DEBUG)
#define IF_GRAN_DEBUG(c,s) if (RtsFlags.GranFlags.Debug.c) { s; }
#else
#define IF_GRAN_DEBUG(c,s) doNothing()
#endif
#if defined(PAR) && defined(DEBUG)
#define IF_PAR_DEBUG(c,s) if (RtsFlags.ParFlags.Debug.c) { s; }
#else
#define IF_PAR_DEBUG(c,s) doNothing()
#endif
/* -----------------------------------------------------------------------------
Useful macros and inline functions
-------------------------------------------------------------------------- */
...
...
includes/RtsConfig.h
View file @
dd56e9ab
...
...
@@ -24,7 +24,7 @@
/*
* Whether the runtime system will use libbfd for debugging purposes.
*/
#if defined(DEBUG) && defined(HAVE_BFD_H) && defined(HAVE_LIBBFD) && !defined(_WIN32)
&& !defined(PAR) && !defined(GRAN)
#if defined(DEBUG) && defined(HAVE_BFD_H) && defined(HAVE_LIBBFD) && !defined(_WIN32)
#define USING_LIBBFD 1
#endif
...
...
@@ -55,9 +55,7 @@
Signals - supported on non-PAR versions of the runtime. See RtsSignals.h.
-------------------------------------------------------------------------- */
#if !defined(PAR)
#define RTS_USER_SIGNALS 1
#endif
/* Profile spin locks */
...
...
includes/RtsFlags.h
View file @
dd56e9ab
...
...
@@ -61,8 +61,6 @@ struct DEBUG_FLAGS {
rtsBool
stable
;
/* 't' */
rtsBool
prof
;
/* 'p' */
rtsBool
eventlog
;
/* 'e' */
rtsBool
gran
;
/* 'r' */
rtsBool
par
;
/* 'P' */
rtsBool
linker
;
/* 'l' the object linker */
rtsBool
apply
;
/* 'a' */
rtsBool
stm
;
/* 'm' */
...
...
@@ -134,54 +132,6 @@ struct MISC_FLAGS {
* for the linker, NULL ==> off */
};
#ifdef PAR
/* currently the same as GRAN_STATS_FLAGS */
struct
PAR_STATS_FLAGS
{
rtsBool
Full
;
/* Full .gr profile (rtsTrue) or only END events? */
rtsBool
Suppressed
;
/* No .gr profile at all */
rtsBool
Binary
;
/* Binary profile? (not yet implemented) */
rtsBool
Sparks
;
/* Info on sparks in profile? */
rtsBool
Heap
;
/* Info on heap allocs in profile? */
rtsBool
NewLogfile
;
/* Use new log-file format? (not yet implemented) */
rtsBool
Global
;
/* Global statistics? (printed on shutdown; no log file) */
};
struct
PAR_DEBUG_FLAGS
{
/* flags to control debugging output in various subsystems */
rtsBool
verbose
:
1
;
/* 1 */
rtsBool
bq
:
1
;
/* 2 */
rtsBool
schedule
:
1
;
/* 4 */
rtsBool
free
:
1
;
/* 8 */
rtsBool
resume
:
1
;
/* 16 */
rtsBool
weight
:
1
;
/* 32 */
rtsBool
fetch
:
1
;
/* 64 */
rtsBool
fish
:
1
;
/* 128 */
rtsBool
tables
:
1
;
/* 256 */
rtsBool
packet
:
1
;
/* 512 */
rtsBool
pack
:
1
;
/* 1024 */
rtsBool
paranoia
:
1
;
/* 2048 */
};
#define MAX_PAR_DEBUG_OPTION 11
#define PAR_DEBUG_MASK(n) ((nat)(ldexp(1,n)))
#define MAX_PAR_DEBUG_MASK ((nat)(ldexp(1,(MAX_PAR_DEBUG_OPTION+1))-1))
struct
PAR_FLAGS
{
struct
PAR_STATS_FLAGS
ParStats
;
/* profile and stats output */
struct
PAR_DEBUG_FLAGS
Debug
;
/* debugging options */
rtsBool
outputDisabled
;
/* Disable output for performance purposes */
rtsBool
doFairScheduling
;
/* Fair-ish scheduling (round robin; no time-slices) */
nat
packBufferSize
;
nat
thunksToPack
;
/* number of thunks in packet + 1 */
nat
globalising
;
/* globalisation scheme */
nat
maxLocalSparks
;
/* spark pool size */
nat
maxThreads
;
/* thread pool size */
nat
maxFishes
;
/* max number of active fishes */
rtsTime
fishDelay
;
/* delay before sending a new fish */
long
wait
;
};
#endif
/* PAR */
#ifdef THREADED_RTS
struct
PAR_FLAGS
{
nat
nNodes
;
/* number of threads to run simultaneously */
...
...
@@ -196,121 +146,6 @@ struct PAR_FLAGS {
};
#endif
/* THREADED_RTS */
#ifdef GRAN
struct
GRAN_STATS_FLAGS
{
rtsBool
Full
;
/* Full .gr profile (rtsTrue) or only END events? */
rtsBool
Suppressed
;
/* No .gr profile at all */
rtsBool
Binary
;
/* Binary profile? (not yet implemented) */
rtsBool
Sparks
;
/* Info on sparks in profile? */
rtsBool
Heap
;
/* Info on heap allocs in profile? */
rtsBool
NewLogfile
;
/* Use new log-file format? (not yet implemented) */
rtsBool
Global
;
/* Global statistics? (printed on shutdown; no log file) */
};
struct
GRAN_COST_FLAGS
{
/* Communication Cost Variables -- set in main program */
nat
latency
;
/* Latency for single packet */
nat
additional_latency
;
/* Latency for additional packets */
nat
fetchtime
;
nat
lunblocktime
;
/* Time for local unblock */
nat
gunblocktime
;
/* Time for global unblock */
nat
mpacktime
;
/* Cost of creating a packet */
nat
munpacktime
;
/* Cost of receiving a packet */
nat
mtidytime
;
/* Cost of cleaning up after send */
nat
threadcreatetime
;
/* Thread creation costs */
nat
threadqueuetime
;
/* Cost of adding a thread to the running/runnable queue */
nat
threaddescheduletime
;
/* Cost of descheduling a thread */
nat
threadscheduletime
;
/* Cost of scheduling a thread */
nat
threadcontextswitchtime
;
/* Cost of context switch */
/* Instruction Costs */
nat
arith_cost
;
/* arithmetic instructions (+,i,< etc) */
nat
branch_cost
;
/* branch instructions */
nat
load_cost
;
/* load into register */
nat
store_cost
;
/* store into memory */
nat
float_cost
;
/* floating point operations */
nat
heapalloc_cost
;
/* heap allocation costs */
/* Overhead for granularity control mechanisms */
/* overhead per elem of spark queue */
nat
pri_spark_overhead
;
/* overhead per elem of thread queue */
nat
pri_sched_overhead
;
};
struct
GRAN_DEBUG_FLAGS
{
/* flags to control debugging output in various subsystems */
rtsBool
event_trace
:
1
;
/* 1 */
rtsBool
event_stats
:
1
;
/* 2 */
rtsBool
bq
:
1
;
/* 4 */
rtsBool
pack
:
1
;
/* 8 */
rtsBool
checkSparkQ
:
1
;
/* 16 */
rtsBool
thunkStealing
:
1
;
/* 32 */
rtsBool
randomSteal
:
1
;
/* 64 */
rtsBool
findWork
:
1
;
/* 128 */
rtsBool
unused
:
1
;
/* 256 */
rtsBool
pri
:
1
;
/* 512 */
rtsBool
checkLight
:
1
;
/* 1024 */
rtsBool
sortedQ
:
1
;
/* 2048 */
rtsBool
blockOnFetch
:
1
;
/* 4096 */
rtsBool
packBuffer
:
1
;
/* 8192 */
rtsBool
blockOnFetch_sanity
:
1
;
/* 16384 */
};
#define MAX_GRAN_DEBUG_OPTION 14
#define GRAN_DEBUG_MASK(n) ((nat)(ldexp(1,n)))
#define MAX_GRAN_DEBUG_MASK ((nat)(ldexp(1,(MAX_GRAN_DEBUG_OPTION+1))-1))
struct
GRAN_FLAGS
{
struct
GRAN_STATS_FLAGS
GranSimStats
;
/* profile and stats output */
struct
GRAN_COST_FLAGS
Costs
;
/* cost metric for simulation */
struct
GRAN_DEBUG_FLAGS
Debug
;
/* debugging options */
nat
maxThreads
;
/* ToDo: share with THREADED_RTS and GUM */
/* rtsBool labelling; */
nat
packBufferSize
;
nat
packBufferSize_internal
;
PEs
proc
;
/* number of processors */
rtsBool
Fishing
;
/* Simulate GUM style fishing mechanism? */
nat
maxFishes
;
/* max number of spark or thread steals */
rtsTime
time_slice
;
/* max time slice of one reduction thread */
/* GrAnSim-Light: This version puts no bound on the number of
processors but in exchange doesn't model communication costs
(all communication is 0 cost). Mainly intended to show maximal
degree of parallelism in the program (*not* to simulate the
execution on a real machine). */
rtsBool
Light
;
rtsBool
DoFairSchedule
;
/* fair scheduling alg? default: unfair */
rtsBool
DoAsyncFetch
;
/* async. communication? */
rtsBool
DoStealThreadsFirst
;
/* prefer threads over sparks when stealing */
rtsBool
DoAlwaysCreateThreads
;
/* eager thread creation */
rtsBool
DoBulkFetching
;
/* bulk fetching */
rtsBool
DoThreadMigration
;
/* allow to move threads */
nat
FetchStrategy
;
/* what to do when waiting for data */
rtsBool
PreferSparksOfLocalNodes
;
/* prefer local over global sparks */
rtsBool
DoPrioritySparking
;
/* sparks sorted by priorities */
rtsBool
DoPriorityScheduling
;
/* threads sorted by priorities */
nat
SparkPriority
;
/* threshold for cut-off mechanism */
nat
SparkPriority2
;
rtsBool
RandomPriorities
;
rtsBool
InversePriorities
;
rtsBool
IgnorePriorities
;
nat
ThunksToPack
;
/* number of thunks in packet + 1 */
rtsBool
RandomSteal
;
/* steal spark/thread from random proc */
rtsBool
NoForward
;
/* no forwarding of fetch messages */
/* unsigned int debug; */
/* rtsBool event_trace; */
/* rtsBool event_trace_all; */
};
#endif
/* GRAN */
struct
TICKY_FLAGS
{
rtsBool
showTickyStats
;
FILE
*
tickyFile
;
...
...
@@ -349,12 +184,9 @@ typedef struct _RTS_FLAGS {
#endif
struct
TICKY_FLAGS
TickyFlags
;
#if defined(THREADED_RTS)
|| defined(PAR)
#if defined(THREADED_RTS)
struct
PAR_FLAGS
ParFlags
;
#endif
#ifdef GRAN
struct
GRAN_FLAGS
GranFlags
;
#endif
#ifdef USE_PAPI
struct
PAPI_FLAGS
PapiFlags
;
#endif
...
...
includes/RtsTypes.h
View file @
dd56e9ab
...
...
@@ -41,50 +41,4 @@ typedef enum {
typedef
ullong
rtsTime
;
#if defined(PAR)
/* types only needed in the parallel system */
typedef
struct
hashtable
ParHashTable
;
typedef
struct
hashlist
ParHashList
;
/* typedef double REAL_TIME; */
/* typedef W_ TIME; */
/* typedef GlobalTaskId Proc; */
typedef
int
GlobalTaskId
;
typedef
GlobalTaskId
PEs
;
typedef
unsigned
int
rtsWeight
;
typedef
int
rtsPacket
;
typedef
int
OpCode
;
/* Global addresses i.e. unique ids in a parallel setup; needed in Closures.h*/
typedef
struct
{
union
{
StgPtr
plc
;
struct
{
GlobalTaskId
gtid
;
int
slot
;
}
gc
;
}
payload
;
rtsWeight
weight
;
}
globalAddr
;
/* (GA, LA) pairs */
typedef
struct
gala
{
globalAddr
ga
;
StgPtr
la
;
struct
gala
*
next
;
rtsBool
preferred
;
}
GALA
;
#elif defined(GRAN)
/*
* GlobalTaskId is dummy in GranSim;
* we define it to have cleaner code in the RTS
*/
typedef
int
GlobalTaskId
;
typedef
lnat
rtsTime
;
typedef
StgWord
PEs
;
#endif
#endif
/* RTS_TYPES_H */
includes/SMP.h
View file @
dd56e9ab
includes/SchedAPI.h
View file @
dd56e9ab
...
...
@@ -10,19 +10,10 @@
#ifndef SCHEDAPI_H
#define SCHEDAPI_H
#if defined(GRAN)
/* Dummy def for NO_PRI if not in GranSim */
#define NO_PRI 0
#endif
/*
* Creating threads
*/
#if defined(GRAN)
StgTSO
*
createThread
(
Capability
*
cap
,
nat
stack_size
,
StgInt
pri
);
#else
StgTSO
*
createThread
(
Capability
*
cap
,
nat
stack_size
);
#endif
Capability
*
scheduleWaitThread
(
StgTSO
*
tso
,
/*out*/
HaskellObj
*
ret
,
Capability
*
cap
);
...
...
includes/Stg.h
View file @
dd56e9ab
...
...
@@ -206,9 +206,7 @@ typedef StgWord StgWordArray[];
#include "MachRegs.h"
#include "Regs.h"
#ifdef TICKY_TICKY
#include "TickyCounters.h"
#endif
#if IN_STG_CODE
/*
...
...
includes/StgMiscClosures.h
View file @
dd56e9ab
...
...
@@ -92,12 +92,6 @@ RTS_INFO(stg_BLACKHOLE_info);
RTS_INFO
(
__stg_EAGER_BLACKHOLE_info
);
RTS_INFO
(
stg_CAF_BLACKHOLE_info
);
#if defined(PAR) || defined(GRAN)
RTS_INFO
(
stg_RBH_info
);
#endif
#if defined(PAR)
RTS_INFO
(
stg_FETCH_ME_BQ_info
);
#endif
RTS_FUN_INFO
(
stg_BCO_info
);
RTS_INFO
(
stg_EVACUATED_info
);
RTS_INFO
(
stg_WEAK_info
);
...
...
@@ -147,12 +141,6 @@ RTS_ENTRY(stg_WHITEHOLE_entry);
RTS_ENTRY
(
stg_BLACKHOLE_entry
);
RTS_ENTRY
(
__stg_EAGER_BLACKHOLE_entry
);
RTS_ENTRY
(
stg_CAF_BLACKHOLE_entry
);
#if defined(PAR) || defined(GRAN)
RTS_ENTRY
(
stg_RBH_entry
);
#endif
#if defined(PAR)
RTS_ENTRY
(
stg_FETCH_ME_BQ_entry
);
#endif
RTS_ENTRY
(
stg_BCO_entry
);
RTS_ENTRY
(
stg_EVACUATED_entry
);
RTS_ENTRY
(
stg_WEAK_entry
);
...
...
includes/TSO.h
View file @
dd56e9ab
...
...
@@ -32,16 +32,6 @@ typedef struct {
rtsTime
clock
;
}
StgTSOStatBuf
;
/*
* GRAN: We distinguish between the various classes of threads in
* the system.
*/
typedef
enum
{
AdvisoryPriority
,
MandatoryPriority
,
RevalPriority
}
StgThreadPriority
;
/*
* PROFILING info in a TSO
*/
...
...
@@ -49,25 +39,6 @@ typedef struct {
CostCentreStack
*
CCCS
;
/* thread's current CCS */
}
StgTSOProfInfo
;
/*
* PAR info in a TSO
*/
typedef
StgTSOStatBuf
StgTSOParInfo
;