saveCompilationTrace function

List<int> saveCompilationTrace ()

Returns runtime Dart compilation trace as a UTF-8 encoded memory buffer.

The buffer contains a list of symbols compiled by the Dart JIT at runtime up to the point when this function was called. This list can be saved to a text file and passed to tools such as flutter build or Dart gen_snapshot in order to pre-compile this code offline.

The list has one symbol per line of the following format: <namespace>,<class>,<symbol>\n.

Here are some examples:

dart:core,Duration,get:inMilliseconds
package:flutter/src/widgets/binding.dart,::,runApp
file:///.../my_app.dart,::,main

This function is only effective in debug and dynamic modes, and will throw in AOT mode.

Implementation

List<int> saveCompilationTrace() {
  final dynamic result = _saveCompilationTrace();
  if (result is Error)
    throw result;
  return result as List<int>;
}