• Hana Kim's avatar
    cmd/trace: don't drop sweep slice details · e57f24ab
    Hana Kim authored
    For sweep events, we used to modify the ViewerEvent returned from
    ctx.emitSlice later in order to embed more details about the sweep
    operation. The trick no longer works after the change
    https://golang.org/cl/92375 and caused a regression.
    
    ctx.emit method encodes the ViewerEvent, so any modification to the
    ViewerEvent object after ctx.emit returns will not be reflected.
    
    Refactor ctx.emitSlice, so ctx.makeSlice can be used when producing
    slices for SWEEP. ctx.emit* methods are meant to truely emit
    ViewerEvents.
    
    Fixes #27711
    
    Change-Id: I0b733ebbbfd4facd8714db0535809ec3cab0833d
    Reviewed-on: https://go-review.googlesource.com/135775Reviewed-by: 's avatarAustin Clements <austin@google.com>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    e57f24ab
Name
Last commit
Last update
..
annotations.go Loading commit data...
annotations_test.go Loading commit data...
doc.go Loading commit data...
goroutines.go Loading commit data...
main.go Loading commit data...
pprof.go Loading commit data...
trace.go Loading commit data...
trace_test.go Loading commit data...
trace_unix_test.go Loading commit data...