Skip to content

Drop Code objects in AOT (PRODUCT && dwarf_stack_traces) #44852

@alexmarkov

Description

@alexmarkov

In AOT mode, when vm_service/profiler is not present (PRODUCT/flutter-release build) and --dwarf-stack-traces is used, there is a little need for Code objects. Currently, Code objects occupy significant portion of heap size of objects in the snapshot, so removing them would decrease memory usage and would also reduce AOT snapshot size.

In order to remove most Code objects we need:

  • Provide an alternative lookup mechanism to access CompressedStackMaps corresponding to a given PC.
  • Remove uses of Code from stack traces in --dwarf-stack-traces mode.
  • Remove most uses of ReversePc::Lookup.

For now, we can keep Code objects for exception handling as there is only a small number of codes with exception handlers.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.vm-aot-code-sizeRelated to improvements in AOT code sizevm-aot-memory-footprintRelated to improvements of VM memory footprint for AOT deployments

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions