EmbarkStudios / puffin

🐦 Friendly little instrumentation profiler for Rust 🦀
Apache License 2.0
1.49k stars 75 forks source link

Wrong scope descriptions in puffin viewer when running profiled program multiple times #200

Open rasmusgo opened 7 months ago

rasmusgo commented 7 months ago

Describe the bug The scope ids may change between different runs of the same program depending on the order the scopes are encountered as the program runs. This results in misleading information in the viewer.

To Reproduce Steps to reproduce the behavior:

  1. Start puffin viewer
  2. Run program with random ordering of scopes
  3. Close the program but not the puffin viewer
  4. Run the same program again
  5. See that the scope descriptions are wrong

Expected behavior The scope descriptions should be correct even when running the program multiple times without restarting the viewer.

Screenshots If applicable, add screenshots to help explain your problem.

Device:

Additional context I think this problem is related to https://github.com/EmbarkStudios/puffin/pull/169