An error occurred fetching the project authors.
  1. 06 Feb, 2015 1 commit
  2. 09 Sep, 2014 1 commit
    • Russ Cox's avatar
      runtime: assume precisestack, copystack, StackCopyAlways, ScanStackByFrames · 15b76ad9
      Russ Cox authored
      Commit to stack copying for stack growth.
      
      We're carrying around a surprising amount of cruft from older schemes.
      I am confident that precise stack scans and stack copying are here to stay.
      
      Delete fallback code for when precise stack info is disabled.
      Delete fallback code for when copying stacks is disabled.
      Delete fallback code for when StackCopyAlways is disabled.
      Delete Stktop chain - there is only one stack segment now.
      Delete M.moreargp, M.moreargsize, M.moreframesize, M.cret.
      Delete G.writenbuf (unrelated, just dead).
      Delete runtime.lessstack, runtime.oldstack.
      Delete many amd64 morestack variants.
      Delete initialization of morestack frame/arg sizes (shortens split prologue!).
      
      Replace G's stackguard/stackbase/stack0/stacksize/
      syscallstack/syscallguard/forkstackguard with simple stack
      bounds (lo, hi).
      
      Update liblink, runtime/cgo for adjustments to G.
      
      LGTM=khr
      R=khr, bradfitz
      CC=golang-codereviews, iant, r
      https://golang.org/cl/137410043
      15b76ad9
  3. 08 Sep, 2014 1 commit
  4. 04 Jul, 2014 1 commit
  5. 03 Jul, 2014 2 commits
    • David Crawshaw's avatar
      runtime/cgo: revert use of undefined logging function · b2c75ae2
      David Crawshaw authored
      It snuck into cl/106380043. Too many active clients.
      
      LGTM=ruiu
      R=golang-codereviews, ruiu
      CC=golang-codereviews
      https://golang.org/cl/110830045
      b2c75ae2
    • David Crawshaw's avatar
      cmd/go, cmd/ld, runtime, os/user: TLS emulation for android · 12b990ba
      David Crawshaw authored
      Based on cl/69170045 by Elias Naur.
      
      There are currently several schemes for acquiring a TLS
      slot to save the g register. None of them appear to work
      for android. The closest are linux and darwin.
      
      Linux uses a linker TLS relocation. This is not supported
      by the android linker.
      
      Darwin uses a fixed offset, and calls pthread_key_create
      until it gets the slot it wants. As the runtime loads
      late in the android process lifecycle, after an
      arbitrary number of other libraries, we cannot rely on
      any particular slot being available.
      
      So we call pthread_key_create, take the first slot we are
      given, and put it in runtime.tlsg, which we turn into a
      regular variable in cmd/ld.
      
      Makes android/arm cgo binaries work.
      
      LGTM=minux
      R=elias.naur, minux, dave, josharian
      CC=golang-codereviews
      https://golang.org/cl/106380043
      12b990ba
  6. 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
  7. 24 Dec, 2013 2 commits
  8. 14 Aug, 2013 1 commit
    • Elias Naur's avatar
      runtime.cmd/ld: Add ARM external linking and implement -shared in terms of external linking · 45233734
      Elias Naur authored
      This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow:
      
      10499043
      runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS
      
      This CL prepares for external linking support to ARM.
      
      The pseudo-symbols runtime.g and runtime.m are merged into a single
      runtime.tlsgm symbol. When external linking, the offset of a thread local
      variable is stored at a memory location instead of being embedded into a offset
      of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only
      one such offset is needed.
      
      The larger part of this CL moves TLS code from gcc compiled to internally
      compiled. The TLS code now uses the modern MRC instruction, and 5l is taught
      about TLS fallbacks in case the instruction is not available or appropriate.
      
      10271047
      This CL adds support for -linkmode external to 5l.
      
      For 5l itself, use addrel to allow for D_CALL relocations to be handled by the
      host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and
      63 needed an update. One of the TODO: addrel cases was since replaced, and the
      rest of the cases are either covered by indirection through addpool (cases with
      LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because
      addpool emits AWORD instructions, which in turn are handled by case 11.
      
      In the runtime, change the argv argument in the rt0* functions slightly to be a
      pointer to the argv list, instead of relying on a particular location of argv.
      
      9733044
      The -shared flag to 6l outputs a shared library, implemented in Go
      and callable from non-Go programs such as C.
      
      The main part of this CL change the thread local storage model.
      Go uses the fastest and least general mode, local exec. TLS data in shared
      libraries normally requires at least the local dynamic mode, however, this CL
      instead opts for using the initial exec mode. Initial exec mode is faster than
      local dynamic mode and can be used in linux since the linker has reserved a
      limited amount of TLS space for performance sensitive TLS code.
      
      Initial exec mode requires an extra load from the GOT table to determine the
      TLS offset. This penalty will not be paid if ld is not in -shared mode, since
      TLS accesses will be reduced to local exec.
      
      The elf sections .init_array and .rela.init_array are added to register the Go
      runtime entry with cgo at library load time.
      
      The "hidden" attribute is added to Cgo functions called from Go, since Go
      does not generate call through the GOT table, and adding non-GOT relocations for
      a global function is not supported by gcc. Cgo symbols don't need to be global
      and avoiding the GOT table is also faster.
      
      The changes to 8l are only removes code relevant to the old -shared mode where
      internal linking was used.
      
      This CL only address the low level linker work. It can be submitted by itself,
      but to be useful, the runtime changes in CL 9738047 is also needed.
      
      Design discussion at
      https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q
      
      Fixes #5590.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/12871044
      45233734
  9. 28 Feb, 2013 2 commits
    • Russ Cox's avatar
      runtime/cgo: move common symbol overrides into 6c-compiled code · 5bffa3b8
      Russ Cox authored
      There are some function pointers declared by 6c in
      package runtime without initialization and then also
      declared in package runtime/cgo with initialization,
      so that if runtime/cgo is linked in, the function pointers
      are non-nil, and otherwise they are nil. We depend on
      this property for implementing non-essential cgo hooks
      in package runtime.
      
      The declarations in package runtime are 6c-compiled
      and end up in .6 files. The declarations in package runtime/cgo
      are gcc-compiled and end up in .o files. Since 6l links the .6
      and .o files together, this all works.
      
      However, when we switch to "external linking" mode,
      6l will not see the .o files, and it would be up to the host linker
      to resolve the two into a single initialized symbol.
      Not all host linkers will do this (in particular OS X gcc will not).
      
      To fix this, move the cgo declarations into 6c-compiled code,
      so that they end up in .6 files, so that 6l gets them no matter what.
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/7440045
      5bffa3b8
    • Russ Cox's avatar
      runtime/cgo: make symbol naming consistent · f8d49b50
      Russ Cox authored
      The naming in this package is a disaster.
      Make it all consistent.
      
      Remove some 'static' from functions that will
      be referred to from other files soon.
      
      This CL is purely renames using global search and replace.
      
      Submitting separately so that real changes will not
      be drowned out by these renames in future CLs.
      
      TBR=iant
      CC=golang-dev
      https://golang.org/cl/7416046
      f8d49b50
  10. 26 Feb, 2013 1 commit
  11. 04 May, 2012 1 commit
  12. 20 Dec, 2011 1 commit
  13. 09 Nov, 2011 1 commit
  14. 08 Dec, 2010 3 commits
  15. 13 Sep, 2010 1 commit
  16. 03 Oct, 2009 1 commit
    • Russ Cox's avatar
      8c, 8l dynamic loading support. · 133a158b
      Russ Cox authored
      better mach binaries.
      cgo working on darwin+linux amd64+386.
      eliminated context switches - pi is 30x faster.
      add libcgo to build.
      
      on snow leopard:
        - non-cgo binaries work; all tests pass.
        - cgo binaries work on amd64 but not 386.
      
      R=r
      DELTA=2031  (1316 added, 626 deleted, 89 changed)
      OCL=35264
      CL=35304
      133a158b