Skip to content

runtime/pprof: Include build id in generated pprof profiles #62091

@brancz

Description

@brancz

Build IDs are used for all sorts of matching purposes for example in the debuginfod project, to associate debuginfo, executables and sources. It would be great if pprof profiles generated by the runtime included the build ID.

Looking at a pprof profile today:

$ gzip --decompress --to-stdout /Users/brancz/pprof/pprof.prometheus.samples.cpu.001.pb.gz | protoc -I/Users/brancz/src/github.com/google/pprof/proto profile.proto --decode perftools.profiles.Profile | grep -A6 "mapping {"
mapping {
  id: 1
  memory_start: 4194304
  memory_limit: 42422272
  filename: 5
  has_functions: true
}
mapping {
  id: 2
  memory_start: 140729988530176
  memory_limit: 140729988538368
  filename: 6
}
mapping {
  id: 3
  memory_start: 18446744073699065856
  memory_limit: 18446744073699069952
  filename: 7
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions