diff options
author | Hana (Hyang-Ah) Kim <hyangah@gmail.com> | 2018-05-10 00:01:15 +0800 |
---|---|---|
committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | 2018-05-23 19:01:58 +0000 |
commit | 3f89214940d1f922bc4fde923de658a2ec1e4ac3 (patch) | |
tree | fb89ac6e1aeb8f479d60fa912a337f3456bab4f7 /src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go | |
parent | 392ff18b8fdcb1f116f81887ddedfd43b19fdb9c (diff) | |
download | go-git-3f89214940d1f922bc4fde923de658a2ec1e4ac3.tar.gz |
cmd/pprof: add readline support similar to upstream
The upstream pprof implements the readline feature using
the github.com/chzyer/readline package in its pprof.go main.
It would be ideal to use the same readline support package as
the upstream for better user experience and code maintenance.
However, bringing in third-party packages requires more work
than I envisioned (e.g. clean up the vendored code to meet the
expected standard - iow don't break builders).
As a result, this change implements the similar feature
for the pprof command included in the go distribution
(cmd/pprof/pprof.go) using golang.org/x/crypto/ssh/terminal
for now.
Auto-completion is not yet supported (same in the upstream).
The feature is enabled only in linux, windows, darwin, and
only when terminal support is available.
This change brings in new vendored packages,
golang.org/x/crypto/ssh/terminal and
golang.org/x/sys/{unix,windows}.
For #14041
Change-Id: If4a790796acf2ab20f7e81268b9d9354c5a5cd2b
Reviewed-on: https://go-review.googlesource.com/112436
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go')
-rw-r--r-- | src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go new file mode 100644 index 0000000000..fc0e50e037 --- /dev/null +++ b/src/cmd/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go @@ -0,0 +1,13 @@ +// +build linux,386 linux,arm linux,mips linux,mipsle + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +func init() { + // On 32-bit Linux systems, the fcntl syscall that matches Go's + // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. + fcntl64Syscall = SYS_FCNTL64 +} |