From: Russ Cox Date: Mon, 10 Nov 2014 01:20:06 +0000 (-0500) Subject: cmd/pprof: install as go tool pprof X-Git-Tag: go1.4rc1~24 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=af3e02e4040f4ae62d62d4f23411e11fa96340be;p=gostls13.git cmd/pprof: install as go tool pprof LGTM=bradfitz, r R=r, bradfitz CC=golang-codereviews https://golang.org/cl/168320043 --- diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go index 6efeeb1a9c..b71feb7a67 100644 --- a/src/cmd/go/pkg.go +++ b/src/cmd/go/pkg.go @@ -399,6 +399,7 @@ var goTools = map[string]targetDir{ "cmd/nm": toTool, "cmd/objdump": toTool, "cmd/pack": toTool, + "cmd/pprof": toTool, "cmd/yacc": toTool, "golang.org/x/tools/cmd/cover": toTool, "golang.org/x/tools/cmd/godoc": toBin, diff --git a/src/cmd/pprof/README b/src/cmd/pprof/README new file mode 100644 index 0000000000..a728ef2353 --- /dev/null +++ b/src/cmd/pprof/README @@ -0,0 +1,8 @@ +The pprof in this directory is adapted from the pprof used inside Google +for C++, Java, and Go programs. Because it was developed for that broader +context, it is overgeneralized when used here for the specific use case +of profiling standard Go programs. However, we've left the abstractions +intact in order to share updates between this copy and Google's internal one. + +Please do not take the level of abstraction in this program as an example +to follow in your own. diff --git a/src/cmd/pprof/doc.go b/src/cmd/pprof/doc.go new file mode 100644 index 0000000000..c6ff11d102 --- /dev/null +++ b/src/cmd/pprof/doc.go @@ -0,0 +1,12 @@ +// 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. + +// Pprof interprets and displays profiles of Go programs. +// +// Usage: +// +// go tool pprof binary profile +// +// For more information, see http://blog.golang.org/profiling-go-programs. +package main