Skip to content

cmd/pprof: Dots and slashes aren't allowed in profile names #13195

Closed
@rhysh

Description

@rhysh

The docs for runtime/pprof.NewProfile suggest a particular naming format for custom profiles.

The convention is to use a 'import/path.' prefix to create separate name spaces for each package.

The cmd/pprof tool does not load profiles named with that convention, giving the error "parsing profile: unrecognized profile format".

I'd expect go tool pprof to successfully load profiles made using the runtime/pprof package and its instructions. The regexp that's supposed to match custom profiles, \A(\w+) profile: total \d+\n\z, should match the format described in the runtime/pprof docs.

The full variety of import paths may be too much to support, but at the very least '.' and '/' should be allowed.

$ go version
go version devel +321a407 Fri Nov 6 15:16:28 2015 +0000 darwin/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions