clean up a few stray c_stdout's in gc debug code

This commit is contained in:
Jacek Sieka 2016-07-31 08:34:42 +08:00
commit b3846124e6
5 changed files with 20 additions and 19 deletions

View file

@ -51,6 +51,7 @@ type
waMarkGlobal, # part of the backup/debug mark&sweep
waMarkPrecise, # part of the backup/debug mark&sweep
waZctDecRef, waPush
#, waDebug
Finalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign.}
# A ref type can have a finalizer that is called before the object's
@ -654,7 +655,7 @@ when logGC:
else:
writeCell("cell {", s)
forAllChildren(s, waDebug)
c_fprintf(c_stdout, "}\n")
c_fprintf(stdout, "}\n")
proc doOperation(p: pointer, op: WalkOp) =
if p == nil: return
@ -665,7 +666,7 @@ proc doOperation(p: pointer, op: WalkOp) =
case op
of waZctDecRef:
#if not isAllocatedPtr(gch.region, c):
# c_fprintf(c_stdout, "[GC] decref bug: %p", c)
# c_fprintf(stdout, "[GC] decref bug: %p", c)
gcAssert(isAllocatedPtr(gch.region, c), "decRef: waZctDecRef")
gcAssert(c.refcount >=% rcIncrement, "doOperation 2")
#c.refcount = c.refcount -% rcIncrement
@ -828,7 +829,7 @@ proc collectCTBody(gch: var GcHeap) =
gch.stat.maxPause = max(gch.stat.maxPause, duration)
when defined(reportMissedDeadlines):
if gch.maxPause > 0 and duration > gch.maxPause:
c_fprintf(c_stdout, "[GC] missed deadline: %ld\n", duration)
c_fprintf(stdout, "[GC] missed deadline: %ld\n", duration)
when defined(nimCoroutines):
proc currentStackSizes(): int =