From 089d363a9187fcefb2e6e9335a7ec2b74eeec003 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 10 Apr 2015 18:32:40 +0300 Subject: runtime: fix tracing of syscall exit Fix tracing of syscall exit after: https://go-review.googlesource.com/#/c/7504/ Change-Id: Idcde2aa826d2b9a05d0a90a80242b6bfa78846ab Reviewed-on: https://go-review.googlesource.com/8728 Reviewed-by: Rick Hudson Run-TryBot: Dmitry Vyukov TryBot-Result: Gobot Gobot --- src/runtime/trace.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/runtime/trace.go') diff --git a/src/runtime/trace.go b/src/runtime/trace.go index 5146850770..a149799527 100644 --- a/src/runtime/trace.go +++ b/src/runtime/trace.go @@ -45,7 +45,7 @@ const ( traceEvGoBlockCond = 26 // goroutine blocks on Cond [timestamp, stack] traceEvGoBlockNet = 27 // goroutine blocks on network [timestamp, stack] traceEvGoSysCall = 28 // syscall enter [timestamp, stack] - traceEvGoSysExit = 29 // syscall exit [timestamp, goroutine id] + traceEvGoSysExit = 29 // syscall exit [timestamp, goroutine id, real timestamp] traceEvGoSysBlock = 30 // syscall blocks [timestamp] traceEvGoWaiting = 31 // denotes that goroutine is blocked when tracing starts [goroutine id] traceEvGoInSyscall = 32 // denotes that goroutine is in syscall when tracing starts [goroutine id] @@ -797,8 +797,8 @@ func traceGoSysCall() { traceEvent(traceEvGoSysCall, 4) } -func traceGoSysExit() { - traceEvent(traceEvGoSysExit, -1, uint64(getg().m.curg.goid)) +func traceGoSysExit(ts int64) { + traceEvent(traceEvGoSysExit, -1, uint64(getg().m.curg.goid), uint64(ts)/traceTickDiv) } func traceGoSysBlock(pp *p) { -- cgit v1.3-5-g9baa