1. 17 Sep, 2019 3 commits
  2. 12 Sep, 2019 1 commit
  3. 11 Sep, 2019 1 commit
  4. 10 Sep, 2019 3 commits
  5. 06 Sep, 2019 1 commit
  6. 31 Aug, 2019 2 commits
  7. 30 Aug, 2019 1 commit
  8. 28 Aug, 2019 2 commits
  9. 23 Aug, 2019 1 commit
    • compiler: record pointer var values to remove write barriers · 6ae361ae
          
          Record when a local pointer variable is set to a value such that
          indirecting through the pointer does not require a write barrier.  Use
          that to eliminate write barriers when indirecting through that local
          pointer variable.  Only keep this information per-block, so it's not
          all that applicable.
          
          This reduces the number of write barriers generated when compiling the
          runtime package from 553 to 524.
          
          The point of this is to eliminate a bad write barrier in the bytes
          function in runtime/print.go.  Mark that function nowritebarrier so
          that the problem does not recur.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/191581
      
      From-SVN: r274890
      Ian Lance Taylor committed
  10. 19 Aug, 2019 1 commit
    • runtime: be more strict in GC · 4f6bdb08
          
          With CL 190599, along with what we do in greyobject, we ensure
          that we only mark allocated heap objects. As a result we can be
          more strict in GC:
          
          - Enable "sweep increased allocation count" check, which checks
            that the number of mark bits set are no more than the number of
            allocation bits.
          
          - Enable invalid pointer check on heap scan. We only trace
            allocated heap objects, which should not contain invalid
            pointer.
          
          This also makes the libgo runtime more convergent with the gc
          runtime.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/190797
      
      From-SVN: r274678
      Ian Lance Taylor committed
  11. 17 Aug, 2019 2 commits
  12. 04 Jul, 2019 1 commit
  13. 26 Jun, 2019 1 commit
  14. 24 Jun, 2019 1 commit
  15. 21 Jun, 2019 2 commits
  16. 19 Jun, 2019 1 commit
  17. 07 Jun, 2019 1 commit
  18. 06 Jun, 2019 1 commit
  19. 05 Jun, 2019 1 commit
  20. 03 Jun, 2019 3 commits
    • compiler, runtime, reflect: generate unique type descriptors · 39c0aa5f
          
          Currently, the compiler already generates common symbols for type
          descriptors, so the type descriptors are unique. However, when a
          type is created through reflection, it is not deduplicated with
          compiler-generated types. As a consequence, we cannot assume type
          descriptors are unique, and cannot use pointer equality to
          compare them. Also, when constructing a reflect.Type, it has to
          go through a canonicalization map, which introduces overhead to
          reflect.TypeOf, and lock contentions in concurrent programs.
          
          In order for the reflect package to deduplicate types with
          compiler-created types, we register all the compiler-created type
          descriptors at startup time. The reflect package, when it needs
          to create a type, looks up the registry of compiler-created types
          before creates a new one. There is no lock contention since the
          registry is read-only after initialization.
          
          This lets us get rid of the canonicalization map, and also makes
          it possible to compare type descriptors with pointer equality.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179598
      
      From-SVN: r271894
      Ian Lance Taylor committed
    • libgo: delay applying profile stack-frame skip until fixup · c533ffe0
          
          When the runtime collects a stack trace to associate it with some
          profiling event (mem alloc, mutex, etc) there is a skip count passed
          to runtime.Callers (or equivalent) to skip some known count of frames
          in order to get to the "interesting" frame corresponding to the
          profile event. Now that the profiling mechanism uses lazy fixup (when
          removing compiler artifacts like thunks, morestack calls etc), we also
          need to move the frame skipping logic after the fixup, so as to insure
          that the skip count isn't thrown off by these artifacts.
          
          Fixes golang/go#32290.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179740
      
      From-SVN: r271892
      Ian Lance Taylor committed
    • runtime: remove unnecessary functions calling between C and Go · a920eb0c
          
          These functions were needed during the transition of the runtime from
          C to Go, but are no longer necessary.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/179879
      
      From-SVN: r271890
      Ian Lance Taylor committed
  21. 27 May, 2019 1 commit
  22. 14 May, 2019 1 commit
  23. 13 May, 2019 1 commit
  24. 11 May, 2019 1 commit
  25. 08 May, 2019 2 commits
  26. 03 May, 2019 2 commits
  27. 01 May, 2019 2 commits
    • compiler: recognize and optimize map range clear · 58dbd453
          
          Recognize
          
                  for k := range m { delete(m, k) }
          
          for map m, and rewrite it to runtime.mapclear, as the gc compiler
          does.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169397
      
      From-SVN: r270780
      Ian Lance Taylor committed
    • compiler,runtime: do more direct interfaces · 5e87c280
          
          A direct interface is an interface whose data word contains the
          actual data value, instead of a pointer to it. The gc toolchain
          creates a direct interface if the value is pointer shaped, that
          includes pointers (including unsafe.Pointer), functions, channels,
          maps, and structs and arrays containing a single pointer-shaped
          field. In gccgo, we only do this for pointers. This CL unifies
          direct interface types with gc. This reduces allocations when
          converting such types to interfaces.
          
          Our method functions used to always take pointer receivers, to
          make interface calls easy. Now for direct interface types, their
          value methods will take value receivers. For a pointer to those
          types, when converted to interface, the interface data contains
          the pointer. For that interface to call a value method, it will
          need a wrapper method that dereference the pointer and invokes
          the value method. The wrapper method, instead of the actual one,
          is put into the itable of the pointer type.
          
          In the runtime, adjust funcPC for the new layout of interfaces of
          functions.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/168409
      
      From-SVN: r270779
      Ian Lance Taylor committed