summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-22 23:31:01 +0100
committerGitHub <noreply@github.com>2019-11-22 23:31:01 +0100
commit6187e724353f2d68943f912e0d8fc1d3d3c1f549 (patch)
tree45a298d81a731186371dcb6329eefcbf96f73a20
parent1284260b668168c560e65b803979eb2caff0293a (diff)
parent885df0cb1ef942dba6ff37d348a4744a9e018a09 (diff)
downloadpodman-6187e724353f2d68943f912e0d8fc1d3d3c1f549.tar.gz
podman-6187e724353f2d68943f912e0d8fc1d3d3c1f549.tar.bz2
podman-6187e724353f2d68943f912e0d8fc1d3d3c1f549.zip
Merge pull request #4544 from containers/dependabot/go_modules/github.com/pkg/profile-1.4.0
build(deps): bump github.com/pkg/profile from 1.3.0 to 1.4.0
-rw-r--r--go.mod2
-rw-r--r--go.sum2
-rw-r--r--vendor/github.com/pkg/profile/.travis.yml2
-rw-r--r--vendor/github.com/pkg/profile/go.mod3
-rw-r--r--vendor/github.com/pkg/profile/mutex.go13
-rw-r--r--vendor/github.com/pkg/profile/mutex17.go9
-rw-r--r--vendor/github.com/pkg/profile/profile.go29
-rw-r--r--vendor/github.com/pkg/profile/trace.go8
-rw-r--r--vendor/github.com/pkg/profile/trace16.go10
-rw-r--r--vendor/modules.txt2
10 files changed, 33 insertions, 47 deletions
diff --git a/go.mod b/go.mod
index f66a952d6..5760f910b 100644
--- a/go.mod
+++ b/go.mod
@@ -50,7 +50,7 @@ require (
github.com/opencontainers/selinux v1.3.0
github.com/opentracing/opentracing-go v1.1.0
github.com/pkg/errors v0.8.1
- github.com/pkg/profile v1.3.0
+ github.com/pkg/profile v1.4.0
github.com/pmezard/go-difflib v1.0.0
github.com/seccomp/containers-golang v0.0.0-20190312124753-8ca8945ccf5f
github.com/sirupsen/logrus v1.4.2
diff --git a/go.sum b/go.sum
index df0a38319..23091d495 100644
--- a/go.sum
+++ b/go.sum
@@ -377,6 +377,8 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.3.0 h1:OQIvuDgm00gWVWGTf4m4mCt6W1/0YqU7Ntg0mySWgaI=
github.com/pkg/profile v1.3.0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
+github.com/pkg/profile v1.4.0 h1:uCmaf4vVbWAOZz36k1hrQD7ijGRzLwaME8Am/7a4jZI=
+github.com/pkg/profile v1.4.0/go.mod h1:NWz/XGvpEW1FyYQ7fCx4dqYBLlfTcE+A9FLAkNKqjFE=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
diff --git a/vendor/github.com/pkg/profile/.travis.yml b/vendor/github.com/pkg/profile/.travis.yml
index 1c9e6bb6b..fd72871e0 100644
--- a/vendor/github.com/pkg/profile/.travis.yml
+++ b/vendor/github.com/pkg/profile/.travis.yml
@@ -1,8 +1,8 @@
language: go
go_import_path: github.com/pkg/profile
go:
- - 1.10.x
- 1.12.x
+ - 1.13.x
- tip
script:
diff --git a/vendor/github.com/pkg/profile/go.mod b/vendor/github.com/pkg/profile/go.mod
new file mode 100644
index 000000000..2d82f3d84
--- /dev/null
+++ b/vendor/github.com/pkg/profile/go.mod
@@ -0,0 +1,3 @@
+module github.com/pkg/profile
+
+go 1.12
diff --git a/vendor/github.com/pkg/profile/mutex.go b/vendor/github.com/pkg/profile/mutex.go
deleted file mode 100644
index e69c5b44d..000000000
--- a/vendor/github.com/pkg/profile/mutex.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build go1.8
-
-package profile
-
-import "runtime"
-
-func enableMutexProfile() {
- runtime.SetMutexProfileFraction(1)
-}
-
-func disableMutexProfile() {
- runtime.SetMutexProfileFraction(0)
-}
diff --git a/vendor/github.com/pkg/profile/mutex17.go b/vendor/github.com/pkg/profile/mutex17.go
deleted file mode 100644
index b004c21d5..000000000
--- a/vendor/github.com/pkg/profile/mutex17.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// +build !go1.8
-
-package profile
-
-// mock mutex support for Go 1.7 and earlier.
-
-func enableMutexProfile() {}
-
-func disableMutexProfile() {}
diff --git a/vendor/github.com/pkg/profile/profile.go b/vendor/github.com/pkg/profile/profile.go
index 20e285427..b9fdfcfd8 100644
--- a/vendor/github.com/pkg/profile/profile.go
+++ b/vendor/github.com/pkg/profile/profile.go
@@ -10,6 +10,7 @@ import (
"path/filepath"
"runtime"
"runtime/pprof"
+ "runtime/trace"
"sync/atomic"
)
@@ -20,6 +21,7 @@ const (
blockMode
traceMode
threadCreateMode
+ goroutineMode
)
// Profile represents an active profiling session.
@@ -98,6 +100,10 @@ func TraceProfile(p *Profile) { p.mode = traceMode }
// It disables any previous profiling settings.
func ThreadcreationProfile(p *Profile) { p.mode = threadCreateMode }
+// GoroutineProfile enables goroutine profiling.
+// It disables any previous profiling settings.
+func GoroutineProfile(p *Profile) { p.mode = goroutineMode }
+
// ProfilePath controls the base path where various profiling
// files are written. If blank, the base path will be generated
// by ioutil.TempDir.
@@ -189,14 +195,14 @@ func Start(options ...func(*Profile)) interface {
if err != nil {
log.Fatalf("profile: could not create mutex profile %q: %v", fn, err)
}
- enableMutexProfile()
+ runtime.SetMutexProfileFraction(1)
logf("profile: mutex profiling enabled, %s", fn)
prof.closer = func() {
if mp := pprof.Lookup("mutex"); mp != nil {
mp.WriteTo(f, 0)
}
f.Close()
- disableMutexProfile()
+ runtime.SetMutexProfileFraction(0)
logf("profile: mutex profiling disabled, %s", fn)
}
@@ -236,14 +242,29 @@ func Start(options ...func(*Profile)) interface {
if err != nil {
log.Fatalf("profile: could not create trace output file %q: %v", fn, err)
}
- if err := startTrace(f); err != nil {
+ if err := trace.Start(f); err != nil {
log.Fatalf("profile: could not start trace: %v", err)
}
logf("profile: trace enabled, %s", fn)
prof.closer = func() {
- stopTrace()
+ trace.Stop()
logf("profile: trace disabled, %s", fn)
}
+
+ case goroutineMode:
+ fn := filepath.Join(path, "goroutine.pprof")
+ f, err := os.Create(fn)
+ if err != nil {
+ log.Fatalf("profile: could not create goroutine profile %q: %v", fn, err)
+ }
+ logf("profile: goroutine profiling enabled, %s", fn)
+ prof.closer = func() {
+ if mp := pprof.Lookup("goroutine"); mp != nil {
+ mp.WriteTo(f, 0)
+ }
+ f.Close()
+ logf("profile: goroutine profiling disabled, %s", fn)
+ }
}
if !prof.noShutdownHook {
diff --git a/vendor/github.com/pkg/profile/trace.go b/vendor/github.com/pkg/profile/trace.go
deleted file mode 100644
index b349ed8b2..000000000
--- a/vendor/github.com/pkg/profile/trace.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build go1.7
-
-package profile
-
-import "runtime/trace"
-
-var startTrace = trace.Start
-var stopTrace = trace.Stop
diff --git a/vendor/github.com/pkg/profile/trace16.go b/vendor/github.com/pkg/profile/trace16.go
deleted file mode 100644
index 6aa6566ef..000000000
--- a/vendor/github.com/pkg/profile/trace16.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build !go1.7
-
-package profile
-
-import "io"
-
-// mock trace support for Go 1.6 and earlier.
-
-func startTrace(w io.Writer) error { return nil }
-func stopTrace() {}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 503e56d59..8837e7efb 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -408,7 +408,7 @@ github.com/ostreedev/ostree-go/pkg/glibobject
github.com/ostreedev/ostree-go/pkg/otbuiltin
# github.com/pkg/errors v0.8.1
github.com/pkg/errors
-# github.com/pkg/profile v1.3.0
+# github.com/pkg/profile v1.4.0
github.com/pkg/profile
# github.com/pmezard/go-difflib v1.0.0
github.com/pmezard/go-difflib/difflib