diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2020-09-18 14:03:42 +0000 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2020-09-18 14:03:42 +0000 |
commit | 219987f9b7934ec4bfc758186dcedd20953e1c11 (patch) | |
tree | c00326a647c61dcfb9a8b4555941c177d8081e1d | |
parent | 4571d4ea00e6ea86df45be3e890f9fd18aae1a79 (diff) | |
download | haskell-wip/angerman/ghc-8.6-tsan-2.tar.gz |
-rw-r--r-- | includes/rts/storage/GC.h | 8 | ||||
-rw-r--r-- | rts/sm/GC.c | 11 | ||||
-rw-r--r-- | rts/sm/Storage.c | 14 |
3 files changed, 2 insertions, 31 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index fa7ec3c048..d12f17cd81 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -229,7 +229,7 @@ void setKeepCAFs (void); and is put on the mutable list. -------------------------------------------------------------------------- */ -void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); +void dirty_MUT_VAR(StgRegTable *reg, StgMutVar *p); /* set to disable CAF garbage collection in GHCi. */ /* (needed when dynamic libraries are used). */ @@ -240,10 +240,4 @@ INLINE_HEADER void initBdescr(bdescr *bd, generation *gen, generation *dest) RELAXED_STORE(&bd->gen, gen); RELAXED_STORE(&bd->gen_no, gen->no); RELAXED_STORE(&bd->dest_no, dest->no); - -#if !IN_STG_CODE - /* See Note [RtsFlags is a pointer in STG code] */ - ASSERT(gen->no < RtsFlags.GcFlags.generations); - ASSERT(dest->no < RtsFlags.GcFlags.generations); -#endif } diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 520efeff6e..b9b95a5b34 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -1484,17 +1484,6 @@ prepare_collected_gen (generation *gen) /* ---------------------------------------------------------------------------- - Save the mutable lists in saved_mut_lists - ------------------------------------------------------------------------- */ - -static void -stash_mut_list (Capability *cap, uint32_t gen_no) -{ - cap->saved_mut_lists[gen_no] = cap->mut_lists[gen_no]; - cap->mut_lists[gen_no] = allocBlockOnNode_sync(cap->node); -} - -/* ---------------------------------------------------------------------------- Initialise a generation that is *not* to be collected ------------------------------------------------------------------------- */ diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 2d2593bc43..0431e69402 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -1079,7 +1079,7 @@ allocatePinned (Capability *cap, W_ n) and is put on the mutable list. */ void -dirty_MUT_VAR(StgRegTable *reg, StgClosure *p) +dirty_MUT_VAR(StgRegTable *reg, StgMutVar *mvar) { Capability *cap = regTableToCapability(reg); // No barrier required here as no other heap object fields are read. See @@ -1373,19 +1373,7 @@ StgWord calcTotalCompactW (void) #include <libkern/OSCacheControl.h> #endif -#if defined(__clang__) -/* clang defines __clear_cache as a builtin on some platforms. - * For example on armv7-linux-androideabi. The type slightly - * differs from gcc. - */ extern void __clear_cache(void * begin, void * end); -#elif defined(__GNUC__) -/* __clear_cache is a libgcc function. - * It existed before __builtin___clear_cache was introduced. - * See Trac #8562. - */ -extern void __clear_cache(char * begin, char * end); -#endif /* __GNUC__ */ /* On ARM and other platforms, we need to flush the cache after writing code into memory, so the processor reliably sees it. */ |