Go: build: enable frame pointers by default

Created on 25 May 2016  ·  7Comments  ·  Source: golang/go

We plan to make GOEXPERIMENT=framepointer the default for the Go 1.7 beta 1,
as a trial balloon toward leaving it on for the Go 1.7 release.
There is a small performance hit to having frame pointers enabled
(typically 1-3%), but this release brings with it significantly more
than that due to SSA, so we have the budget available to do this without
slowing down user programs compared to the previous release.

Having frame pointers on by default means that Linux perf, Intel VTune,
and other profilers can grab Go stack traces much more efficiently,
making the profiles significantly more reflective of reality.
This is a good default to have. The performance work enabled by this
probably also significantly outweighs the slowdown.

/cc @aclements @randall77

FrozenDueToAge

Most helpful comment

@OneOfOne Re 'debug option', there are other things we leave on by default because when you need them you really need them, for example the heap profiler or for that matter the garbage collector. It's OK to spend a tiny amount of time making programs easier to write/debug/understand/optimize.

That said, yes in the CL, you can turn it off with GOEXPERIMENT=noframepointer.

All 7 comments

CL https://golang.org/cl/23451 mentions this issue.

Found OS X problem - alignment in library startup.

Is there any chance to add a flag to turn it off? It's nice and all, but it should be more of a debug option than an always on kinda thing.

My two cents.

@OneOfOne Re 'debug option', there are other things we leave on by default because when you need them you really need them, for example the heap profiler or for that matter the garbage collector. It's OK to spend a tiny amount of time making programs easier to write/debug/understand/optimize.

That said, yes in the CL, you can turn it off with GOEXPERIMENT=noframepointer.

CL https://golang.org/cl/23458 mentions this issue.

CL https://golang.org/cl/23457 mentions this issue.

@rsc thank you for enabling frame pointers, I've been using perf all morning and it's wonderful to have real backtraces.

Was this page helpful?
0 / 5 - 0 ratings