1. 06 Aug, 2013 10 commits
    • Mikio Hara's avatar
      net: separate pollster initialization from network file descriptor allocation · 6a76bca3
      Mikio Hara authored
      Unlike the existing net package own pollster, runtime-integrated
      network pollster on BSD variants, actually kqueue, requires a socket
      that has beed passed to syscall.Listen previously for a stream
      listener.
      
      This CL separates pollDesc.Init (actually runtime_pollOpen) from newFD
      to allow control of each state of sockets and adds init method to netFD
      instead. Upcoming CLs will rearrange the call order of runtime-integrated
      pollster and syscall functions like the following;
      
      - For dialers that open active connections, runtime_pollOpen will be
        called in between syscall.Bind and syscall.Connect.
      
      - For stream listeners that open passive stream connections,
        runtime_pollOpen will be called just after syscall.Listen.
      
      - For datagram listeners that open datagram connections,
        runtime_pollOpen will be called just after syscall.Bind.
      
      This is in preparation for runtime-integrated network pollster for BSD
      variants.
      
      Update #5199
      
      R=dvyukov, alex.brainman, minux.ma
      CC=golang-dev
      https://golang.org/cl/8608044
      6a76bca3
    • David du Colombier's avatar
      runtime: fix Plan 9 build · 33bd9694
      David du Colombier authored
      The current failures were:
      
      fatal error: runtime: stack split during syscall
      goroutine 1 [stack split]:
      runtime.findnull(0x105a9080)
              /usr/go/src/pkg/runtime/string.goc:14 fp=0x305aefb8
      runtime: unexpected return pc for runtime.errstr called from 0x80
      runtime.errstr()
              /usr/go/src/pkg/runtime/sys_plan9_386.s:196 +0x2f fp=0x305aefc8
      
      fatal error: runtime: stack split during syscall
      goroutine 2 [stack split]:
      runtime.nanotime(0x305bff3c)
              /usr/go/src/pkg/runtime/time_plan9_386.c:9 fp=0x305bff34
      notetsleep(0x305bff9c, 0xf8475800, 0xd, 0x0, 0x0, ...)
              /usr/go/src/pkg/runtime/lock_sema.c:195 +0x87 fp=0x305bff48
      runtime.notetsleepg(0x305bff9c, 0xf8475800, 0xd)
              /usr/go/src/pkg/runtime/lock_sema.c:266 +0xa4 fp=0x305bff68
      runtime.MHeap_Scavenger()
              /usr/go/src/pkg/runtime/mheap.c:463 +0xc2 fp=0x305bffd0
      runtime.goexit()
              /usr/go/src/pkg/runtime/proc.c:1332 fp=0x305bffd4
      created by runtime.main
              /usr/go/src/pkg/runtime/proc.c:168
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/12128043
      33bd9694
    • Brad Fitzpatrick's avatar
      net: detect bad F_DUPFD_CLOEXEC on OS X 10.6 · b2fcdfa5
      Brad Fitzpatrick authored
      On 10.6, OS X's fcntl returns EBADF instead of EINVAL.
      
      R=golang-dev, iant, dave
      CC=golang-dev
      https://golang.org/cl/12493043
      b2fcdfa5
    • Rob Pike's avatar
      runtime: change int32 to intgo in findnull and findnullw · 82f5ca1e
      Rob Pike authored
      Update #6046.
      This CL just does findnull and findnullw. There are other functions
      to fix but doing them a few at a time will help isolate any (unlikely)
      breakages these changes bring up in architectures I can't test
      myself.
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/12520043
      82f5ca1e
    • Dmitriy Vyukov's avatar
      net: fix intentional build breakage introduced in 12413043 · 429a67e3
      Dmitriy Vyukov authored
      R=alex.brainman
      CC=golang-dev
      https://golang.org/cl/12502044
      429a67e3
    • Dmitriy Vyukov's avatar
      net: reduce number of memory allocations during IO operations · 04b1cfa9
      Dmitriy Vyukov authored
      Embed all data necessary for read/write operations directly into netFD.
      
      benchmark                    old ns/op    new ns/op    delta
      BenchmarkTCP4Persistent          27669        23341  -15.64%
      BenchmarkTCP4Persistent-2        18173        12558  -30.90%
      BenchmarkTCP4Persistent-4        10390         7319  -29.56%
      
      This change will intentionally break all builders to see
      how many allocations they do per read/write.
      This will be fixed soon afterwards.
      
      R=golang-dev, alex.brainman
      CC=golang-dev
      https://golang.org/cl/12413043
      04b1cfa9
    • Dmitriy Vyukov's avatar
      runtime: use gcpc/gcsp during traceback of goroutines in syscalls · 9c0500b4
      Dmitriy Vyukov authored
      gcpc/gcsp are used by GC in similar situation.
      gcpc/gcsp are also more stable than gp->sched,
      because gp->sched is mutated by entersyscall/exitsyscall
      in morestack and mcall. So it has higher chances of being inconsistent.
      Also, rename gcpc/gcsp to syscallpc/syscallsp.
      
      This is the same as reverted change 12250043
      with save marked as textflag 7.
      The problem was that if save calls morestack,
      then subsequent lessstack spoils g->sched.pc/sp.
      And that bad values were remembered in g->syscallpc/sp.
      Entersyscallblock had the same problem,
      but it was never triggered to date.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/12478043
      9c0500b4
    • Kyle Lemons's avatar
      flag: document the zero value of FlagSet · 321ede78
      Kyle Lemons authored
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/12403043
      321ede78
    • Keith Randall's avatar
      runtime: Use old reflect.call implementation from cgo. · 034d5fcc
      Keith Randall authored
      Basically a partial rollback of 12053043 until I can
      figure out what is really going on.
      Fixes bug 6051.
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/12496043
      034d5fcc
    • Brad Fitzpatrick's avatar
      api: update next.txt · b1c45318
      Brad Fitzpatrick authored
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/12490043
      b1c45318
  2. 05 Aug, 2013 23 commits
  3. 04 Aug, 2013 5 commits
  4. 03 Aug, 2013 2 commits