Skip to content

Process Annotation #1

@eshrubs

Description

@eshrubs

A useful feature for doing diffs between profile runs with Chrome is process annotations. Since Chrome is multiprocess comparing profile runs is tricky. If process ids are not included, then all chrome.exe processes get merged into one stack frame by pprof (since they have the same name). If the pid is included, then diffing is impossible since the stack frames have different names.

I suggest an approach for annotating process frames based on their pid.

For example a flag

--tag-pid=<pid>:<tag> would tag process with pid pid, such that the function name of the frame in pprof would be like <process-name> (<tag>).

An example with Chrome could be --tag-pid=1234:GPU, resulting in process 1234 being chrome.exe (GPU) in pprof.

Some considerations,

  1. This should at least send a warning if a tag was not consumed. This means the user specified a pid that was not present in the trace.
  2. This should perhaps be exclusive from the --includeProcessAndThreadIds flag, and should exit if both flags are present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions