Swapping the goroutines lets them reuse the
communication completion on v instead of
needing a second channel (done).
R=gri
CC=golang-dev
https://golang.org/cl/4287045
This reduces the number of writes by 2 (1 client, 1 server) on each round trip.
A simple test shows 24% higher throughput.
R=rsc
CC=golang-dev
https://golang.org/cl/4279057
This change records more metadata about what
influenced the creation of the object file.
Specifically, if a package imports, say, "fmt" but does not
need to describe any fmt types in its own export data,
that package's object file did not mention the dependency
on "fmt" before. Now it does.
Listing the import is purely informational.
It has no effect on which files are opened or consulted
when importing a package.
Import lines are marked indirect when they are needed
to explain the API but were not imported directly.
For example http imports crypto/tls and exports
a struct with a field of type tls.ConnectionState,
which contains an x509.Certificate. Since http does
not import x509 but needs to explain the x509.Certificate
type in its export data, the import of x509 is marked
as indirect. These import lines were always present;
marking them with the indirect comment makes clear
which were imported directly and which are incidental.
R=ken2
CC=golang-dev
https://golang.org/cl/4295048
The loop always makes an extra system call. It only makes a
difference if more than 100 goroutines started waiting for
something to happen on a network file descriptor since the
last time the pipe was drained, which is unlikely since we
will be woken up the first time a goroutine starts waiting.
If we don't drain the pipe this time, we'll be woken up again
right away and can drain again.
R=rsc
CC=golang-dev
https://golang.org/cl/4275042
Add a benchmark.
BenchmarkEndToEndPipe gives 14.3microseconds/op before,
13.1microseconds/op after, or about 76e3 round trips per second
through the kernel.
With a bytes buffer, and therefore no system calls for I/O, the
numbers go to 7.3microseconds/op, or about 137e3 round trips
per second.
R=rsc
CC=golang-dev
https://golang.org/cl/4279045
Transport.Do -> RoundTripper.RoundTrip
This makes way for a subsequent CL to export the
currently private RoundTripper implementation
as struct Transport.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4286043
Functionality was only present for
debuggging and now is available in
gocheck where is makes more sense.
R=rsc
CC=golang-dev
https://golang.org/cl/4239078
This is to make it easier to support Solaris syslog. On
Solaris syslog messages are sent via STREAMS using putmsg to
/dev/conslog. The putmsg call uses a a control buffer of type
log_cdtl and a data buffer which is the message, and it is in
general a big mess. This CL just splits out the Unix domain
support so that Solaris can use a different mechanism. I do
not propose to implement the Solaris support today. This
split will make it possible for gccgo to just call the libc
function for now.
R=r, rsc
CC=golang-dev
https://golang.org/cl/4261061
The Flush functionality wasn't removed, but now you have
to test if your ResponseWriter is also a Flusher:
func ServeHTTP(rw http.ResponseWriter, req *http.Request) {
if f, ok := rw.(http.Flusher); ok {
f.Flush()
}
}
R=rsc, bradfitzwork
CC=gburd, golang-dev
https://golang.org/cl/4239077