aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2017-12-13 10:43:58 -0800
committerChristine Dodrill <me@christine.website>2017-12-13 11:42:37 -0800
commit3a21ef192628f6952eaa981bcdf718a35a4b43c7 (patch)
tree9c88a3ddc57ab5014f436ec2c08c96280872632e /vendor/github.com/google
parent3b4b6cede9bc30008b0f40989a1564b26e64fd05 (diff)
downloadxesite-3a21ef192628f6952eaa981bcdf718a35a4b43c7.tar.xz
xesite-3a21ef192628f6952eaa981bcdf718a35a4b43c7.zip
convert to go buildpack
Diffstat (limited to 'vendor/github.com/google')
-rw-r--r--vendor/github.com/google/gops/.circleci/config.yml15
-rw-r--r--vendor/github.com/google/gops/Gopkg.lock33
-rw-r--r--vendor/github.com/google/gops/Gopkg.toml34
-rw-r--r--vendor/github.com/google/gops/LICENSE27
-rw-r--r--vendor/github.com/google/gops/README.md150
-rw-r--r--vendor/github.com/google/gops/agent/agent_test.go67
-rw-r--r--vendor/github.com/google/gops/cmd.go185
-rw-r--r--vendor/github.com/google/gops/examples/hello/main.go19
-rw-r--r--vendor/github.com/google/gops/goprocess/gp.go112
-rw-r--r--vendor/github.com/google/gops/internal/dwarf/dwarf.go600
-rw-r--r--vendor/github.com/google/gops/internal/dwarf/dwarf_defs.go483
-rw-r--r--vendor/github.com/google/gops/internal/goobj/read.go714
-rw-r--r--vendor/github.com/google/gops/internal/goobj/read_test.go28
-rw-r--r--vendor/github.com/google/gops/internal/obj/addrtype_string.go27
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/a.out.go338
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/anames.go108
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/anames5.go73
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/asm5.go2846
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/list5.go84
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm/obj5.go1055
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/a.out.go719
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/anames.go370
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/anames7.go70
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/asm7.go4374
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/list7.go115
-rw-r--r--vendor/github.com/google/gops/internal/obj/arm64/obj7.go1005
-rw-r--r--vendor/github.com/google/gops/internal/obj/data.go190
-rw-r--r--vendor/github.com/google/gops/internal/obj/flag.go115
-rw-r--r--vendor/github.com/google/gops/internal/obj/funcdata.go48
-rw-r--r--vendor/github.com/google/gops/internal/obj/go.go86
-rw-r--r--vendor/github.com/google/gops/internal/obj/ld.go92
-rw-r--r--vendor/github.com/google/gops/internal/obj/line_test.go49
-rw-r--r--vendor/github.com/google/gops/internal/obj/link.go974
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/a.out.go375
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/anames.go113
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/anames0.go44
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/asm0.go1783
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/list0.go85
-rw-r--r--vendor/github.com/google/gops/internal/obj/mips/obj0.go1497
-rw-r--r--vendor/github.com/google/gops/internal/obj/obj.go306
-rw-r--r--vendor/github.com/google/gops/internal/obj/objfile.go606
-rw-r--r--vendor/github.com/google/gops/internal/obj/pass.go217
-rw-r--r--vendor/github.com/google/gops/internal/obj/pcln.go281
-rw-r--r--vendor/github.com/google/gops/internal/obj/plist.go208
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/a.out.go941
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/anames.go549
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/anames9.go49
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/asm9.go4552
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/list9.go105
-rw-r--r--vendor/github.com/google/gops/internal/obj/ppc64/obj9.go1251
-rw-r--r--vendor/github.com/google/gops/internal/obj/reloctype_string.go17
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/a.out.go926
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/anames.go675
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/anamesz.go39
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/asmz.go4766
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/listz.go74
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/objz.go1029
-rw-r--r--vendor/github.com/google/gops/internal/obj/s390x/vector.go1061
-rw-r--r--vendor/github.com/google/gops/internal/obj/sizeof_test.go40
-rw-r--r--vendor/github.com/google/gops/internal/obj/stack.go21
-rw-r--r--vendor/github.com/google/gops/internal/obj/stringer.go104
-rw-r--r--vendor/github.com/google/gops/internal/obj/sym.go88
-rw-r--r--vendor/github.com/google/gops/internal/obj/symkind_string.go16
-rw-r--r--vendor/github.com/google/gops/internal/obj/textflag.go50
-rw-r--r--vendor/github.com/google/gops/internal/obj/typekind.go41
-rw-r--r--vendor/github.com/google/gops/internal/obj/util.go499
-rw-r--r--vendor/github.com/google/gops/internal/obj/x86/a.out.go1009
-rw-r--r--vendor/github.com/google/gops/internal/obj/x86/anames.go769
-rw-r--r--vendor/github.com/google/gops/internal/obj/x86/asm6.go4536
-rw-r--r--vendor/github.com/google/gops/internal/obj/x86/list6.go181
-rw-r--r--vendor/github.com/google/gops/internal/obj/x86/obj6.go1481
-rw-r--r--vendor/github.com/google/gops/internal/obj/zbootstrap.go15
-rw-r--r--vendor/github.com/google/gops/internal/objfile/disasm.go283
-rw-r--r--vendor/github.com/google/gops/internal/objfile/elf.go124
-rw-r--r--vendor/github.com/google/gops/internal/objfile/goobj.go160
-rw-r--r--vendor/github.com/google/gops/internal/objfile/macho.go134
-rw-r--r--vendor/github.com/google/gops/internal/objfile/objfile.go129
-rw-r--r--vendor/github.com/google/gops/internal/objfile/pe.go208
-rw-r--r--vendor/github.com/google/gops/internal/objfile/plan9obj.go156
-rw-r--r--vendor/github.com/google/gops/internal/sys/arch.go161
-rw-r--r--vendor/github.com/google/gops/main.go138
-rw-r--r--vendor/github.com/google/gops/main_test.go41
82 files changed, 47138 insertions, 0 deletions
diff --git a/vendor/github.com/google/gops/.circleci/config.yml b/vendor/github.com/google/gops/.circleci/config.yml
new file mode 100644
index 0000000..42c5932
--- /dev/null
+++ b/vendor/github.com/google/gops/.circleci/config.yml
@@ -0,0 +1,15 @@
+# Golang CircleCI 2.0 configuration file
+#
+# Check https://circleci.com/docs/2.0/language-go/ for more details
+version: 2
+jobs:
+ build:
+ docker:
+ - image: circleci/golang:1.9
+
+ working_directory: /go/src/github.com/google/gops
+ steps:
+ - checkout
+
+ # specify any bash command here prefixed with `run: `
+ - run: go test -v ./...
diff --git a/vendor/github.com/google/gops/Gopkg.lock b/vendor/github.com/google/gops/Gopkg.lock
new file mode 100644
index 0000000..7e2249f
--- /dev/null
+++ b/vendor/github.com/google/gops/Gopkg.lock
@@ -0,0 +1,33 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ branch = "master"
+ name = "github.com/kardianos/osext"
+ packages = ["."]
+ revision = "ae77be60afb1dcacde03767a8c37337fad28ac14"
+
+[[projects]]
+ branch = "master"
+ name = "github.com/keybase/go-ps"
+ packages = [".","darwincgo"]
+ revision = "668c8856d9992f97248b3177d45743d2cc1068db"
+
+[[projects]]
+ branch = "master"
+ name = "golang.org/x/arch"
+ packages = ["arm/armasm","ppc64/ppc64asm","x86/x86asm"]
+ revision = "f185940480d2c897e1ca8cf2f1be122e1258341b"
+
+[[projects]]
+ name = "rsc.io/goversion"
+ packages = ["version"]
+ revision = "84cd9d26d7efce780a7aaafd0944961371da741f"
+ version = "v1.0.0"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "4b494828d559e89fc1fe70b9bfdd0f5c8ad62ee16258a3b2bcf1028c140faa32"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/google/gops/Gopkg.toml b/vendor/github.com/google/gops/Gopkg.toml
new file mode 100644
index 0000000..a770432
--- /dev/null
+++ b/vendor/github.com/google/gops/Gopkg.toml
@@ -0,0 +1,34 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+# name = "github.com/user/project"
+# version = "1.0.0"
+#
+# [[constraint]]
+# name = "github.com/user/project2"
+# branch = "dev"
+# source = "github.com/myfork/project2"
+#
+# [[override]]
+# name = "github.com/x/y"
+# version = "2.4.0"
+
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/kardianos/osext"
+
+[[constraint]]
+ branch = "master"
+ name = "github.com/keybase/go-ps"
+
+[[constraint]]
+ branch = "master"
+ name = "golang.org/x/arch"
diff --git a/vendor/github.com/google/gops/LICENSE b/vendor/github.com/google/gops/LICENSE
new file mode 100644
index 0000000..55e52a0
--- /dev/null
+++ b/vendor/github.com/google/gops/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/google/gops/README.md b/vendor/github.com/google/gops/README.md
new file mode 100644
index 0000000..236ed30
--- /dev/null
+++ b/vendor/github.com/google/gops/README.md
@@ -0,0 +1,150 @@
+# gops
+
+[![Build status](https://circleci.com/gh/google/gops/tree/master.svg?style=shield&circle-token=2637dc1e57d5407ae250480a86a2e553a7d20482)](https://circleci.com/gh/google/gops)
+[![GoDoc](https://godoc.org/github.com/google/gops/agent?status.svg)](https://godoc.org/github.com/google/gops/agent)
+
+gops is a command to list and diagnose Go processes currently running on your system.
+
+```
+$ gops
+983 uplink-soecks (/usr/local/bin/uplink-soecks)
+52697 gops (/Users/jbd/bin/gops)
+4132* foops (/Users/jbd/bin/foops)
+51130 gocode (/Users/jbd/bin/gocode)
+```
+
+## Installation
+
+```
+$ go get -u github.com/google/gops
+```
+
+## Diagnostics
+
+For processes that starts the diagnostics agent, gops can report
+additional information such as the current stack trace, Go version, memory
+stats, etc.
+
+In order to start the diagnostics agent, see the [hello example](https://github.com/google/gops/blob/master/examples/hello/main.go).
+
+``` go
+package main
+
+import (
+ "log"
+ "time"
+
+ "github.com/google/gops/agent"
+)
+
+func main() {
+ if err := agent.Listen(nil); err != nil {
+ log.Fatal(err)
+ }
+ time.Sleep(time.Hour)
+}
+```
+
+### Manual
+
+It is possible to use gops tool both in local and remote mode.
+
+Local mode requires that you start the target binary as the same user that runs gops binary.
+To use gops in a remote mode you need to know target's agent address.
+
+In Local mode use process's PID as a target; in Remote mode target is a `host:port` combination.
+
+#### 0. Listing all processes running locally
+
+To print all go processes, run `gops` without arguments:
+
+```sh
+$ gops
+983 uplink-soecks (/usr/local/bin/uplink-soecks)
+52697 gops (/Users/jbd/bin/gops)
+4132* foops (/Users/jbd/bin/foops)
+51130 gocode (/Users/jbd/bin/gocode)
+```
+
+Note that processes running the agent are marked with `*` next to the PID (e.g. `4132*`).
+
+#### $ gops stack (\<pid\>|\<addr\>)
+
+In order to print the current stack trace from a target program, run the following command:
+
+
+```sh
+$ gops stack (<pid>|<addr>)
+gops stack 85709
+goroutine 8 [running]:
+runtime/pprof.writeGoroutineStacks(0x13c7bc0, 0xc42000e008, 0xc420ec8520, 0xc420ec8520)
+ /Users/jbd/go/src/runtime/pprof/pprof.go:603 +0x79
+runtime/pprof.writeGoroutine(0x13c7bc0, 0xc42000e008, 0x2, 0xc428f1c048, 0xc420ec8608)
+ /Users/jbd/go/src/runtime/pprof/pprof.go:592 +0x44
+runtime/pprof.(*Profile).WriteTo(0x13eeda0, 0x13c7bc0, 0xc42000e008, 0x2, 0xc42000e008, 0x0)
+ /Users/jbd/go/src/runtime/pprof/pprof.go:302 +0x3b5
+github.com/google/gops/agent.handle(0x13cd560, 0xc42000e008, 0xc420186000, 0x1, 0x1, 0x0, 0x0)
+ /Users/jbd/src/github.com/google/gops/agent/agent.go:150 +0x1b3
+github.com/google/gops/agent.listen()
+ /Users/jbd/src/github.com/google/gops/agent/agent.go:113 +0x2b2
+created by github.com/google/gops/agent.Listen
+ /Users/jbd/src/github.com/google/gops/agent/agent.go:94 +0x480
+# ...
+```
+
+#### $ gops memstats (\<pid\>|\<addr\>)
+
+To print the current memory stats, run the following command:
+
+```sh
+$ gops memstats (<pid>|<addr>)
+```
+
+
+#### $ gops gc (\<pid\>|\<addr\>)
+
+If you want to force run garbage collection on the target program, run `gc`.
+It will block until the GC is completed.
+
+
+#### $ gops version (\<pid\>|\<addr\>)
+
+gops reports the Go version the target program is built with, if you run the following:
+
+```sh
+$ gops version (<pid>|<addr>)
+devel +6a3c6c0 Sat Jan 14 05:57:07 2017 +0000
+```
+
+#### $ gops stats (\<pid\>|\<addr\>)
+
+To print the runtime statistics such as number of goroutines and `GOMAXPROCS`.
+
+#### Profiling
+
+
+##### Pprof
+
+gops supports CPU and heap pprof profiles. After reading either heap or CPU profile,
+it shells out to the `go tool pprof` and let you interatively examine the profiles.
+
+To enter the CPU profile, run:
+
+```sh
+$ gops pprof-cpu (<pid>|<addr>)
+```
+
+To enter the heap profile, run:
+
+```sh
+$ gops pprof-heap (<pid>|<addr>)
+```
+
+##### Execution trace
+
+gops allows you to start the runtime tracer for 5 seconds and examine the results.
+
+```sh
+$ gops trace (<pid>|<addr>)
+```
+
diff --git a/vendor/github.com/google/gops/agent/agent_test.go b/vendor/github.com/google/gops/agent/agent_test.go
new file mode 100644
index 0000000..cc2a440
--- /dev/null
+++ b/vendor/github.com/google/gops/agent/agent_test.go
@@ -0,0 +1,67 @@
+// Copyright 2016 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 agent
+
+import (
+ "os"
+ "testing"
+)
+
+func TestListen(t *testing.T) {
+ err := Listen(nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ Close()
+}
+
+func TestAgentClose(t *testing.T) {
+ err := Listen(nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ Close()
+ _, err = os.Stat(portfile)
+ if !os.IsNotExist(err) {
+ t.Fatalf("portfile = %q doesn't exist; err = %v", portfile, err)
+ }
+ if portfile != "" {
+ t.Fatalf("got = %q; want empty portfile", portfile)
+ }
+}
+
+func TestAgentListenMultipleClose(t *testing.T) {
+ err := Listen(nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ Close()
+ Close()
+ Close()
+ Close()
+}
+
+func TestFormatBytes(t *testing.T) {
+ tests := []struct {
+ val uint64
+ want string
+ }{
+ {1023, "1023 bytes"},
+ {1024, "1.00KB (1024 bytes)"},
+ {1024*1024 - 100, "1023.90KB (1048476 bytes)"},
+ {1024 * 1024, "1.00MB (1048576 bytes)"},
+ {1024 * 1025, "1.00MB (1049600 bytes)"},
+ {1024 * 1024 * 1024, "1.00GB (1073741824 bytes)"},
+ {1024*1024*1024 + 430*1024*1024, "1.42GB (1524629504 bytes)"},
+ {1024 * 1024 * 1024 * 1024 * 1024, "1.00PB (1125899906842624 bytes)"},
+ {1024 * 1024 * 1024 * 1024 * 1024 * 1024, "1024.00PB (1152921504606846976 bytes)"},
+ }
+ for _, tt := range tests {
+ result := formatBytes(tt.val)
+ if result != tt.want {
+ t.Errorf("formatBytes(%v) = %q; want %q", tt.val, result, tt.want)
+ }
+ }
+}
diff --git a/vendor/github.com/google/gops/cmd.go b/vendor/