An error occurred fetching the project authors.
  1. 05 Sep, 2014 1 commit
    • Russ Cox's avatar
      runtime: more C to Go conversion adjustments · db58ab96
      Russ Cox authored
      Mostly NOSPLIT additions.
      Had to rewrite atomic_arm.c in Go because it calls lock,
      and lock is too complex.
      
      With this CL, I find no Go -> C calls that can split the stack
      on any system except Solaris and Windows.
      
      Solaris and Windows need more work and will be done separately.
      
      LGTM=iant, dave
      R=golang-codereviews, bradfitz, iant, dave
      CC=dvyukov, golang-codereviews, khr, r
      https://golang.org/cl/137160043
      db58ab96
  2. 04 Sep, 2014 1 commit
    • Russ Cox's avatar
      runtime: make more functions safe for Go · f545b05a
      Russ Cox authored
      Convert no-op race functions.
      Everything else is tiny and gets NOSPLITs.
      
      After this, all that is left on darwin is sysAlloc, panic, and gothrow (all pending).
      There may be system-specific calls in other builds.
      
      LGTM=iant
      R=golang-codereviews, iant
      CC=dvyukov, golang-codereviews, khr, r
      https://golang.org/cl/140240044
      f545b05a
  3. 29 Aug, 2014 2 commits
  4. 28 Aug, 2014 1 commit
  5. 31 Jul, 2014 1 commit
  6. 30 Jul, 2014 1 commit
  7. 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
  8. 31 May, 2014 1 commit
  9. 03 Apr, 2014 1 commit
  10. 12 Mar, 2014 1 commit
    • Mikio Hara's avatar
      runtime: make use of THREAD_SHARE userspace mutex on freebsd · ae9b661f
      Mikio Hara authored
      For now Note, futexsleep and futexwakeup are designed for threads,
      not for processes. The explicit use of UMTX_OP_WAIT_UINT_PRIVATE and
      UMTX_OP_WAKE_PRIVATE can avoid unnecessary traversals of VM objects,
      to hit undiscovered bugs related to VM system on SMP/SMT/NUMA
      environment.
      
      Update #7496
      
      LGTM=iant
      R=golang-codereviews, gobot, iant, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/72760043
      ae9b661f
  11. 20 Feb, 2014 1 commit
  12. 20 Dec, 2013 1 commit
  13. 12 Aug, 2013 1 commit
  14. 05 Aug, 2013 1 commit
    • Russ Cox's avatar
      runtime/pprof: test multithreaded profile, remove OS X workarounds · d3066e47
      Russ Cox authored
      This means that pprof will no longer report profiles on OS X.
      That's unfortunate, but the profiles were often wrong and, worse,
      it was difficult to tell whether the profile was wrong or not.
      
      The workarounds were making the scheduler more complex,
      possibly caused a deadlock (see issue 5519), and did not actually
      deliver reliable results.
      
      It may be possible for adventurous users to apply a patch to
      their kernels to get working results, or perhaps having no results
      will encourage someone to do the work of creating a profiling
      thread like on Windows. Issue 6047 has details.
      
      Fixes #5519.
      Fixes #6047.
      
      R=golang-dev, bradfitz, r
      CC=golang-dev
      https://golang.org/cl/12429045
      d3066e47
  15. 29 Jul, 2013 3 commits
  16. 11 Jul, 2013 1 commit
  17. 29 May, 2013 1 commit
  18. 27 May, 2013 1 commit
    • Jan Ziak's avatar
      runtime: flag static variables as no-pointers · e017e0cb
      Jan Ziak authored
      Variables in data sections of 32-bit executables interfere with
      garbage collector's ability to free objects and/or unnecessarily
      slow down the garbage collector.
      
      This changeset moves some static variables to .noptr sections.
      'files' in symtab.c is now allocated dynamically.
      
      R=golang-dev, dvyukov, minux.ma
      CC=golang-dev
      https://golang.org/cl/9786044
      e017e0cb
  19. 06 May, 2013 1 commit
  20. 12 Apr, 2013 1 commit
    • Ian Lance Taylor's avatar
      runtime: use UMTX_OP_WAIT_UINT on FreeBSD · 9fe8681d
      Ian Lance Taylor authored
      UMTX_OP_WAIT expects that the address points to a uintptr, but
      the code in lock_futex.c uses a uint32.  UMTX_OP_WAIT_UINT is
      just like UMTX_OP_WAIT, but the address points to a uint32.
      This almost certainly makes no difference on a little-endian
      system, but since the kernel supports it we should do the
      right thing.  And, who knows, maybe it matters.
      
      R=golang-dev, bradfitz, r, ality
      CC=golang-dev
      https://golang.org/cl/8699043
      9fe8681d
  21. 19 Mar, 2013 1 commit
  22. 18 Mar, 2013 1 commit
  23. 14 Mar, 2013 1 commit
    • Russ Cox's avatar
      runtime: refactor os-specific code · e9d62a6d
      Russ Cox authored
      thread_GOOS.c becomes os_GOOS.c.
      
      signal_GOOS_GOARCH.c becomes os_GOOS_GOARCH.c,
      but with non-GOARCH-specific code moved into os_GOOS.c.
      
      The actual arch-specific signal handler moves into signal_GOARCH.c
      to avoid per-GOOS duplication.
      
      New files signal_GOOS_GOARCH.h provide macros for
      accessing fields of the very system-specific signal info structs.
      
      Lots moving, but nothing changing.
      This is a preliminarly cleanup so I can work on the signal
      handling code to fix some open issues without having to
      make each change 13 times.
      
      Tested on Linux and OS X, 386 and amd64.
      Will fix Plan 9, Windows, and ARM after the fact if necessary.
      (Plan 9 and Windows should be fine; ARM will probably have some typos.)
      
      Net effect: -1081 lines of code.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/7565048
      e9d62a6d
  24. 12 Mar, 2013 1 commit
    • Keith Randall's avatar
      runtime: faster & safer hash function · a5d40241
      Keith Randall authored
      Uses AES hardware instructions on 386/amd64 to implement
      a fast hash function.  Incorporates a random key to
      thwart hash collision DOS attacks.
      Depends on CL#7548043 for new assembly instructions.
      
      Update #3885
      Helps some by making hashing faster.  Go time drops from
      0.65s to 0.51s.
      
      R=rsc, r, bradfitz, remyoudompheng, khr, dsymonds, minux.ma, elias.naur
      CC=golang-dev
      https://golang.org/cl/7543043
      a5d40241
  25. 01 Mar, 2013 3 commits
  26. 21 Feb, 2013 1 commit
  27. 20 Feb, 2013 1 commit
  28. 15 Feb, 2013 3 commits
    • Russ Cox's avatar
      runtime: fix build on linux · c7f7bbbf
      Russ Cox authored
      In addition to the compile failure fixed in signal*.c,
      preserving the signal mask led to very strange crashes.
      Testing shows that looking for SIG_IGN is all that
      matters to get along with nohup, so reintroduce
      sigset_zero instead of trying to preserve the signal mask.
      
      TBR=iant
      CC=golang-dev
      https://golang.org/cl/7323067
      c7f7bbbf
    • Russ Cox's avatar
      runtime: fix running under nohup · f3407f44
      Russ Cox authored
      There are two ways nohup(1) might be implemented:
      it might mask away the signal, or it might set the handler
      to SIG_IGN, both of which are inherited across fork+exec.
      So two fixes:
      
      * Make sure to preserve the inherited signal mask at
      minit instead of clearing it.
      
      * If the SIGHUP handler is SIG_IGN, leave it that way.
      
      Fixes #4491.
      
      R=golang-dev, mikioh.mikioh, iant
      CC=golang-dev
      https://golang.org/cl/7308102
      f3407f44
    • Alan Donovan's avatar
      runtime: expand error for signal received on non-Go thread. · e49f9456
      Alan Donovan authored
      We call runtime.findnull dynamically to avoid exceeding the
      static nosplit stack limit check.  (Thanks minux!)
      
      Fixes #4048.
      
      R=rsc, minux.ma, ality
      CC=golang-dev
      https://golang.org/cl/7232066
      e49f9456
  29. 18 Dec, 2012 1 commit
  30. 26 Nov, 2012 1 commit
  31. 04 Sep, 2012 1 commit
    • Alan Donovan's avatar
      runtime: discard SIGPROF delivered to non-Go threads. · 532dee38
      Alan Donovan authored
      Signal handlers are global resources but many language
      environments (Go, C++ at Google, etc) assume they have sole
      ownership of a particular handler.  Signal handlers in
      mixed-language applications must therefore be robust against
      unexpected delivery of certain signals, such as SIGPROF.
      
      The default Go signal handler runtime·sigtramp assumes that it
      will never be called on a non-Go thread, but this assumption
      is violated by when linking in C++ code that spawns threads.
      Specifically, the handler asserts the thread has an associated
      "m" (Go scheduler).
      
      This CL is a very simple workaround: discard SIGPROF delivered to non-Go threads.  runtime.badsignal(int32) now receives the signal number; if it returns without panicking (e.g. sig==SIGPROF) the signal is discarded.
      
      I don't think there is any really satisfactory solution to the
      problem of signal-based profiling in a mixed-language
      application.  It's not only the issue of handler clobbering,
      but also that a C++ SIGPROF handler called in a Go thread
      can't unwind the Go stack (and vice versa).  The best we can
      hope for is not crashing.
      
      Note:
      - I've ported this to all POSIX platforms, except ARM-linux which already ignores unexpected signals on m-less threads.
      - I've avoided tail-calling runtime.badsignal because AFAICT the 6a/6l don't support it.
      - I've avoided hoisting 'push sig' (common to both function calls) because it makes the code harder to read.
      - Fixed an (apparently incorrect?) docstring.
      
      R=iant, rsc, minux.ma
      CC=golang-dev
      https://golang.org/cl/6498057
      532dee38
  32. 30 May, 2012 1 commit
  33. 12 Mar, 2012 1 commit