1. 24 Feb, 2017 4 commits
    • Russ Cox's avatar
      runtime/pprof: use new profile buffers for CPU profiling · 1a680a90
      Russ Cox authored
      This doesn't change the functionality of the current code,
      but it sets us up for exporting the profiling labels into the profile.
      
      The old code had a hash table of profile samples maintained
      during the signal handler, with evictions going into a log.
      The new code just logs every sample directly, leaving the
      hash-based deduplication to an ordinary goroutine.
      
      The new code also avoids storing the entire profile in two
      forms in memory, an unfortunate regression introduced
      when binary profile support was added. After this CL the
      entire profile is only stored once in memory. We'd still like
      to get back down to storing it zero times (streaming it to
      the underlying io.Writer).
      
      Change-Id: I0893a1788267c564aa1af17970d47377b2a43457
      Reviewed-on: https://go-review.googlesource.com/36712
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMichael Matloob <matloob@golang.org>
      1a680a90
    • Russ Cox's avatar
      runtime: do not allocate on every time.Sleep · a1261b8b
      Russ Cox authored
      It's common for some goroutines to loop calling time.Sleep.
      Allocate once per goroutine, not every time.
      This comes up in runtime/pprof's background reader.
      
      Change-Id: I89d17dc7379dca266d2c9cd3aefc2382f5bdbade
      Reviewed-on: https://go-review.googlesource.com/37162Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      a1261b8b
    • Joe Tsai's avatar
      cmd/doc: truncate long lists of arguments · a1ea9121
      Joe Tsai authored
      Some field-lists (especially in generated code) can be excessively long.
      In the one-line printout, it does not make sense to print all elements
      of the list if line-wrapping causes the "one-line" to become multi-line.
      
      // Before:
      var LongLine = newLongLine("someArgument1", "someArgument2", "someArgument3", "someArgument4", "someArgument5", "someArgument6", "someArgument7", "someArgument8")
      
      // After:
      var LongLine = newLongLine("someArgument1", "someArgument2", "someArgument3", "someArgument4", ...)
      
      Change-Id: I4bbbe2dbd1d7be9f02d63431d213088c3dee332c
      Reviewed-on: https://go-review.googlesource.com/36031
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRob Pike <r@golang.org>
      a1ea9121
    • Joe Tsai's avatar
      crypto/tls: use io.ReadFull in conn_test.go · ea5529de
      Joe Tsai authored
      An io.Reader does not guarantee that it will read in the entire buffer.
      To ensure that property, io.ReadFull should be used instead.
      
      Change-Id: I0b863135ab9abc40e813f9dac07bfb2a76199950
      Reviewed-on: https://go-review.googlesource.com/37403Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ea5529de
  2. 23 Feb, 2017 8 commits
  3. 22 Feb, 2017 15 commits
  4. 21 Feb, 2017 13 commits