Cheng Shao pushed to branch wip/remove-alloc_p_ticky at Glasgow Haskell Compiler / GHC
Commits:
-
f3c18890
by Samuel Thibault at 2026-01-10T15:48:22+01:00
-
7f15bd15
by Samuel Thibault at 2026-01-12T07:16:25-05:00
-
1db2f240
by Andrew Lelechenko at 2026-01-12T07:17:06-05:00
-
e038a383
by Sven Tennie at 2026-01-12T07:17:49-05:00
-
b6731ff9
by Cheng Shao at 2026-01-12T13:43:21+01:00
-
c7d17058
by Cheng Shao at 2026-01-12T13:43:44+01:00
7 changed files:
- .gitignore
- libraries/base/src/Data/Bifoldable1.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
- libraries/ghc-platform/src/GHC/Platform/ArchOS.hs
- rts/include/Cmm.h
- rts/include/stg/Ticky.h
- rts/sm/Storage.c
Changes:
| ... | ... | @@ -256,3 +256,12 @@ ghc.nix/ |
| 256 | 256 | # clangd
|
| 257 | 257 | .clangd
|
| 258 | 258 | dist-newstyle/
|
| 259 | + |
|
| 260 | +# -----------------------------------------------------------------------------
|
|
| 261 | +# CI
|
|
| 262 | + |
|
| 263 | +# Windows CI
|
|
| 264 | +toolchain/
|
|
| 265 | +ghc-*/
|
|
| 266 | +inplace/
|
|
| 267 | +tmp/ |
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | -- Copyright: Edward Kmett, Oleg Grenrus
|
| 3 | 3 | -- License: BSD-3-Clause
|
| 4 | 4 | --
|
| 5 | +-- @since 4.18.0.0
|
|
| 5 | 6 | |
| 6 | 7 | {-# LANGUAGE NoImplicitPrelude #-}
|
| 7 | 8 | {-# LANGUAGE Safe #-}
|
| ... | ... | @@ -51,7 +51,7 @@ import GHC.Internal.Foreign.Ptr |
| 51 | 51 | import GHC.Internal.Foreign.Storable
|
| 52 | 52 | import GHC.Internal.System.IO.Error (isDoesNotExistError)
|
| 53 | 53 | import GHC.Internal.System.Posix.Internals
|
| 54 | -#elif defined(linux_HOST_OS)
|
|
| 54 | +#elif defined(linux_HOST_OS) || defined(gnu_HOST_OS)
|
|
| 55 | 55 | import GHC.Internal.Data.Functor
|
| 56 | 56 | import GHC.Internal.Data.List (isSuffixOf)
|
| 57 | 57 | import GHC.Internal.Foreign.C.Types
|
| ... | ... | @@ -156,7 +156,7 @@ stringEncodeOS = \case |
| 156 | 156 | OSHaiku -> "haiku"
|
| 157 | 157 | OSQNXNTO -> "nto-qnx"
|
| 158 | 158 | OSAIX -> "aix"
|
| 159 | - OSHurd -> "hurd"
|
|
| 159 | + OSHurd -> "gnu"
|
|
| 160 | 160 | OSWasi -> "wasi"
|
| 161 | 161 | OSGhcjs -> "ghcjs"
|
| 162 | 162 |
| ... | ... | @@ -441,12 +441,6 @@ |
| 441 | 441 | #define HP_CHK_P(bytes, fun, arg) \
|
| 442 | 442 | HEAP_CHECK(bytes, GC_PRIM_P(fun,arg))
|
| 443 | 443 | |
| 444 | -// TODO I'm not seeing where ALLOC_P_TICKY is used; can it be removed?
|
|
| 445 | -// -NSF March 2013
|
|
| 446 | -#define ALLOC_P_TICKY(bytes, fun, arg) \
|
|
| 447 | - HP_CHK_P(bytes); \
|
|
| 448 | - TICK_ALLOC_RTS(bytes);
|
|
| 449 | - |
|
| 450 | 444 | // Load a field out of structure with relaxed ordering.
|
| 451 | 445 | #define RELAXED_LOAD_FIELD(fld, ptr) \
|
| 452 | 446 | REP_##fld![(ptr) + OFFSET_##fld]
|
| ... | ... | @@ -246,7 +246,7 @@ EXTERN StgInt RET_UNBOXED_TUP_hst[TICKY_BIN_COUNT] INIT({0}); |
| 246 | 246 | TICK_BUMP_BY(ALLOC_THK_gds,g);\
|
| 247 | 247 | TICK_BUMP_BY(ALLOC_THK_slp,s);\
|
| 248 | 248 | |
| 249 | -#define TICK_ALLOC_RTS(bytes)\
|
|
| 249 | +#define TICK_ALLOC_RTS(n)\
|
|
| 250 | 250 | TICK_BUMP(ALLOC_RTS_ctr);\
|
| 251 | 251 | TICK_BUMP_BY(ALLOC_RTS_tot,n);
|
| 252 | 252 | #endif |
| ... | ... | @@ -990,7 +990,7 @@ move_STACK (StgStack *src, StgStack *dest) |
| 990 | 990 | void
|
| 991 | 991 | accountAllocation(Capability *cap, W_ n)
|
| 992 | 992 | {
|
| 993 | - TICK_ALLOC_RTS(WDS(n));
|
|
| 993 | + TICK_ALLOC_RTS(n*sizeof(W_));
|
|
| 994 | 994 | CCS_ALLOC(cap->r.rCCCS,n);
|
| 995 | 995 | if (cap->r.rCurrentTSO != NULL) {
|
| 996 | 996 | // cap->r.rCurrentTSO->alloc_limit -= n*sizeof(W_)
|