Skip to content

Refactor cpu_profile_model to prevent side effects #9353

@elliette

Description

@elliette

The functions called in generateFromCpuSamples must be called in that particular order. This is because of function side effects:

  1. Generating the stack frames both creates the timeline tree and assigns frame IDs to every node in the tree
  2. Creating the sample events expects that the tree has already been created, and that the frame IDs have been assigned to every node

Ideally we should refactor the code so that we aren't dependent on hidden side effects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3issues we think are valid but not importantscreen: cpu profilerIssues related to the CPU Profiler screen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions