Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/e12bec813e8a5077615c8113a2b8875d5fefc9da >--------------------------------------------------------------- commit e12bec813e8a5077615c8113a2b8875d5fefc9da Author: Simon Marlow <[email protected]> Date: Wed Apr 11 10:58:56 2012 +0100 Fix crash with debug tracing and the new heap events >--------------------------------------------------------------- rts/Trace.c | 38 ++++++++++++++++++++++++++++---------- 1 files changed, 28 insertions(+), 10 deletions(-) diff --git a/rts/Trace.c b/rts/Trace.c index 089bf24..de33563 100644 --- a/rts/Trace.c +++ b/rts/Trace.c @@ -325,8 +325,14 @@ void traceHeapEvent_ (Capability *cap, CapsetID heap_capset, lnat info1) { - /* no stderr equivalent for these ones */ - postHeapEvent(cap, tag, heap_capset, info1); +#ifdef DEBUG + if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) { + /* no stderr equivalent for these ones */ + } else +#endif + { + postHeapEvent(cap, tag, heap_capset, info1); + } } void traceEventHeapInfo_ (CapsetID heap_capset, @@ -336,10 +342,16 @@ void traceEventHeapInfo_ (CapsetID heap_capset, lnat mblockSize, lnat blockSize) { - /* no stderr equivalent for this one */ - postEventHeapInfo(heap_capset, gens, - maxHeapSize, allocAreaSize, - mblockSize, blockSize); +#ifdef DEBUG + if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) { + /* no stderr equivalent for these ones */ + } else +#endif + { + postEventHeapInfo(heap_capset, gens, + maxHeapSize, allocAreaSize, + mblockSize, blockSize); + } } void traceEventGcStats_ (Capability *cap, @@ -352,10 +364,16 @@ void traceEventGcStats_ (Capability *cap, lnat par_max_copied, lnat par_tot_copied) { - /* no stderr equivalent for this one */ - postEventGcStats(cap, heap_capset, gen, - copied, slop, fragmentation, - par_n_threads, par_max_copied, par_tot_copied); +#ifdef DEBUG + if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) { + /* no stderr equivalent for these ones */ + } else +#endif + { + postEventGcStats(cap, heap_capset, gen, + copied, slop, fragmentation, + par_n_threads, par_max_copied, par_tot_copied); + } } void traceCapEvent (Capability *cap, _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
