diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-05-04 20:27:42 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-05-04 20:28:58 +0100 |
commit | f0fcc41d755876a1b02d1c7c79f57515059f6417 (patch) | |
tree | 89cce0cfc61744b1c7b732619ea9de04f21fdcfe /includes | |
parent | 5141baf76132fe0d8f88cfa0a62698cc3b37e48a (diff) | |
download | haskell-f0fcc41d755876a1b02d1c7c79f57515059f6417.tar.gz |
Revert "Per-thread allocation counters and limits"
Problems were found on 32-bit platforms, I'll commit again when I have a fix.
This reverts the following commits:
54b31f744848da872c7c6366dea840748e01b5cf
b0534f78a73f972e279eed4447a5687bd6a8308e
Diffstat (limited to 'includes')
-rw-r--r-- | includes/CodeGen.Platform.hs | 4 | ||||
-rw-r--r-- | includes/rts/Constants.h | 6 | ||||
-rw-r--r-- | includes/rts/Flags.h | 8 | ||||
-rw-r--r-- | includes/rts/Threads.h | 8 | ||||
-rw-r--r-- | includes/rts/storage/TSO.h | 31 |
5 files changed, 14 insertions, 43 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index f3abb3d275..3d6dd41ae4 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -741,8 +741,10 @@ globalRegMaybe CurrentTSO = Just (RealRegSingle REG_CurrentTSO) # ifdef REG_CurrentNursery globalRegMaybe CurrentNursery = Just (RealRegSingle REG_CurrentNursery) # endif -#endif globalRegMaybe _ = Nothing +#else +globalRegMaybe = panic "globalRegMaybe not defined for this platform" +#endif freeReg :: RegNo -> FastBool diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h index a7eef0fb26..842c37b369 100644 --- a/includes/rts/Constants.h +++ b/includes/rts/Constants.h @@ -275,12 +275,6 @@ #define TSO_SQUEEZED 128 /* - * Enables the AllocationLimitExceeded exception when the thread's - * allocation limit goes negative. - */ -#define TSO_ALLOC_LIMIT 256 - -/* * The number of times we spin in a spin lock before yielding (see * #3758). To tune this value, use the benchmark in #3758: run the * server with -N2 and the client both on a dual-core. Also make sure diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index ec542701df..bf6a7f3c5c 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -56,14 +56,6 @@ struct GC_FLAGS { rtsBool doIdleGC; StgWord heapBase; /* address to ask the OS for memory */ - - StgWord allocLimitGrace; /* units: *blocks* - * After an AllocationLimitExceeded - * exception has been raised, how much - * extra space is given to the thread - * to handle the exception before we - * raise it again. - */ }; struct DEBUG_FLAGS { diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h index f6264adfb9..da6f7a4add 100644 --- a/includes/rts/Threads.h +++ b/includes/rts/Threads.h @@ -42,12 +42,8 @@ StgRegTable * resumeThread (void *); // // Thread operations from Threads.c // -int cmp_thread (StgPtr tso1, StgPtr tso2); -int rts_getThreadId (StgPtr tso); -HsInt64 rts_getThreadAllocationCounter (StgPtr tso); -void rts_setThreadAllocationCounter (StgPtr tso, HsInt64 i); -void rts_enableThreadAllocationLimit (StgPtr tso); -void rts_disableThreadAllocationLimit (StgPtr tso); +int cmp_thread (StgPtr tso1, StgPtr tso2); +int rts_getThreadId (StgPtr tso); #if !defined(mingw32_HOST_OS) pid_t forkProcess (HsStablePtr *entry); diff --git a/includes/rts/storage/TSO.h b/includes/rts/storage/TSO.h index b933067574..187b6682e0 100644 --- a/includes/rts/storage/TSO.h +++ b/includes/rts/storage/TSO.h @@ -145,18 +145,15 @@ typedef struct StgTSO_ { */ struct StgBlockingQueue_ *bq; - /* - * The allocation limit for this thread, which is updated as the - * thread allocates. If the value drops below zero, and - * TSO_ALLOC_LIMIT is set in flags, we raise an exception in the - * thread, and give the thread a little more space to handle the - * exception before we raise the exception again. - * - * This is an integer, because we might update it in a place where - * it isn't convenient to raise the exception, so we want it to - * stay negative until we get around to checking it. - */ - StgInt64 alloc_limit; /* in bytes */ +#ifdef TICKY_TICKY + /* TICKY-specific stuff would go here. */ +#endif +#ifdef PROFILING + StgTSOProfInfo prof; +#endif +#ifdef mingw32_HOST_OS + StgWord32 saved_winerror; +#endif /* * sum of the sizes of all stack chunks (in words), used to decide @@ -171,16 +168,6 @@ typedef struct StgTSO_ { */ StgWord32 tot_stack_size; -#ifdef TICKY_TICKY - /* TICKY-specific stuff would go here. */ -#endif -#ifdef PROFILING - StgTSOProfInfo prof; -#endif -#ifdef mingw32_HOST_OS - StgWord32 saved_winerror; -#endif - } *StgTSOPtr; typedef struct StgStack_ { |