mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Merge pull request #24075 from Cyberboss/DestroySleep
Adds logging for path that slept in Destroy
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user