devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Initial implementation of `Tracing` tab

Open bkonyi opened this issue 3 years ago • 1 comments

This is an initial implementation of an allocation tracing tab for the memory screen. Current functionality includes:

  • Enabling / disabling tracing for individual classes
  • Refreshing tracing data
  • Bottom-up tree view of allocation locations for traced classes, with inclusive and exclusive counts similar to those found on CPU profiles
  • Expand / Collapse all support

Functionality that still needs to be implemented includes:

  • Multi-isolate support
  • Top-down tree view support
  • Class list search filtering
  • Improved table behavior when enabling / disabling tracing for classes. In particular, inserting a duplicate element into the list of classes when enabling tracing instead of moving the existing element to the top of the list.
  • Support for serialization/deserialization

Tracking issue: https://github.com/flutter/devtools/issues/4335

Tracing not enabled: image

Tracing enabled with a selected allocation profile: image

bkonyi avatar Aug 10 '22 14:08 bkonyi

I still need to write tests, but figured this is worth an initial review pass.

bkonyi avatar Aug 10 '22 14:08 bkonyi

can you move packages/devtools_app/test/test_data/allocation_trace.json to test_data/memory/allocation_tracing/?

Done.

bkonyi avatar Aug 15 '22 19:08 bkonyi