1. 15 Nov, 2018 4 commits
    • Austin Clements's avatar
      runtime: record in-use spans in a page-indexed bitmap · 69e666e4
      Austin Clements authored
      This adds a bitmap indexed by page number that marks the starts of
      in-use spans. This will be used to quickly find in-use spans with no
      marked objects for sweeping.
      
      For #18155.
      
      Change-Id: Icee56f029cde502447193e136fa54a74c74326dd
      Reviewed-on: https://go-review.googlesource.com/c/138957
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      Reviewed-by: 's avatarMichael Knyszek <mknyszek@google.com>
      69e666e4
    • Austin Clements's avatar
      runtime: track all heap arenas in a slice · e500ffd8
      Austin Clements authored
      Currently, there's no efficient way to iterate over the Go heap. We're
      going to need this for fast free page sweeping, so this CL adds a
      slice of all allocated heap arenas. This will also be useful for
      generational GC.
      
      For #18155.
      
      Change-Id: I58d126cfb9c3f61b3125d80b74ccb1b2169efbcc
      Reviewed-on: https://go-review.googlesource.com/c/138076
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      e500ffd8
    • Alan Donovan's avatar
      cmd/vet/all: use x/tools/go/analysis/cmd/vet not cmd/vet · b2df0bd5
      Alan Donovan authored
      cmd/vet/all applies vet to all packages in the standard tree.
      It is run for every configuration using this command:
        GO_BUILDER_NAME=misc-vetall go tool dist test
      by the misc-vetall builder (see chart at build.golang.org).
      
      Ideally we would switch to 'go vet', but it effectively does a partial
      build. This means that its analysis has accurate type information, so
      it reports slightly fewer spurious diagnostics. However, it is more
      than twice as slow.
      
      Instead, cmd/vet/all builds and runs
      golang.org/x/tools/go/analysis/cmd/vet, which uses x/tools/go/packages
      to load the entire std lib from source. It takes about 4min to run all
      OS/ARCH pairs. An important consequence is that golang.org/x/tools
      must be on your $GOPATH to run cmd/vet/all. The test has been
      temporarily modified to warn and skip if this is not the case.
      
      This is a preparatory step for switching to the new
      cmd/vet based on vet-lite.
      
      Whitelist changes:
      - The two "deadcode" diagnostics removed from the whitelist were due
        to if-conditions that could now be proven false.
      - The asmdecl warnings are now printed with the log.Printf prefix,
        so they are discarded by the parser and needn't be whitelisted.
      
      Change-Id: I6486508b0de2cd947c897523af086a408cbaf4a8
      Reviewed-on: https://go-review.googlesource.com/c/149097Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b2df0bd5
    • Alan Donovan's avatar
      cmd/vendor: update to golang.org/x/tools@f62bfb54 · a18638c0
      Alan Donovan authored
      Change-Id: I3b3035784ce89ba2ac5ab8f6448c45a3d38fa97d
      Reviewed-on: https://go-review.googlesource.com/c/149778
      Run-TryBot: Alan Donovan <adonovan@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      a18638c0
  2. 14 Nov, 2018 14 commits
  3. 13 Nov, 2018 18 commits
  4. 12 Nov, 2018 4 commits
    • Emmanuel T Odeke's avatar
      net: preserve unexpired context values for LookupIPAddr · 5d392600
      Emmanuel T Odeke authored
      To avoid any cancelation of the parent context from affecting
      lookupGroup operations, Resolver.LookupIPAddr previously used
      an entirely new context created from context.Background().
      However, this meant that all the values in the parent context
      with which LookupIPAddr was invoked were dropped.
      
      This change provides a custom context implementation
      that only preserves values of the parent context by composing
      context.Background() and the parent context. It only falls back
      to the parent context to perform value lookups if the parent
      context has not yet expired.
      This context is never canceled, and has no deadlines.
      
      Fixes #28600
      
      Change-Id: If2f570caa26c65bad638b7102c35c79d5e429fea
      Reviewed-on: https://go-review.googlesource.com/c/148698
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5d392600
    • Filippo Valsorda's avatar
      crypto/tls: don't modify Config.Certificates in BuildNameToCertificate · 70e3b1df
      Filippo Valsorda authored
      The Config does not own the memory pointed to by the Certificate slice.
      Instead, opportunistically use Certificate.Leaf and let the application
      set it if it desires the performance gain.
      
      This is a partial rollback of CL 107627. See the linked issue for the
      full explanation.
      
      Fixes #28744
      
      Change-Id: I33ce9e6712e3f87939d9d0932a06d24e48ba4567
      Reviewed-on: https://go-review.googlesource.com/c/149098Reviewed-by: 's avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      70e3b1df
    • Ali Rizvi-Santiago's avatar
      runtime/cgo: added missing includes for errno.h to the windows gcc stubs. · 595bc63e
      Ali Rizvi-Santiago authored
      This adds the includes for errno.h to the windows stubs
      for runtime/cgo so that "errno" is properly declared.
      
      Due to "errno" not being properly declared, the compiler is
      forced to assume it's an external which leaves it up to the
      linker. This is an issue in some implementations as errno
      might be a macro which results in an unresolved symbol error
      during linking.
      
      runtime/cgo/gcc_libinit_windows.c: added include
      runtime/cgo/gcc_windows_386.c: added include
      runtime/cgo/gcc_windows_amd64.c: added include
      
      Change-Id: I77167d02f7409462979135efc55cf50bbc6bd363
      GitHub-Last-Rev: 90da06ee3cbec3f51c6d31185868bb70341ce9d3
      GitHub-Pull-Request: golang/go#28747
      Reviewed-on: https://go-review.googlesource.com/c/149118
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      595bc63e
    • Austin Clements's avatar
      cmd/compile: fix race on initializing Sym symFunc flag · 5cf2b4c2
      Austin Clements authored
      SSA lowering can create PFUNC ONAME nodes when compiling method calls.
      Since we generally initialize the node's Sym to a func when we set its
      class to PFUNC, we did this here, too. Unfortunately, since SSA
      compilation is concurrent, this can cause a race if two function
      compilations try to initialize the same symbol.
      
      Luckily, we don't need to do this at all, since we're actually just
      wrapping an ONAME node around an existing Sym that's already marked as
      a function symbol.
      
      Fixes the linux-amd64-racecompile builder, which was broken by CL
      147158.
      
      Updates #27539.
      
      Change-Id: I8ddfce6e66a08ce53998c5bfa6f5a423c1ffc1eb
      Reviewed-on: https://go-review.googlesource.com/c/149158
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      5cf2b4c2