An error occurred fetching the project authors.
  1. 28 Aug, 2014 2 commits
    • Russ Cox's avatar
      runtime: fix nacl build · f9b9ecc5
      Russ Cox authored
      The NaCl "system calls" were assumed to have a compatible
      return convention with the C compiler, and we were using
      tail jumps to those functions. Don't do that anymore.
      
      Correct mistake introduced in newstackcall duringconversion
      from (SP) to (FP) notation. (Actually this fix, in asm_amd64p32.s,
      slipped into the C compiler change, but update the name to
      match what go vet wants.)
      
      Correct computation of caller stack pointer in morestack:
      on amd64p32, the saved PC is the size of a uintreg, not uintptr.
      This may not matter, since it's been like this for a while,
      but uintreg is the correct one. (And on non-NaCl they are the same.)
      
      This will allow the NaCl build to get much farther.
      It will probably still not work completely.
      There's a bug in 6l that needs fixing too.
      
      TBR=minux
      CC=golang-codereviews
      https://golang.org/cl/134990043
      f9b9ecc5
    • Russ Cox's avatar
      cmd/cc, runtime: preserve C runtime type names in generated Go · d21638b5
      Russ Cox authored
      uintptr or uint64 in the runtime C were turning into uint in the Go,
      bool was turning into uint8, and so on. Fix that.
      
      Also delete Go wrappers for C functions.
      The C functions can be called directly now
      (but still eventually need to be converted to Go).
      
      LGTM=bradfitz, minux, iant
      R=golang-codereviews, bradfitz, iant, minux
      CC=golang-codereviews, khr, r
      https://golang.org/cl/138740043
      d21638b5
  2. 27 Aug, 2014 1 commit
    • Russ Cox's avatar
      cmd/cc, runtime: convert C compilers to use Go calling convention · 25f6b02a
      Russ Cox authored
      To date, the C compilers and Go compilers differed only in how
      values were returned from functions. This made it difficult to call
      Go from C or C from Go if return values were involved. It also made
      assembly called from Go and assembly called from C different.
      
      This CL changes the C compiler to use the Go conventions, passing
      results on the stack, after the arguments.
      [Exception: this does not apply to C ... functions, because you can't
      know where on the stack the arguments end.]
      
      By doing this, the CL makes it possible to rewrite C functions into Go
      one at a time, without worrying about which languages call that
      function or which languages it calls.
      
      This CL also updates all the assembly files in package runtime to use
      the new conventions. Argument references of the form 40(SP) have
      been rewritten to the form name+10(FP) instead, and there are now
      Go func prototypes for every assembly function called from C or Go.
      This means that 'go vet runtime' checks effectively every assembly
      function, and go vet's output was used to automate the bulk of the
      conversion.
      
      Some functions, like seek and nsec on Plan 9, needed to be rewritten.
      
      Many assembly routines called from C were reading arguments
      incorrectly, using MOVL instead of MOVQ or vice versa, especially on
      the less used systems like openbsd.
      These were found by go vet and have been corrected too.
      If we're lucky, this may reduce flakiness on those systems.
      
      Tested on:
              darwin/386
              darwin/amd64
              linux/arm
              linux/386
              linux/amd64
      If this breaks another system, the bug is almost certainly in the
      sys_$GOOS_$GOARCH.s file, since the rest of the CL is tested
      by the combination of the above systems.
      
      LGTM=dvyukov, iant
      R=golang-codereviews, 0intro, dave, alex.brainman, dvyukov, iant
      CC=golang-codereviews, josharian, r
      https://golang.org/cl/135830043
      25f6b02a
  3. 26 Aug, 2014 1 commit
  4. 21 Aug, 2014 1 commit
  5. 20 Aug, 2014 1 commit
  6. 19 Aug, 2014 1 commit
  7. 07 Aug, 2014 1 commit
  8. 31 Jul, 2014 1 commit
  9. 30 Jul, 2014 2 commits
    • Rob Pike's avatar
      runtime: fix assembler macro definitions to be consistent in use of center-dot · aff7883d
      Rob Pike authored
      The DISPATCH and CALLFN macro definitions depend on an inconsistency
      between the internal cpp mini-implementation and the language proper in
      whether center-dot is an identifier character. The macro depends on it not
      being an identifier character, but the resulting code depends on it being one.
      
      Remove the dependence on the inconsistency by placing the center-dot into
      the macro invocation rather that the body.
      
      No semantic change. This is just renaming macro arguments.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/119320043
      aff7883d
    • Keith Randall's avatar
      runtime: rewrite malloc in Go. · 4aa50434
      Keith Randall authored
      This change introduces gomallocgc, a Go clone of mallocgc.
      Only a few uses have been moved over, so there are still
      lots of uses from C. Many of these C uses will be moved
      over to Go (e.g. in slice.goc), but probably not all.
      What should remain of C's mallocgc is an open question.
      
      LGTM=rsc, dvyukov
      R=rsc, khr, dave, bradfitz, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/108840046
      4aa50434
  10. 22 Jul, 2014 1 commit
  11. 21 Jul, 2014 1 commit
  12. 17 Jul, 2014 1 commit
  13. 16 Jul, 2014 1 commit
    • Keith Randall's avatar
      runtime: convert map implementation to Go. · 0c6b55e7
      Keith Randall authored
      It's a bit slower, but not painfully so.  There is still room for
      improvement (saving space so we can use nosplit, and removing the
      requirement for hash/eq stubs).
      
      benchmark                              old ns/op     new ns/op     delta
      BenchmarkMegMap                        23.5          24.2          +2.98%
      BenchmarkMegOneMap                     14.9          15.7          +5.37%
      BenchmarkMegEqMap                      71668         72234         +0.79%
      BenchmarkMegEmptyMap                   4.05          4.93          +21.73%
      BenchmarkSmallStrMap                   21.9          22.5          +2.74%
      BenchmarkMapStringKeysEight_16         23.1          26.3          +13.85%
      BenchmarkMapStringKeysEight_32         21.9          25.0          +14.16%
      BenchmarkMapStringKeysEight_64         21.9          25.1          +14.61%
      BenchmarkMapStringKeysEight_1M         21.9          25.0          +14.16%
      BenchmarkIntMap                        21.8          12.5          -42.66%
      BenchmarkRepeatedLookupStrMapKey32     39.3          30.2          -23.16%
      BenchmarkRepeatedLookupStrMapKey1M     322353        322675        +0.10%
      BenchmarkNewEmptyMap                   129           136           +5.43%
      BenchmarkMapIter                       137           107           -21.90%
      BenchmarkMapIterEmpty                  7.14          8.71          +21.99%
      BenchmarkSameLengthMap                 5.24          6.82          +30.15%
      BenchmarkBigKeyMap                     34.5          35.3          +2.32%
      BenchmarkBigValMap                     36.1          36.1          +0.00%
      BenchmarkSmallKeyMap                   26.9          26.7          -0.74%
      
      LGTM=rsc
      R=golang-codereviews, dave, dvyukov, rsc, gobot, khr
      CC=golang-codereviews
      https://golang.org/cl/99380043
      0c6b55e7
  14. 26 Jun, 2014 1 commit
    • Russ Cox's avatar
      all: remove 'extern register M *m' from runtime · 89f185fe
      Russ Cox authored
      The runtime has historically held two dedicated values g (current goroutine)
      and m (current thread) in 'extern register' slots (TLS on x86, real registers
      backed by TLS on ARM).
      
      This CL removes the extern register m; code now uses g->m.
      
      On ARM, this frees up the register that formerly held m (R9).
      This is important for NaCl, because NaCl ARM code cannot use R9 at all.
      
      The Go 1 macrobenchmarks (those with per-op times >= 10 µs) are unaffected:
      
      BenchmarkBinaryTree17              5491374955     5471024381     -0.37%
      BenchmarkFannkuch11                4357101311     4275174828     -1.88%
      BenchmarkGobDecode                 11029957       11364184       +3.03%
      BenchmarkGobEncode                 6852205        6784822        -0.98%
      BenchmarkGzip                      650795967      650152275      -0.10%
      BenchmarkGunzip                    140962363      141041670      +0.06%
      BenchmarkHTTPClientServer          71581          73081          +2.10%
      BenchmarkJSONEncode                31928079       31913356       -0.05%
      BenchmarkJSONDecode                117470065      113689916      -3.22%
      BenchmarkMandelbrot200             6008923        5998712        -0.17%
      BenchmarkGoParse                   6310917        6327487        +0.26%
      BenchmarkRegexpMatchMedium_1K      114568         114763         +0.17%
      BenchmarkRegexpMatchHard_1K        168977         169244         +0.16%
      BenchmarkRevcomp                   935294971      914060918      -2.27%
      BenchmarkTemplate                  145917123      148186096      +1.55%
      
      Minux previous reported larger variations, but these were caused by
      run-to-run noise, not repeatable slowdowns.
      
      Actual code changes by Minux.
      I only did the docs and the benchmarking.
      
      LGTM=dvyukov, iant, minux
      R=minux, josharian, iant, dave, bradfitz, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/109050043
      89f185fe
  15. 18 Jun, 2014 1 commit
  16. 17 Jun, 2014 2 commits
    • Keith Randall's avatar
      runtime: implement string ops in Go · 61dca94e
      Keith Randall authored
      Also implement go:nosplit annotation.  Not really needed
      for now, but we'll definitely need it for other conversions.
      
      benchmark                 old ns/op     new ns/op     delta
      BenchmarkRuneIterate      534           474           -11.24%
      BenchmarkRuneIterate2     535           470           -12.15%
      
      LGTM=bradfitz
      R=golang-codereviews, dave, bradfitz, minux
      CC=golang-codereviews
      https://golang.org/cl/93380044
      61dca94e
    • Keith Randall's avatar
      runtime: implement eqstring in assembly. · b36ed905
      Keith Randall authored
      BenchmarkCompareStringEqual               10.4          7.33          -29.52%
      BenchmarkCompareStringIdentical           3.99          3.67          -8.02%
      BenchmarkCompareStringSameLength          9.80          6.84          -30.20%
      BenchmarkCompareStringDifferentLength     1.09          0.95          -12.84%
      BenchmarkCompareStringBigUnaligned        75220         76071         +1.13%
      BenchmarkCompareStringBig                 69843         74746         +7.02%
      
      LGTM=bradfitz, josharian
      R=golang-codereviews, bradfitz, josharian, dave, khr
      CC=golang-codereviews
      https://golang.org/cl/105280044
      b36ed905
  17. 20 May, 2014 1 commit
    • Russ Cox's avatar
      build: make nacl pass · 0c2a7274
      Russ Cox authored
      Add nacl.bash, the NaCl version of all.bash.
      It's a separate script because it builds a variant of package syscall
      with a large zip file embedded in it, containing all the input files
      needed for tests.
      
      Disable various tests new since the last round, mostly the ones using os/exec.
      
      Fixes #7945.
      
      LGTM=dave
      R=golang-codereviews, remyoudompheng, dave, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/100590044
      0c2a7274
  18. 02 May, 2014 1 commit
    • Dmitriy Vyukov's avatar
      runtime: make MemStats.LastGC Unix time again · 350a8fcd
      Dmitriy Vyukov authored
      The monotonic clock patch changed all runtime times
      to abstract monotonic time. As the result user-visible
      MemStats.LastGC become monotonic time as well.
      Restore Unix time for LastGC.
      
      This is the simplest way to expose time.now to runtime that I found.
      Another option would be to change time.now to C called
      int64 runtime.unixnanotime() and then express time.now in terms of it.
      But this would require to introduce 2 64-bit divisions into time.now.
      Another option would be to change time.now to C called
      void runtime.unixnanotime1(struct {int64 sec, int32 nsec} *now)
      and then express both time.now and runtime.unixnanotime in terms of it.
      
      Fixes #7852.
      
      LGTM=minux.ma, iant
      R=minux.ma, rsc, iant
      CC=golang-codereviews
      https://golang.org/cl/93720045
      350a8fcd
  19. 10 Mar, 2014 1 commit
  20. 04 Mar, 2014 1 commit
    • Russ Cox's avatar
      cmd/ld: clear unused ctxt before morestack · c2dd33a4
      Russ Cox authored
      For non-closure functions, the context register is uninitialized
      on entry and will not be used, but morestack saves it and then the
      garbage collector treats it as live. This can be a source of memory
      leaks if the context register points at otherwise dead memory.
      Avoid this by introducing a parallel set of morestack functions
      that clear the context register, and use those for the non-closure functions.
      
      I hope this will help with some of the finalizer flakiness, but it probably won't.
      
      Fixes #7244.
      
      LGTM=dvyukov
      R=khr, dvyukov
      CC=golang-codereviews
      https://golang.org/cl/71030044
      c2dd33a4
  21. 25 Feb, 2014 1 commit
    • Russ Cox's avatar
      all: nacl import round 2 · 4a000b9d
      Russ Cox authored
      These previously reviewed CLs are present in this CL.
      
      ---
      changeset:   18445:436bb084caed
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 09:50:34 2013 -0500
      description:
      runtime: assembly and system calls for Native Client x86-64
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡adg
      https://golang.org/cl/15760044
      
      ---
      changeset:   18448:90bd871b5994
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 09:51:36 2013 -0500
      description:
      runtime: amd64p32 and Native Client assembly bootstrap
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡khr
      https://golang.org/cl/15820043
      
      ---
      changeset:   18449:b011c3dc687e
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 09:51:58 2013 -0500
      description:
      math: amd64p32 assembly routines
      
      These routines only manipulate float64 values,
      so the amd64 and amd64p32 can share assembly.
      
      The large number of files is symptomatic of a problem
      with package path: it is a Go package structured like a C library.
      But that will need to wait for another day.
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡bradfitz
      https://golang.org/cl/15870043
      
      ---
      changeset:   18450:43234f082eec
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 10:03:19 2013 -0500
      description:
      syscall: networking for Native Client
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡rsc
      https://golang.org/cl/15780043
      
      ---
      changeset:   18451:9c8d1d890aaa
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 10:03:34 2013 -0500
      description:
      runtime: assembly and system calls for Native Client x86-32
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡rsc
      https://golang.org/cl/15800043
      
      ---
      changeset:   18452:f90b1dd9228f
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 11:04:09 2013 -0500
      description:
      runtime: fix frame size for linux/amd64 runtime.raise
      
      R≡rsc
      https://golang.org/cl/24480043
      
      ---
      changeset:   18445:436bb084caed
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 09:50:34 2013 -0500
      description:
      runtime: assembly and system calls for Native Client x86-64
      
      See golang.org/s/go13nacl for design overview.
      
      This CL is publicly visible but not CC'ed to golang-dev,
      to avoid distracting from the preparation of the Go 1.2
      release.
      
      This CL and the others will be checked into my rsc-go13nacl
      clone repo for now, and I will send CLs against the main
      repo early in the Go 1.3 development.
      
      R≡adg
      https://golang.org/cl/15760044
      
      ---
      changeset:   18455:53b06799a938
      user:        Russ Cox <rsc@golang.org>
      date:        Mon Nov 11 23:29:52 2013 -0500
      description:
      cmd/gc: add -nolocalimports flag
      
      R≡dsymonds
      https://golang.org/cl/24990043
      
      ---
      changeset:   18456:24f64e1eaa8a
      user:        Russ Cox <rsc@golang.org>
      date:        Tue Nov 12 22:06:29 2013 -0500
      description:
      runtime: add comments for playback write
      
      R≡adg
      https://golang.org/cl/25190043
      
      ---
      changeset:   18457:d1f615bbb6e4
      user:        Russ Cox <rsc@golang.org>
      date:        Wed Nov 13 17:03:52 2013 -0500
      description:
      runtime: write only to NaCl stdout, never to NaCl stderr
      
      NaCl writes some other messages on standard error
      that we would like to be able to squelch.
      
      R≡adg
      https://golang.org/cl/26240044
      
      ---
      changeset:   18458:1f01be1a1dc2
      tag:         tip
      user:        Russ Cox <rsc@golang.org>
      date:        Wed Nov 13 19:45:16 2013 -0500
      description:
      runtime: remove apparent debugging dreg
      
      Setting timens to 0 turns off fake time.
      
      TBR≡adg
      https://golang.org/cl/26400043
      
      LGTM=bradfitz
      R=dave, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/68730043
      4a000b9d