Skip to content

Add GC statistics to the allocation profile in VM developer mode - #5074

Merged
bkonyi merged 7 commits into
flutter:masterfrom
bkonyi:gc_stats
Jan 26, 2023
Merged

bkonyi merged 7 commits into
flutter:masterfrom
bkonyi:gc_stats

Conversation

@bkonyi

@bkonyi bkonyi commented Jan 19, 2023

Copy link
Copy Markdown
Contributor

This change surfaces some details about GC performance, including:

  • Heap space usage
  • Heap space capacity
  • # of collections
  • Average collection latency (i.e., time taken to perform a GC)

Screenshot:
image

RELEASE_NOTE_EXCEPTION=VM developer functionality

This change surfaces some details about GC performance, including:
  - Heap space usage
  - Heap space capacity
  - # of collections
  - Average collection latency (i.e., time taken to perform a GC)
@bkonyi
bkonyi requested a review from kenzieschmoll January 19, 2023 21:14
@bkonyi
bkonyi requested review from a team and polina-c as code owners January 19, 2023 21:14
Comment thread packages/devtools_app/lib/src/screens/memory/panes/profile/profile_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/memory/panes/profile/profile_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/memory/panes/profile/profile_view.dart Outdated
if (stats.averageCollectionTime.isNaN) {
return 0;
}
return getGCStats(dataObject).averageCollectionTime * 1000;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use the msText helper here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use msText below.

children: [
SizedBox(
// _GCStatsTable is a table with two header rows (column groups
// and columns) and one data row. We add a slight padding to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use a Padding widget to add this padding so that it is more clear what the padding value is?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe padding is the wrong word here, but that doesn't accomplish what this extra 1 pixel does. The child of SizedBox needs an extra pixel of space to disable the scrolling behavior of the underlying table. Padding will just add the extra pixel around the child widget without disabling the scroll behavior.

Comment thread packages/devtools_app/lib/src/shared/table/table.dart Outdated
@bkonyi
bkonyi merged commit 35b8a4c into flutter:master Jan 26, 2023
@bkonyi
bkonyi deleted the gc_stats branch January 26, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants