From 5216caab664e6bebf26622418408ac7d41efb0b8 Mon Sep 17 00:00:00 2001 From: Cheng Shao <terrorjack@type.dance> Date: Fri, 16 Feb 2024 04:23:55 +0000 Subject: [PATCH] rts: remove redundant rCCCS initialization This commit removes the redundant logic of initializing each Capability's rCCCS to CCS_SYSTEM in initProfiling(). Before initProfiling() is called during RTS startup, each Capability's rCCCS has already been assigned CCS_SYSTEM when they're first initialized. (cherry picked from commit a75694958de7edc12aefe3ebc8806b3a27fceb05) --- rts/Profiling.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rts/Profiling.c b/rts/Profiling.c index c3408fb8098..b3ca40d489e 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -150,14 +150,6 @@ void initProfiling (void) // initialise our arena prof_arena = newArena(); - /* for the benefit of allocate()... */ - { - uint32_t n; - for (n=0; n < getNumCapabilities(); n++) { - getCapability(n)->r.rCCCS = CCS_SYSTEM; - } - } - #if defined(THREADED_RTS) initMutex(&ccs_mutex); #endif -- GitLab