Open
Description
Trying to add function and branch coverage to flutter (flutter/flutter#108313), but function coverage is unusably slow, due to the large number of source files that need to be scanned in flutter projects.
At the moment, function coverage works by just coarsening the regular coverage information based on the source position range of each function. This works, but it means that the coverage tool has to look up the ranges of every function, which is way too many RPCs.
A faster approach would be to add function coverage to the VM service API, like we did for branch coverage.