diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 4e310a3a333..1c75307ac2c 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -24,6 +24,7 @@ var/datum/subsystem/garbage_collector/SSgarbage var/list/didntgc = list() // list of all types that have failed to GC associated with the number of times that's happened. // the types are stored as strings + var/list/sleptDestroy = list() //Same as above but these are paths that slept during their Destroy call var/list/noqdelhint = list()// list of all types that do not return a QDEL_HINT // all types that did not respect qdel(A, force=TRUE) and returned one @@ -168,7 +169,10 @@ var/datum/subsystem/garbage_collector/SSgarbage del(D) else if(isnull(D.gc_destroyed)) D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED + var/start_time = world.time var/hint = D.Destroy(force) // Let our friend know they're about to get fucked up. + if(world.time != start_time) + SSgarbage.sleptDestroy["[D.type]"]++ if(!D) return switch(hint) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 97d84323b72..03b49d3340d 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -545,11 +545,17 @@ var/datum/subsystem/ticker/ticker CHECK_TICK //Adds the del() log to world.log in a format condensable by the runtime condenser found in tools - if(SSgarbage.didntgc.len) + if(SSgarbage.didntgc.len || SSgarbage.sleptDestroy.len) var/dellog = "" for(var/path in SSgarbage.didntgc) dellog += "Path : [path] \n" dellog += "Failures : [SSgarbage.didntgc[path]] \n" + if(path in SSgarbage.sleptDestroy) + dellog += "Sleeps : [SSgarbage.sleptDestroy[path]] \n" + SSgarbage.sleptDestroy -= path + for(var/path in SSgarbage.sleptDestroy) + dellog += "Path : [path] \n" + dellog += "Sleeps : [SSgarbage.sleptDestroy[path]] \n" log_world(dellog) CHECK_TICK diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 3193296523d..44f4baaa5fe 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -683,7 +683,6 @@ var/list/TYPES_SHORTCUTS = list( set desc = "Displays a list of things that have failed to GC this round" var/dat = "List of things that failed to GC this round

" - for(var/path in SSgarbage.didntgc) dat += "[path] - [SSgarbage.didntgc[path]] times
" @@ -691,6 +690,10 @@ var/list/TYPES_SHORTCUTS = list( for(var/path in SSgarbage.noqdelhint) dat += "[path]
" + dat += "List of paths that slept in Destroy()

" + for(var/path in SSgarbage.sleptDestroy) + dat += "[path]
" + usr << browse(dat, "window=dellog") /client/proc/debug_huds(i as num)