1. 24 Apr, 2016 7 commits
    • Josh Bleecher Snyder's avatar
      cmd/compile: give gc.Op a String method, use it · f0272414
      Josh Bleecher Snyder authored
      Passes toolstash -cmp.
      
      Change-Id: I915e76374fd64aa2597e6fa47e4fa95ca00ca643
      Reviewed-on: https://go-review.googlesource.com/22380
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      f0272414
    • Josh Bleecher Snyder's avatar
      cmd/compile: don't generate algs for map buckets · a6abc1cd
      Josh Bleecher Snyder authored
      Note that this is only safe because
      the compiler generates multiple distinct
      gc.Types. If we switch to having canonical
      gc.Types, then this will need to be updated
      to handle the case in which the user uses both
      map[T]S and also map[[8]T]S. In that case,
      the runtime needs algs for [8]T, but this could
      mark the sole [8]T type as Noalg. This is a general
      problem with having a single bool to represent
      whether alg generation is needed for a type.
      
      Cuts 5k off cmd/go and 22k off golang.org/x/tools/cmd/godoc,
      approx 0.04% and 0.12% respectively.
      
      For #6853 and #9930
      
      Change-Id: I30a15ec72ecb62e2aa053260a7f0f75015fc0ade
      Reviewed-on: https://go-review.googlesource.com/19769Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a6abc1cd
    • Josh Bleecher Snyder's avatar
      cmd/compile: don't generate algs for ... args · b6b144bf
      Josh Bleecher Snyder authored
      Note that this is only safe because
      the compiler generates multiple distinct
      gc.Types. If we switch to having canonical
      gc.Types, then this will need to be updated
      to handle the case in which the user uses both
      map[[n]T]S and also calls a function f(...T) with n arguments.
      In that case, the runtime needs algs for [n]T, but this could
      mark the sole [n]T type as Noalg. This is a general
      problem with having a single bool to represent
      whether alg generation is needed for a type.
      
      Cuts 17k off cmd/go and 13k off golang.org/x/tools/cmd/godoc,
      approx 0.14% and 0.07% respectively.
      
      For #6853 and #9930
      
      Change-Id: Iccb6b9fd88ade5497d7090528a903816d340bf0a
      Reviewed-on: https://go-review.googlesource.com/19770Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b6b144bf
    • Keith Randall's avatar
      cmd/compile: reorder how slicelit initializes a slice · 934c3599
      Keith Randall authored
        func f(x, y, z *int) {
          a := []*int{x,y,z}
          ...
        }
      
      We used to use:
        var tmp [3]*int
        a := tmp[:]
        a[0] = x
        a[1] = y
        a[2] = z
      
      Now we do:
        var tmp [3]*int
        tmp[0] = x
        tmp[1] = y
        tmp[2] = z
        a := tmp[:]
      
      Doesn't sound like a big deal, but the compiler has trouble
      eliminating write barriers when using the former method because it
      doesn't know that the slice points to the stack.  In the latter
      method, the compiler knows the array is on the stack and as a result
      doesn't emit any write barriers.
      
      This turns out to be extremely common when building ... args, like
      for calls fmt.Printf.
      
      Makes go binaries ~1% smaller.
      
      Doesn't have a measurable effect on the go1 fmt benchmarks,
      unfortunately.
      
      Fixes #14263
      Update #6853
      
      Change-Id: I9074a2788ec9e561a75f3b71c119b69f304d6ba2
      Reviewed-on: https://go-review.googlesource.com/22395
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      934c3599
    • Dmitry Vyukov's avatar
      internal/trace: fix event ordering for coarse timestamps · c4c18214
      Dmitry Vyukov authored
      Arm arch uses coarse-grained kernel timer as cputicks.
      As the result sort.Sort smashes trace entirely. Use sort.Stable instead.
      
      Change-Id: Idfa017a86a489be58cf239f7fe56d7f4b66b52a9
      Reviewed-on: https://go-review.googlesource.com/22317
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      c4c18214
    • Dmitry Vyukov's avatar
      runtime/trace: test detection of broken timestamps · 75b844f0
      Dmitry Vyukov authored
      On some processors cputicks (used to generate trace timestamps)
      produce non-monotonic timestamps. It is important that the parser
      distinguishes logically inconsistent traces (e.g. missing, excessive
      or misordered events) from broken timestamps. The former is a bug
      in tracer, the latter is a machine issue.
      
      Test that (1) parser does not return a logical error in case of
      broken timestamps and (2) broken timestamps are eventually detected
      and reported.
      
      Change-Id: Ib4b1eb43ce128b268e754400ed8b5e8def04bd78
      Reviewed-on: https://go-review.googlesource.com/21608Reviewed-by: 's avatarAustin Clements <austin@google.com>
      75b844f0
    • Alex Brainman's avatar
      debug/pe: introduce File.COFFSymbols and (*COFFSymbol).FullName · 687fe991
      Alex Brainman authored
      Reloc.SymbolTableIndex is an index into symbol table. But
      Reloc.SymbolTableIndex cannot be used as index into File.Symbols,
      because File.Symbols slice has Aux lines removed as it is built.
      
      We cannot change the way File.Symbols works, so I propose we
      introduce new File.COFFSymbols that does not have that limitation.
      
      Also unlike File.Symbols, File.COFFSymbols will consist of
      COFFSymbol. COFFSymbol matches PE COFF specification exactly,
      and it is simpler to use.
      
      Updates #15345
      
      Change-Id: Icbc265853a472529cd6d64a76427b27e5459e373
      Reviewed-on: https://go-review.googlesource.com/22336Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      687fe991
  2. 23 Apr, 2016 5 commits
  3. 22 Apr, 2016 26 commits
  4. 21 Apr, 2016 2 commits