mirror of
https://github.com/golang/go
synced 2024-11-19 16:54:44 -07:00
runtime/pprof: document that profile names should not contain spaces.
Change-Id: I967d897e812bee63b32bc2a7dcf453861b89b7e3 Reviewed-on: https://go-review.googlesource.com/36533 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
a833485828
commit
38cb9d28a9
@ -185,6 +185,8 @@ func unlockProfiles() {
|
||||
// If a profile with that name already exists, NewProfile panics.
|
||||
// The convention is to use a 'import/path.' prefix to create
|
||||
// separate name spaces for each package.
|
||||
// For compatibility with various tools that read pprof data,
|
||||
// profile names should not contain spaces.
|
||||
func NewProfile(name string) *Profile {
|
||||
lockProfiles()
|
||||
defer unlockProfiles()
|
||||
|
Loading…
Reference in New Issue
Block a user