mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/pprof/internal/profile: ignore comments when parsing heap profiles
Fixes #10659. Change-Id: I22dc306ce6f398dd40010ac430928a718d67d466 Reviewed-on: https://go-review.googlesource.com/9623 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
6f7b4e8938
commit
19354b9dc8
1 changed files with 2 additions and 1 deletions
|
|
@ -554,9 +554,10 @@ func parseHeap(b []byte) (p *Profile, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if l = strings.TrimSpace(l); l == "" {
|
||||
if isSpaceOrComment(l) {
|
||||
continue
|
||||
}
|
||||
l = strings.TrimSpace(l)
|
||||
|
||||
if sectionTrigger(l) != unrecognizedSection {
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue