DevTools 0.9.3 Release

467 views
Skip to first unread message

Terry Lucas

unread,
Sep 30, 2020, 5:26:46 PM9/30/20
to Flutter Public Announcements (flutter-announce)

DevTools 0.9.3 Release Notes

Dart DevTools - A Suite of Performance Tools for Dart and Flutter

Network Profiler Updates

  • Show HTTP and HTTPs response bodies in the request inspector (requires Dart 2.10 / Flutter 1.22 or later)


  • Added search and filter capabilities:

Memory Updates

Allocation Monitoring


This mechanism can help you find memory leaks by tracking memory allocations within a defined period of time.


Click the Monitor button - monitors the total number of instances and bytes allocated for a class. When pressed, a "monitor allocation" event is added to the Event Timeline at the top of the memory page. Two accumulators are maintained for instances and bytes allocated. The accumulator delta values can be reset to zero by user action (pressing the Reset button). 


Click the Reset button - resets the accumulator delta values for all classes to zero. When pressed, a "monitor reset" event is added to the Event Timeline at the top of the memory page.


Monitor Allocation Table


Column

Description

Class

Active classes in the heap.

Instances

Total number of instances  for a  class.

Delta

Accumulated count of all instances allocated for a class since the"Reset Accumulators" button was pressed.

Bytes

Total bytes consumed for all instances of a class in the heap.

Delta

Accumulated count of all bytes allocated for a class since the"Reset Accumulators" button was pressed.


Event Timeline


The above chart displays DevTools events (such as manual GC, VM GC, Snapshots, Monitor Allocations and Reset Accumulators button clicks) in relation to the memory chart timeline. Hovering over the markers in the Event timeline displays the time when the event occurred. This helps identify when a memory leak might have occurred in the timeline (x-axis).


Symbol

Description

User  initiated snapshot 

All memory information collected and an analysis performed.

Auto-Snapshot    

DevTools initiated a snapshot detecting that memory grows by 40% or more from previous size. This is used to detect memory spikes in your Flutter application (same information collected as in a manual snapshot).

Monitor Allocations  

Collects current state of all active classes, number of instances and byte size of all instances. In addition, the deltas are the change in the accumulators since the last "Reset Accumulators" button pressed.

Reset Accumulators 

When both the instance and bytes accumulators were reset to zero.

User Initiated GC 

User manually requests the VM to perform a garbage collection of memory (only a suggestion to the VM).

VM GC 

GC (garbage collection) has occurred. For more information on how Dart performs garbage collection.



Legend


Clicking on the Legend button toggles the legend display of all the areas, line charts and symbols for all visible charts and event pane.


Snapshots

  • Added support for collecting multiple snapshots

  • Added memory velocity to auto-snapshot.  Automatic snapshots will be scheduled when DevTools notices a spike, growth of > 40%, in amount of memory used

  • Fixed possible crasher when isolate is sentineled after a hot restart

Case Studies

Memory leak study using large network images was added with step-by-step instructions on using DevTools’ Memory profiler, detecting the problem and fixing the problem.


Other Fixes

  • Added ability to review collected memory statistics if application is disconnected or crash (e.g., review charts, snapshots, and any analyses).

  • Fixed pause / resume behavior. Clicking Pause pauses the live chart updates, but continues to  record memory stats in the background. Clicking Resume resumes and updates the live charts with all statistics collected while paused #2382.

  • Support Flutter engine service extension to expose the raster cache stats #2371.

  • Fixed the collected ADB (Android memory statistics) data - KB values were not previously converted to total bytes #2371.

  • A Flutter application run with --start-paused will cause the main isolate to pause. The debugger detects the paused state and correctly enables the 'Resume' button. If Resume is pressed that isolate will resume. Unfortunately, other isolates created (after the main isolate is resumed) will subsequently be created in a pause start state (requiring subsequent isolates to be resumed). This PR will correctly resume any future created isolates in a pause state #2080.

Performance Updates

  • Added search functionality to the CPU profiler

Timeline Updates

  • Fix rendering issue for async instant events - #2342

App Size Tool Updates

  • Added code size attribution data to the diff tool. This allows you to visualize the attribution data (i.e. why a piece of code is present in your compiled application) as a dominator tree or call graph. View the app size tool documentation to learn more about this feature.

Changelog

More details about changes and fixes are available in our changelog.


Terry Lucas

unread,
Sep 30, 2020, 5:26:46 PM9/30/20
to Flutter Public Announcements (flutter-announce)
Reply all
Reply to author
Forward
0 new messages