mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 22:21:18 +00:00
1574e860c8
Could for instance be run like this: out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --candidates=cfe_compile_trace_candidates.txt out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --candidates=cfe_compile_trace_candidates_subsequent.txt out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart * The first command compiles and instruments "compile.dart" to record all procedure calls. * The second command runs the instrumented compiler on "compile.dart" (but it could have compiled anything). Because every procedure is instrumented this will take a lot longer than a usual run. This produces a trace "cfe_compile_trace.txt" with every call taking at least 1000 microseconds. This can be displayed via Chromes about://tracing tool. It also produces a file "cfe_compile_trace_candidates.txt" with a map of the procedures that on average took at least 500 microseconds. * The third command compiles and instruments "compile.dart", this time only instrumenting the procedures mentioned in the map "cfe_compile_trace_candidates.txt". * The forth command runs the instrumented compiler on "compile.dart". This run shouldn't take significantly longer than a non-instrumented run. It produces a new "cfe_compile_trace.txt" which this time is not filtered. It also produces a file "cfe_compile_trace_candidates_subsequent.txt" of recorded procedures that on average took at least 50 microseconds. * The fifth and sixth commands repeats the third and forth but instrumenting only the procedures mention in "cfe_compile_trace_candidates_subsequent.txt". The third iteration might not be needed, but if the first run was on a smaller input (which it isn't in this example) there might be some calls that on average took long enough to be included in the candidate list because the first call was slow and there were only very few of them, making the second trace very big because there are now a lot of - as it turns out - very quick calls recorded. Adding the third iteration will filter (at least some of) those out. Change-Id: I702c5c9142e525502b02f37744fcdc9d2b0f9b20 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296902 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com> |
||
---|---|---|
.. | ||
analyser_ignored | ||
class_hierarchy | ||
covariance_check | ||
enable_non_nullable | ||
extensions | ||
fasta | ||
id_testing | ||
id_tests | ||
language_versioning | ||
macros | ||
parts | ||
patching | ||
predicates | ||
src/base | ||
static_types | ||
text_representation | ||
tool | ||
utils | ||
ast_nodes_has_to_string_test.dart | ||
async_but_no_await_git_test.dart | ||
binary_md_dill_reader.dart | ||
binary_md_vm_tags_and_version_git_test.dart | ||
comments_on_certain_arguments_tool.dart | ||
compile_benchmark.dart | ||
compile_benchmark_helper.dart | ||
compile_dart2js_with_no_sdk_test.dart | ||
compile_with_no_sdk_test.dart | ||
constant_evaluator_benchmark.dart | ||
crashing_test_case_minimizer.dart | ||
crashing_test_case_minimizer_impl.dart | ||
dartdoc_test_test.dart | ||
dartdoctest_suite.dart | ||
dartdoctest_suite.status | ||
deps_git_test.dart | ||
desugar_test.dart | ||
dijkstras_sssp_algorithm.dart | ||
dill_round_trip_test.dart | ||
explicit_creation_git_test.dart | ||
expression_compilation_tools_test.dart | ||
ffi_test.dart | ||
flutter_gallery_leak_tester.dart | ||
generated_files_up_to_date_git_test.dart | ||
hot_reload_e2e_test.dart | ||
incremental_bulk_compiler_full.dart | ||
incremental_bulk_compiler_smoke_suite.dart | ||
incremental_compiler_leak_test.dart | ||
incremental_dart2js_load_from_dill_test.dart | ||
incremental_dart2js_test.dart | ||
incremental_dart2js_tester.dart | ||
incremental_flutter_tester.dart | ||
incremental_load_from_invalid_dill_test.dart | ||
incremental_suite.dart | ||
incremental_utils.dart | ||
issue_34856_test.dart | ||
kernel_generator_test.dart | ||
lint_suite.dart | ||
lint_test.status | ||
member_covariance_test.dart | ||
memory_file_system_test.dart | ||
messages_json_test.dart | ||
mixin_export_test.dart | ||
mock_file_system.dart | ||
multiple_simultaneous_compiles_test.dart | ||
outline_extractor_suite.dart | ||
outline_extractor_tester.dart | ||
packages_format_error_test.dart | ||
parser_all_suite.dart | ||
parser_equivalence_suite.dart | ||
parser_suite.dart | ||
parser_test_listener.dart | ||
parser_test_listener_creator.dart | ||
parser_test_parser.dart | ||
parser_test_parser_creator.dart | ||
precedence_info_test.dart | ||
read_dill_from_binary_md_git_test.dart | ||
relativize_test.dart | ||
scanner_fasta_test.dart | ||
scanner_replacement_test.dart | ||
scanner_test.dart | ||
scheme_based_file_system_test.dart | ||
severity_index_test.dart | ||
simple_stats.dart | ||
spell_checking_cleanup_lists.dart | ||
spell_checking_list_code.txt | ||
spell_checking_list_common.txt | ||
spell_checking_list_denylist.txt | ||
spell_checking_list_messages.txt | ||
spell_checking_list_tests.txt | ||
spell_checking_utils.dart | ||
spell_checking_utils_test.dart | ||
spelling_test.status | ||
spelling_test_base.dart | ||
spelling_test_external_targets.dart | ||
spelling_test_not_src_suite.dart | ||
spelling_test_src_suite.dart | ||
split_dill_test.dart | ||
standard_file_system_test.dart | ||
summary_generator_test.dart | ||
test_generator_test.dart | ||
test_utils.dart | ||
testing_utils.dart | ||
textual_outline_test.dart | ||
token_test.dart | ||
type_labeler_test.dart | ||
unit_test_suites.dart | ||
vm_service_coverage.dart | ||
vm_service_coverage_constant_evaluator.dart | ||
vm_service_for_leak_detection.dart | ||
vm_service_heap_finder.dart | ||
vm_service_heap_helper.dart | ||
vm_service_heap_helper_test.dart | ||
vm_service_helper.dart | ||
web_parser_git_test.dart | ||
web_parser_git_test_helper.dart | ||
weekly_tester.dart |