Skip to content

Commit 1a39e35

Browse files
liamappelbeCommit Queue
authored andcommitted
[vm] Enable branch coverage by default
Currently if you want branch coverage you have to pass `--branch-coverage` to both the VM and the coverage collection tool. This has led to an issue in Flutter where the flag isn't being passed to the VM, so the branch coverage data is incomplete. It will also mean that if we add branch coverage support to `package:test`, the command will have to look like: `dart --branch-coverage test --branch-coverage ...` The overhead of the branch coverage instructions is minimal, since `RecordCoverage` instructions are only inserted in JIT mode anyway. So it would be better to just enable this flag by default in the VM. Bug: #60958 Bug: flutter/flutter#171580 Change-Id: Ic6933024cc4aaa4c2476301d507e7a9ee70f7b1e TEST=CI Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/438640 Commit-Queue: Liam Appelbe <[email protected]> Reviewed-by: Siva Annamalai <[email protected]>
1 parent 49021a8 commit 1a39e35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/vm/flag_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ constexpr bool FLAG_support_il_printer = false;
249249
P(verify_entry_points, bool, true, \
250250
"Throw API error on invalid member access through native API. See " \
251251
"entry_point_pragma.md") \
252-
C(branch_coverage, false, false, bool, false, "Enable branch coverage") \
252+
C(branch_coverage, false, false, bool, true, "Enable branch coverage") \
253253
C(coverage, false, false, bool, true, "Enable coverage") \
254254
P(use_simulator, bool, true, "Use simulator if available")
255255

0 commit comments

Comments
 (0)