17f62d3f3a
Before, use of a function in the static calls table of a Code object would cause it to be retained. Now, like dispatch table use, we only retain such functions if there are other uses like dynamic function lookup that needs the function object or if the --retain-function-objects flag is enabled. In most modes, --retain-function-objects is enabled by default. It is only disabled by default in product mode when --dwarf-stack-traces is enabled, since otherwise the removed function objects may be needed for debugging platforms like the Observatory or when creating symbolic stack traces. Changes on flutter gallery in release mode: Default: arm7: isolate: +6.65%, total: +1.30% arm8: isolate: +6.67%, total: +1.28% (The increase is due to changing back to all function objects being retained as the default when using symbolic stack traces.) With --no-retain-function-objects: arm7: isolate: -9.95%, total: -1.73% arm8: isolate: -10.04%, total: -1.77% (This measures how much dropping static call function objects when possible affects the size compared to just dropping function objects for dispatch table entries when possible.) Bug: https://github.com/dart-lang/sdk/issues/41052 Change-Id: I3c834b14b0c58ccfdbaca3f154df536df29c13ef Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142146 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>