[Git][ghc/ghc][master] rts: always use StgInt to represent cost center id
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: ab9ab895 by Cheng Shao at 2026-07-21T17:10:53-04:00 rts: always use StgInt to represent cost center id Currently cost center id is modeled as `Int` and it should be `StgInt` uniformly in the RTS, hence this patch. Fixes #27524. - - - - - 5 changed files: - rts/Profiling.c - rts/Trace.c - rts/Trace.h - rts/eventlog/EventLog.c - rts/eventlog/EventLog.h Changes: ===================================== rts/Profiling.c ===================================== @@ -44,9 +44,9 @@ static Arena *prof_arena; * closure_cats */ -static unsigned int CC_ID = 1; -static unsigned int CCS_ID = 1; -static unsigned int DUMPED_CC_ID = 0; // we have dumped all CCs up to this id to the eventlog +static StgInt CC_ID = 1; +static StgInt CCS_ID = 1; +static StgInt DUMPED_CC_ID = 0; // we have dumped all CCs up to this id to the eventlog /* Globals for opening the profiling log file(s) */ ===================================== rts/Trace.c ===================================== @@ -757,7 +757,7 @@ void traceIPE(const InfoProvEnt *ipe) } #if defined(PROFILING) -void traceHeapProfCostCentre(StgWord32 ccID, +void traceHeapProfCostCentre(StgInt ccID, const char *label, const char *module, const char *srcloc, ===================================== rts/Trace.h ===================================== @@ -376,7 +376,7 @@ void traceHeapBioProfSampleBegin(StgInt era, StgWord64 time); void traceHeapProfSampleEnd(StgInt era); void traceHeapProfSampleString(const char *label, StgWord residency); #if defined(PROFILING) -void traceHeapProfCostCentre(StgWord32 ccID, +void traceHeapProfCostCentre(StgInt ccID, const char *label, const char *module, const char *srcloc, ===================================== rts/eventlog/EventLog.c ===================================== @@ -1312,7 +1312,7 @@ void postHeapProfSampleString(const char *label, } #if defined(PROFILING) -void postHeapProfCostCentre(StgWord32 ccID, +void postHeapProfCostCentre(StgInt ccID, const char *label, const char *module, const char *srcloc, ===================================== rts/eventlog/EventLog.h ===================================== @@ -181,7 +181,7 @@ void postHeapProfSampleString(const char *label, StgWord64 residency); #if defined(PROFILING) -void postHeapProfCostCentre(StgWord32 ccID, +void postHeapProfCostCentre(StgInt ccID, const char *label, const char *module, const char *srcloc, View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ab9ab8952b1ff20ed8b092ff95d6a9f8... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ab9ab8952b1ff20ed8b092ff95d6a9f8... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Marge Bot (@marge-bot)