1. 04 Feb, 2015 10 commits
  2. 03 Feb, 2015 26 commits
  3. 02 Feb, 2015 4 commits
    • Austin Clements's avatar
      cmd/6g, liblink, runtime: support saving base pointers · 3c0fee10
      Austin Clements authored
      This adds a "framepointer" GOEXPERIMENT that that makes the amd64
      toolchain maintain base pointer chains in the same way that gcc
      -fno-omit-frame-pointer does.  Go doesn't use these saved base
      pointers, but this does enable external tools like Linux perf and
      VTune to unwind Go stacks when collecting system-wide profiles.
      
      This requires support in the compilers to not clobber BP, support in
      liblink for generating the BP-saving function prologue and unwinding
      epilogue, and support in the runtime to save BPs across preemption, to
      skip saved BPs during stack unwinding and, and to adjust saved BPs
      during stack moving.
      
      As with other GOEXPERIMENTs, everything from the toolchain to the
      runtime must be compiled with this experiment enabled.  To do this,
      run make.bash (or all.bash) with GOEXPERIMENT=framepointer.
      
      Change-Id: I4024853beefb9539949e5ca381adfdd9cfada544
      Reviewed-on: https://go-review.googlesource.com/2992Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      3c0fee10
    • Austin Clements's avatar
      runtime: eliminate uses of BP on amd64 · 20a6ff72
      Austin Clements authored
      Any place that clobbers BP in the runtime can potentially interfere
      with frame pointer unwinding with GOEXPERIMENT=framepointer.  This
      change eliminates uses of BP in the runtime to address this problem.
      We have spare registers everywhere this occurs, so there's no downside
      to eliminating BP.  Where possible, this uses the same new register as
      the amd64p32 runtime, which doesn't use BP due to restrictions placed
      on it by NaCL.
      
      One nice side effect of this is that it will let perf/VTune unwind the
      call stack even through a call to systemstack, which will let us get
      really good call graphs from the garbage collector.
      
      Change-Id: I0ffa14cb4dd2b613a7049b8ec59df37c52286212
      Reviewed-on: https://go-review.googlesource.com/3390Reviewed-by: default avatarMinux Ma <minux@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      20a6ff72
    • Austin Clements's avatar
      runtime: rename m.gcing to m.preemptoff and make it a string · 28b51184
      Austin Clements authored
      m.gcing has become overloaded to mean "don't preempt this g" in
      general.  Once the garbage collector is preemptible, the one thing it
      *won't* mean is that we're in the garbage collector.
      
      So, rename gcing to "preemptoff" and make it a string giving a reason
      that preemption is disabled.  gcing was never set to anything but 0 or
      1, so we don't have to worry about there being a stack of reasons.
      
      Change-Id: I4337c29e8e942e7aa4f106fc29597e1b5de4ef46
      Reviewed-on: https://go-review.googlesource.com/3660Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      28b51184
    • Austin Clements's avatar
      runtime: update a few "onM"s in comments to say "systemstack" · f95becad
      Austin Clements authored
      Commit 656be317 replaced onM with systemstack, but missed updating a
      few comments that still referred to onM.  Update these.
      
      Change-Id: I0efb017e9a66ea0adebb6e1da6e518ee11263f69
      Reviewed-on: https://go-review.googlesource.com/3664Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      f95becad