]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage
authorRuss Cox <rsc@golang.org>
Mon, 24 Nov 2014 17:07:11 +0000 (12:07 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 24 Nov 2014 17:07:11 +0000 (12:07 -0500)
TBR=austin
CC=golang-codereviews
https://golang.org/cl/179290043

14 files changed:
1  2 
src/cmd/gc/walk.c
src/run.bash
src/runtime/asm_amd64p32.s
src/runtime/asm_power64x.s
src/runtime/heapdump.go
src/runtime/lfstack.go
src/runtime/malloc.go
src/runtime/malloc2.go
src/runtime/mgc0.go
src/runtime/proc.go
src/runtime/runtime2.go
src/runtime/select.go
src/runtime/stack1.go
src/runtime/stubs.go

Simple merge
diff --cc src/run.bash
index 54b209591a6637b7c33d034fe1e7d63ef77f1ee7,6b9ecc33c299c3f7ebfd386c412beb3ab8c7e63a..b8ce417a0a823089fc13102d8ff589a67fe8c4a5
@@@ -165,6 -159,23 +159,24 @@@ android-arm | dragonfly-386 | dragonfly
  esac
  ) || exit $?
  
 -case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED" in
+ # Race detector only supported on Linux, FreeBSD and OS X,
+ # and only on amd64, and only when cgo is enabled.
+ # Delayed until here so we know whether to try external linking.
++# DISABLED until we get garbage collection working.
++case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED-XXX-DISABLED" in
+ linux-linux-amd64-1 | freebsd-freebsd-amd64-1 | darwin-darwin-amd64-1)
+       echo
+       echo '# Testing race detector.'
+       go test -race -i runtime/race flag os/exec
+       go test -race -run=Output runtime/race
+       go test -race -short flag os/exec
+       
+       # Test with external linking; see issue 9133.
+       if [ "$extlink" = 1 ]; then
+               go test -race -short -ldflags=-linkmode=external flag os/exec
+       fi
+ esac
  # This tests cgo -cdefs. That mode is not supported,
  # so it's okay if it doesn't work on some systems.
  # In particular, it works badly with clang on OS X.
Simple merge
index 6169202ea6d169eb8a57e58d1f2aa9a5f92c012b,3f2ab6d0e6519b6180b1f773e0665a4f35c516d0..548c88e47d0b34a25c7dd5b9779cdb9afbbb3467
@@@ -987,14 -974,6 +974,18 @@@ TEXT runtime·goexit(SB),NOSPLIT,$-8-
        MOVD    R0, R0  // NOP
        BL      runtime·goexit1(SB)    // does not return
  
+ TEXT runtime·getg(SB),NOSPLIT,$-8-8
+       MOVD    g, ret+0(FP)
+       RETURN
++
 +TEXT runtime·prefetcht0(SB),NOSPLIT,$0-8
 +      RETURN
 +
 +TEXT runtime·prefetcht1(SB),NOSPLIT,$0-8
 +      RETURN
 +
 +TEXT runtime·prefetcht2(SB),NOSPLIT,$0-8
 +      RETURN
 +
 +TEXT runtime·prefetchnta(SB),NOSPLIT,$0-8
 +      RETURN
Simple merge
index a4ad8a10c69584aa3d4f2408757a00bbed4879c7,8a36a67b35706d170df6229cecf4e7562d7a4fda..fd3325972a855fb4bd965765db316ce53f615c7a
@@@ -12,9 -12,13 +12,13 @@@ import "unsafe
  func lfstackpush(head *uint64, node *lfnode) {
        node.pushcnt++
        new := lfstackPack(node, node.pushcnt)
+       if node1, _ := lfstackUnpack(new); node1 != node {
+               println("runtime: lfstackpush invalid packing: node=", node, " cnt=", hex(node.pushcnt), " packed=", hex(new), " -> node=", node1, "\n")
+               gothrow("lfstackpush")
+       }
        for {
                old := atomicload64(head)
 -              node.next, _ = lfstackUnpack(old)
 +              node.next = old
                if cas64(head, old, new) {
                        break
                }
Simple merge
Simple merge
Simple merge
Simple merge
index 7625a2dd81f9d1ee28750ebc343feef75ac087a5,7987a737308bc0e47c88333f0763a551f3b2eaf3..d18178d0939475eab1d66b46ea3282f82966af0c
@@@ -397,18 -401,9 +403,10 @@@ type itab struct 
        fun    [0]uintptr
  }
  
- const (
-       // TODO: Generate in cmd/dist.
-       _NaCl    = 0
-       _Windows = 0
-       _Solaris = 0
-       _Plan9   = 0
- )
  // Lock-free stack node.
 +// // Also known to export_test.go.
  type lfnode struct {
 -      next    *lfnode
 +      next    uint64
        pushcnt uintptr
  }
  
Simple merge
index 57d0f8c65ef271520b9480f576678a2f5ddcdd29,ad83e589512ce5e9d36db9a203939dc4d3b384b4..c14347dbdfc80ad71aca2512168e3469e42099cf
@@@ -781,9 -773,12 +781,9 @@@ func shrinkstack(gp *g) 
        if gp.syscallsp != 0 {
                return
        }
-       if _Windows != 0 && gp.m != nil && gp.m.libcallsp != 0 {
 -
 -      /* TODO
 -      if goos_windows && gp.m != nil && gp.m.libcallsp != 0 {
++      if goos_windows != 0 && gp.m != nil && gp.m.libcallsp != 0 {
                return
        }
 -      */
  
        if stackDebug > 0 {
                print("shrinking stack ", oldsize, "->", newsize, "\n")
Simple merge