runtime: enable profiling on g0

Since we now have stack information for code running on the
systemstack, we can traceback over it. To make cpu profiles useful,
add a case in gentraceback to jump over systemstack switches.

Fixes #10609.

Change-Id: I21f47fcc802c07c5d4a1ada56374314e388a6dc7
Reviewed-on: https://go-review.googlesource.com/9506
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit is contained in:
Daniel Morsing 2015-04-30 15:32:54 +01:00
parent 19e81a9b3b
commit db6f88a84b
12 changed files with 105 additions and 142 deletions

View file

@ -594,8 +594,9 @@ type stkframe struct {
}
const (
_TraceRuntimeFrames = 1 << 0 // include frames for internal runtime functions.
_TraceTrap = 1 << 1 // the initial PC, SP are from a trap, not a return PC from a call
_TraceRuntimeFrames = 1 << iota // include frames for internal runtime functions.
_TraceTrap // the initial PC, SP are from a trap, not a return PC from a call
_TraceJumpStack // if traceback is on a systemstack, resume trace at g that called into it
)
const (