-
Notifications
You must be signed in to change notification settings - Fork 6k
Document native functions for compilation trace #7256
Conversation
| /// 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 precompile this code offline. | ||
| /// | ||
| /// The list has one symbol per line of the following format: `<namespace>,<class>,<symbol>\n`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one symbol per line implies it's text, but this returns bytes. What's the character encoding? UTF-8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's text, and I presume it's UTF-8 since it's fetched from Dart VM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc updated.
lib/ui/natives.dart
Outdated
| } | ||
|
|
||
| // TODO(sbaranov): This function will go away in subsequent PR, once the framework has caught up. | ||
| List<int> dumpCompilationTrace() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can simplify this to List<int> dumpCompilationTrace() => saveCompilationTrace();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might as well mark it @Deprecated('Use saveCompilationTrace() instead.') too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
We might want to rename this Thanks so much for making the documentation detailed! LGTM. |
|
This native works fine in dynamic release mode, so renaming it to debugSaveCompilationTrace wouldn't make sense. However, the part in framework that fetches the results of calling this function over service protocol can certainly be renamed debugSaveCompilationTrace. |
…5594) * Switch over to the new name for compilation trace native function. Also see: flutter/engine#7256 * rename * roll the engine
Fixes #5443 (comment)