From 96a3242c6e4223f5dfd7e7c6f8466e23c2fd76e7 Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 25 Mar 2020 00:13:04 -0400 Subject: [PATCH] Remove temporary debug logging from SStimer --- code/__defines/subsystems.dm | 1 - code/controllers/subsystems/timer.dm | 31 ++-------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 8ec18fc0a70..86d40ff1700 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -78,7 +78,6 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) #define FIRE_PRIORITY_SHUTTLES 5 -#define FIRE_PRIORITY_TIMERS 7 //VOREStation Emergency Edit #define FIRE_PRIORITY_ORBIT 8 #define FIRE_PRIORITY_VOTE 9 #define FIRE_PRIORITY_AI 10 diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index bf68a1445f8..64a347336a2 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -27,8 +27,6 @@ SUBSYSTEM_DEF(timer) var/last_invoke_tick = 0 var/static/last_invoke_warning = 0 var/static/bucket_auto_reset = TRUE - var/static/datum/timedevent/timer // VOREStation Edit - For debugging this goes here. - var/super_debug = FALSE // VOREStation Edit - Temporary Debugging /datum/controller/subsystem/timer/PreInit() bucket_list.len = BUCKET_LEN @@ -104,13 +102,11 @@ SUBSYSTEM_DEF(timer) if (next_clienttime_timer_index) clienttime_timers.Cut(1, next_clienttime_timer_index+1) - var/pre_state = src.state if (MC_TICK_CHECK) - log_world("Timer bailing before execution at world.time=[world.time] with LIT=[last_invoke_tick], TICK_USAGE=[TICK_USAGE], current_ticklimit=[Master.current_ticklimit], state=[pre_state] -> [src.state], queued_priority=[queued_priority] tick_overrun=[tick_overrun]") // VOREStation Edit - Debugging return var/static/list/spent = list() - // var/static/datum/timedevent/timer VOREStation Edit - for debugging purpose putting this as datum scope + var/static/datum/timedevent/timer if (practical_offset > BUCKET_LEN) head_offset += TICKS2DS(BUCKET_LEN) practical_offset = 1 @@ -143,15 +139,8 @@ SUBSYSTEM_DEF(timer) last_invoke_tick = world.time if (MC_TICK_CHECK) - if (super_debug) log_world("Bailing from execution with practical_offset=[practical_offset] and timer=[timer]") // VOREStation Edit - Super Debug return - // VOREStation Edit Start - Debugging - if (timer.next == timer && timer.next != head) - log_world("Self-looping out of bucket timer failure condition X occurred") - CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") - // VOREStation Edit End - Debugging - timer = timer.next if (timer == head) break @@ -246,11 +235,6 @@ SUBSYSTEM_DEF(timer) /datum/controller/subsystem/timer/proc/reset_buckets() var/list/bucket_list = src.bucket_list - // VOREStation Edit Start - Debugging - log_world("Beginning Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \ - world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \ - head_offset: [head_offset], practical_offset: [practical_offset]") - // VOREStation Edit End - Debugging var/list/alltimers = list() //collect the timers currently in the bucket for (var/bucket_head in bucket_list) @@ -272,11 +256,6 @@ SUBSYSTEM_DEF(timer) alltimers += second_queue if (!length(alltimers)) - // VOREStation Edit Start - Debugging - log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \ - world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \ - head_offset: [head_offset], practical_offset: [practical_offset] (NO TIMERS)") - // VOREStation Edit End - Debugging return sortTim(alltimers, /proc/cmp_timer) @@ -323,11 +302,7 @@ SUBSYSTEM_DEF(timer) alltimers.Cut(1, i+1) second_queue = alltimers bucket_count = new_bucket_count - // VOREStation Edit Start - Debugging - log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \ - world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \ - head_offset: [head_offset], practical_offset: [practical_offset]") - // VOREStation Edit End - Debugging + /datum/controller/subsystem/timer/Recover() second_queue |= SStimer.second_queue @@ -421,8 +396,6 @@ SUBSYSTEM_DEF(timer) var/datum/timedevent/buckethead if(bucketpos > 0) buckethead = bucket_list[bucketpos] - else // VOREStation Edit - Debugging - log_world("WARNING: non-positive bucket pos [bucketpos] for [src]! next=[next ? next : "NULL"] prev=[prev ? prev : "NULL"]") // VOREStation Edit - Debugging if(buckethead == src) bucket_list[bucketpos] = next SStimer.bucket_count--