From f9834e3cf7ce82bbd8940a311956814169b5d5bd Mon Sep 17 00:00:00 2001 From: Shyam Jeedigunta Date: Fri, 9 Feb 2018 16:36:25 +0100 Subject: [PATCH] Disable symbol resolution by pprof in profile-gatherer --- test/e2e/framework/profile_gatherer.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/e2e/framework/profile_gatherer.go b/test/e2e/framework/profile_gatherer.go index f643c7ce6a..95c7be8814 100644 --- a/test/e2e/framework/profile_gatherer.go +++ b/test/e2e/framework/profile_gatherer.go @@ -62,10 +62,6 @@ func checkProfileGatheringPrerequisites() error { } func gatherProfileOfKind(profileBaseName, kind string) error { - // Check some prerequisites before gathering the profile. - if err := checkProfileGatheringPrerequisites(); err != nil { - return err - } // Get the profile data over SSH. getCommand := fmt.Sprintf("curl -s localhost:8080/debug/pprof/%s", kind) sshResult, err := SSH(getCommand, GetMasterHost()+":22", TestContext.Provider) @@ -91,10 +87,10 @@ func gatherProfileOfKind(profileBaseName, kind string) error { switch { // TODO: Support other profile kinds if needed (e.g inuse_space, alloc_objects, mutex, etc) case kind == "heap": - cmd = exec.Command("go", "tool", "pprof", "-pdf", "--alloc_space", tmpfile.Name()) + cmd = exec.Command("go", "tool", "pprof", "-pdf", "-symbolize=none", "--alloc_space", tmpfile.Name()) profilePrefix = "ApiserverMemoryProfile_" case strings.HasPrefix(kind, "profile"): - cmd = exec.Command("go", "tool", "pprof", "-pdf", tmpfile.Name()) + cmd = exec.Command("go", "tool", "pprof", "-pdf", "-symbolize=none", tmpfile.Name()) profilePrefix = "ApiserverCPUProfile_" default: return fmt.Errorf("Unknown profile kind provided: %s", kind) @@ -141,6 +137,10 @@ func GatherApiserverCPUProfileForNSeconds(wg *sync.WaitGroup, profileBaseName st if wg != nil { defer wg.Done() } + if err := checkProfileGatheringPrerequisites(); err != nil { + Logf("Profile gathering pre-requisite failed: %v", err) + return + } if profileBaseName == "" { profileBaseName = time.Now().Format(time.RFC3339) } @@ -153,6 +153,10 @@ func GatherApiserverMemoryProfile(wg *sync.WaitGroup, profileBaseName string) { if wg != nil { defer wg.Done() } + if err := checkProfileGatheringPrerequisites(); err != nil { + Logf("Profile gathering pre-requisite failed: %v", err) + return + } if profileBaseName == "" { profileBaseName = time.Now().Format(time.RFC3339) }