1. 27 Dec, 2018 1 commit
  2. 12 Dec, 2018 1 commit
  3. 07 Dec, 2018 1 commit
  4. 05 Dec, 2018 2 commits
    • runtime: add precise stack scan support · c43137e8
          
          This CL adds support of precise stack scan using stack maps to
          the runtime. The stack maps are generated by the compiler (if
          supported). Each safepoint is associated with a (real or dummy)
          landing pad, and its "type info" in the exception table is a
          pointer to the stack map. When a stack is scanned, the stack map
          is found by the stack unwinding code by inspecting the exception
          table (LSDA).
          
          For precise stack scan we need to unwind the stack. There are
          three cases:
          
          - If a goroutine is scanning its own stack, it can unwind the
            stack and scan the frames.
          
          - If a goroutine is scanning another, stopped, goroutine, it
            cannot directly unwind the target stack. We handle this by
            switching (runtime.gogo) to the target g, letting it unwind
            and scan the stack, and switch back.
          
          - If we are scanning a goroutine that is blocked in a syscall,
            we send a signal to the target goroutine's thread, and let the
            signal handler unwind and scan the stack. Extra care is needed
            as this races with enter/exit syscall.
          
          Currently this is only implemented on linux.
          
          Reviewed-on: https://go-review.googlesource.com/c/140518
      
      From-SVN: r266832
      Ian Lance Taylor committed
    • syscall: remove Flock for aix/ppc64 · 9cf3cb7c
          
          CL 152397 removed it from gc's syscall package.
          
          Updates golang/go#29084
          
          Reviewed-on: https://go-review.googlesource.com/c/152557
      
      From-SVN: r266812
      Ian Lance Taylor committed
  5. 04 Dec, 2018 1 commit
  6. 03 Dec, 2018 1 commit
  7. 27 Nov, 2018 1 commit
  8. 26 Nov, 2018 1 commit
  9. 09 Nov, 2018 1 commit
  10. 26 Oct, 2018 1 commit
  11. 25 Oct, 2018 1 commit
    • compiler: improve name mangling for packpaths · 34489eb2
          
          The current implementation of Gogo::pkgpath_for_symbol was written in
          a way that allowed two distinct package paths to map to the same
          symbol, which could cause collisions at link- time or compile-time.
          
          Switch to a better mangling scheme to insure that we get a unique
          packagepath symbol for each package. In the new scheme instead of having
          separate mangling schemes for identifiers and package paths, the
          main identifier mangler ("go_encode_id") now handles mangling of
          both packagepath characters and identifier characters.
          
          The new mangling scheme is more intrusive: "foo/bar.Baz" is mangled as
          "foo..z2fbar.Baz" instead of "foo_bar.Baz". To mitigate this, this
          patch also adds a demangling capability so that function names
          returned from runtime.CallersFrames are converted back to their
          original unmangled form.
          
          Changing the pkgpath_for_symbol scheme requires updating a number of
          //go:linkname directives and C "__asm__" directives to match the new
          scheme, as well as updating the 'gotest' driver (which makes
          assumptions about the correct mapping from pkgpath symbol to package
          name).
          
          Fixes golang/go#27534.
          
          Reviewed-on: https://go-review.googlesource.com/c/135455
      
      From-SVN: r265510
      Ian Lance Taylor committed
  12. 23 Oct, 2018 2 commits
  13. 18 Oct, 2018 2 commits
    • compiler: list indirect imports separately in export data · dbf9376f
          
          Previously when export data referred to a type that was not defined in
          a directly imported package, we would write the package name as
          additional information in the type's export data.  That approach
          required all type information to be read in order.  This patch changes
          the compiler to find all references to indirectly imported packages,
          and write them out as an indirectimport line in the import data.  This
          will permit us to read exported type data out of order.
          
          The type traversal used to find indirect imports is a little more
          complicated than necessary in preparation for later patches in this
          series.
          
          Reviewed-on: https://go-review.googlesource.com/c/143020
      
      From-SVN: r265296
      Ian Lance Taylor committed
    • compiler: drop semicolons in export data · e8ce849a
          
          The export data, which is approximately readable and looks something
          like Go, was first implemented back when Go still used semicolons.
          Drop the semicolons, to make it look slightly more Go like and make it
          slightly smaller.
          
          This updates the compiler and the gccgoimporter package.
          
          This introduces a new version of the export data.  There are going to
          be more changes to the export data, so this version is still subject
          to change.
          
          Reviewed-on: https://go-review.googlesource.com/c/143018
      
      From-SVN: r265284
      Ian Lance Taylor committed
  14. 09 Oct, 2018 1 commit
  15. 08 Oct, 2018 1 commit
  16. 05 Oct, 2018 2 commits
  17. 02 Oct, 2018 2 commits
  18. 01 Oct, 2018 1 commit
  19. 26 Sep, 2018 2 commits
  20. 25 Sep, 2018 2 commits
  21. 24 Sep, 2018 1 commit
  22. 14 Sep, 2018 1 commit
  23. 13 Sep, 2018 5 commits
    • compiler, runtime: call gcWriteBarrier instead of writebarrierptr · cec07c47
          
          In 1.11 writebarrierptr is going away, so change the compiler to call
          gcWriteBarrier instead.  We weren't using gcWriteBarrier before;
          adjust the implementation to use the putFast method.
          
          This revealed a problem in the kickoff function.  When using cgo,
          kickoff can be called on the g0 of an m allocated by newExtraM.  In
          that case the m will generally have a p, but systemstack may be called
          by wbBufFlush as part of flushing the write barrier buffer.  At that
          point the buffer is full, so we can not do a write barrier.  So adjust
          the existing code in kickoff so that in the case where we are g0,
          don't do any write barrier at all.
          
          Reviewed-on: https://go-review.googlesource.com/131395
      
      From-SVN: r264295
      Ian Lance Taylor committed
    • runtime: correct counters in sweep · 38fab736
          
          In the sweep code we can sometimes see incorrect counts when
          conservative stack scanning causes us to grey an object that we
          earlier decided could be freed.  We already ignored this check, but
          adjust this case to maintain correct span counts when it happens.
          This gives us slightly more correct numbers in MemStats, and helps
          avoid a rare failure in TestReadMemStats.
          
          Also fix the free index, and cope with finding a full span when
          allocating a new one.
          
          Reviewed-on: https://go-review.googlesource.com/134216
      
      From-SVN: r264294
      Ian Lance Taylor committed
    • compiler, runtime: open code select · 84cdf51d
          
          This is the gofrontend version of https://golang.org/cl/37933,
          https://golang.org/cl/37934, and https://golang.org/cl/37935.
          Open code the initialization of select cases.
          
          This is a step toward updating libgo to the 1.11 release.
          
          Reviewed-on: https://go-review.googlesource.com/135000
      
      From-SVN: r264290
      Ian Lance Taylor committed
    • runtime: avoid write barriers with traceback info · f0d89c77
          
          Unlike the gc runtime, libgo stores traceback information in location
          structs, which contain strings.  Therefore, copying location structs
          around appears to require write barriers, although in fact write
          barriers are never important because the strings are never allocated
          in Go memory.  They come from libbacktrace.
          
          Some of the generated write barriers come at times when write barriers
          are not permitted.  For example, exitsyscall, marked
          nowritebarrierrec, calls exitsyscallfast which calls traceGoSysExit
          which calls traceEvent which calls traceStackID which calls
          trace.stackTab.put which copies location values into memory allocated
          by tab.newStack.  This write barrier can be invoked when there is no
          p, causing a crash.
          
          This change fixes the problem by ensuring that location values are
          copied around in the tracing code with no write barriers.
          
          This was found by fixing the compiler to fully implement
          //go:nowritebarrierrec; CL to follow.
          
          Reviewed-on: https://go-review.googlesource.com/134226
      
      From-SVN: r264282
      Ian Lance Taylor committed
    • libgo: build roots index to speed up bulkBarrierPreWrite · 2919ad1e
          
          To reduce the amount of time spent in write barrier processing
          (specifically runtime.bulkBarrierPreWrite), add support for building a
          'GC roots index', basically a sorted list of all roots, so as to
          allow more efficient lookups of gcdata structures for globals. The
          previous implementation worked on the raw (unsorted) roots list
          itself, which did not scale well.
          
          Reviewed-on: https://go-review.googlesource.com/132595
      
      From-SVN: r264276
      Ian Lance Taylor committed
  24. 29 Aug, 2018 1 commit
  25. 24 Aug, 2018 1 commit
  26. 07 Aug, 2018 2 commits
  27. 27 Jul, 2018 1 commit
  28. 13 Jul, 2018 1 commit