From 38cb9d28a9a3970f5bfeacdbeaa2f95aab3ebe73 Mon Sep 17 00:00:00 2001 From: Sameer Ajmani Date: Tue, 7 Feb 2017 13:12:25 -0500 Subject: [PATCH] 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 Reviewed-by: Brad Fitzpatrick --- src/runtime/pprof/pprof.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/pprof/pprof.go b/src/runtime/pprof/pprof.go index 8c500e6f3e..c2b4a2787e 100644 --- a/src/runtime/pprof/pprof.go +++ b/src/runtime/pprof/pprof.go @@ -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() -- 2.50.0