Skip to content

Add support for inspecting objects in an isolate's object store - #4513

Merged
bkonyi merged 11 commits into
flutter:masterfrom
bkonyi:object_store
Sep 27, 2022
Merged

bkonyi merged 11 commits into
flutter:masterfrom
bkonyi:object_store

Conversation

@bkonyi

@bkonyi bkonyi commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

The object store is used to provide easy and cheap access to important VM objects within the VM. Examples of objects stored in the object store include:

  • Code stubs (e.g., allocation paths, async/await machinery)
  • References to core classes (e.g., Null, Object, Never)
  • Common type arguments (e.g., <String, dynamic>)
  • References to frequently accessed fields / functions (e.g., _objectEquals(), _Enum._name)
  • Cached, per-isolate data (e.g., library URI mappings)

The object store is considered one of the GC roots by the VM's garbage collector, meaning that objects in the store will be considered live, even if they're not referenced anywhere else in the program.

The Object Store tab under the Objects VM tooling tab allows for users to inspect elements contained within the object store, where they may not necessarily be reachable from the program explorer. Tapping a link to an object store entry will display the entry in the object viewport and, if present in the program explorer, mark the relevant VMServiceObjectNodes as selected.

image

The object store is used to provide easy and cheap access to important
VM objects within the VM. Examples of objects stored in the object store
include:

  - Code stubs (e.g., allocation paths, async/await machinery)
  - References to core classes (e.g., `Null`, `Object`, `Never`)
  - Common type arguments (e.g., `<String, dynamic>`)
  - References to frequently accessed fields / functions (e.g.,
    `_objectEquals()`, `_Enum._name`)
  - Cached, per-isolate data (e.g., library URI mappings)

The object store is considered one of the GC roots by the VM's garbage
collector, meaning that objects in the store will be considered live, even
if they're not referenced anywhere else in the program.
@bkonyi
bkonyi requested review from kenzieschmoll and removed request for kenzieschmoll September 22, 2022 18:24
@bkonyi
bkonyi marked this pull request as draft September 22, 2022 18:24
@bkonyi
bkonyi marked this pull request as ready for review September 23, 2022 15:16
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_inspector_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_inspector_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_inspector_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_inspector_view.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_store.dart Outdated
Comment thread packages/devtools_app/lib/src/screens/vm_developer/object_store_controller.dart Outdated
Comment thread packages/devtools_app/lib/src/shared/common_widgets.dart
@bkonyi
bkonyi merged commit dd91e2b into flutter:master Sep 27, 2022
@bkonyi
bkonyi deleted the object_store branch September 27, 2022 14:17
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