diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 08:46:55 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 10:56:58 +0000 |
commit | 7e7a4e4d7e9e84b2c57d3d55e372e738b5f8dbf5 (patch) | |
tree | b5ab2b56418c09f01275970cc7d4e6629b0e7b43 /rts/Stable.h | |
parent | 65a0e1eb88fb48d085f8da498a7acc2fd345c2a8 (diff) | |
download | haskell-7e7a4e4d7e9e84b2c57d3d55e372e738b5f8dbf5.tar.gz |
Separate StablePtr and StableName tables (#7674)
To improve performance of StablePtr.
Diffstat (limited to 'rts/Stable.h')
-rw-r--r-- | rts/Stable.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/rts/Stable.h b/rts/Stable.h index bec932af97..4786d477f3 100644 --- a/rts/Stable.h +++ b/rts/Stable.h @@ -21,17 +21,28 @@ void freeStablePtr ( StgStablePtr sp ); -void initStablePtrTable ( void ); -void exitStablePtrTable ( void ); -StgWord lookupStableName ( StgPtr p ); +/* Use the "Unsafe" one after manually locking with stableLock/stableUnlock */ +void freeStablePtrUnsafe ( StgStablePtr sp ); -void markStablePtrTable ( evac_fn evac, void *user ); -void threadStablePtrTable ( evac_fn evac, void *user ); -void gcStablePtrTable ( void ); -void updateStablePtrTable ( rtsBool full ); +void initStableTables ( void ); +void exitStableTables ( void ); +StgWord lookupStableName ( StgPtr p ); -void stablePtrPreGC ( void ); -void stablePtrPostGC ( void ); +/* Call given function on every stable ptr. markStableTables depends + * on the function updating its pointers in case the object is + * moved. */ +/* TODO: This also remembers old stable name addresses, which isn't + * necessary in some contexts markStableTables is called from. + * Consider splitting it. + */ +void markStableTables ( evac_fn evac, void *user ); + +void threadStableTables ( evac_fn evac, void *user ); +void gcStableTables ( void ); +void updateStableTables ( rtsBool full ); + +void stableLock ( void ); +void stableUnlock ( void ); #ifdef THREADED_RTS // needed by Schedule.c:forkProcess() |