From 15054393fb78a2fd3b6ba2e6888694ffbc0c4ac2 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 26 Apr 2016 14:57:04 +0100 Subject: [PATCH] Update profile package to latest version --- .gitmodules | 6 +++--- prog/weaver/main.go | 7 ++----- vendor/github.com/davecheney/profile | 1 - vendor/github.com/pkg/profile | 1 + 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 160000 vendor/github.com/davecheney/profile create mode 160000 vendor/github.com/pkg/profile diff --git a/.gitmodules b/.gitmodules index 58ec72d5..40fe6a77 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "vendor/github.com/vishvananda/netlink"] path = vendor/github.com/vishvananda/netlink url = https://github.com/vishvananda/netlink.git -[submodule "vendor/github.com/davecheney/profile"] - path = vendor/github.com/davecheney/profile - url = https://github.com/davecheney/profile.git [submodule "vendor/github.com/gorilla/mux"] path = vendor/github.com/gorilla/mux url = https://github.com/gorilla/mux.git @@ -70,3 +67,6 @@ [submodule "vendor/github.com/coreos/go-iptables"] path = vendor/github.com/coreos/go-iptables url = https://github.com/coreos/go-iptables +[submodule "vendor/github.com/pkg/profile"] + path = vendor/github.com/pkg/profile + url = https://github.com/pkg/profile diff --git a/prog/weaver/main.go b/prog/weaver/main.go index adb3ec54..4a28bc99 100644 --- a/prog/weaver/main.go +++ b/prog/weaver/main.go @@ -12,9 +12,9 @@ import ( "sync/atomic" "time" - "github.com/davecheney/profile" "github.com/docker/docker/pkg/mflag" "github.com/gorilla/mux" + "github.com/pkg/profile" "github.com/weaveworks/mesh" "github.com/weaveworks/go-checkpoint" @@ -231,10 +231,7 @@ func main() { checkForUpdates() if prof != "" { - p := *profile.CPUProfile - p.ProfilePath = prof - p.NoShutdownHook = true - defer profile.Start(&p).Stop() + defer profile.Start(profile.CPUProfile, profile.ProfilePath(prof), profile.NoShutdownHook).Stop() } if protocolMinVersion < mesh.ProtocolMinVersion || protocolMinVersion > mesh.ProtocolMaxVersion { diff --git a/vendor/github.com/davecheney/profile b/vendor/github.com/davecheney/profile deleted file mode 160000 index c29d1a15..00000000 --- a/vendor/github.com/davecheney/profile +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c29d1a1565bca9fbeed5eed0e5d52ba78469a16b diff --git a/vendor/github.com/pkg/profile b/vendor/github.com/pkg/profile new file mode 160000 index 00000000..19396ecf --- /dev/null +++ b/vendor/github.com/pkg/profile @@ -0,0 +1 @@ +Subproject commit 19396ecfda37c1c9ddaa52019adca59d582e4832