[m-rev.] for post-commit review: Coverage Profiling completed.
Zoltan Somogyi
zs at csse.unimelb.edu.au
Fri Sep 26 18:45:39 AEST 2008
On 25-Sep-2008, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> The code
> in the profiler and in the compiler both now traverse a procedure in the same
> way.
Actually, they don't. In program_representation_utils, you divide the work
between get_coverage_information and goal_annotate_coverage. I think the work
done by get_coverage_information should be moved into goal_annotate_coverage,
so that for each goal type, you can see IN ONE PLACE exactly what you do.
(Code duplication can be avoided by calling some of the same primitive
predicates for more than one goal type). Without that, you cannot match up
the code of goal_annotate_coverage with the code of the second pass in
deep_profiling.m.
The code that you should move should also be restructured. It uses
if-then-elses instead of switches, but complete switches are the only reliable
way to make sure you have covered every case. Using switches and thinking each
case though should have have told you that (a) for builtin_call_reps,
the search of the call sites map will never succeed; (b) for
pragma_foreign_code_reps, the search can succeed only with callback call sites,
which you don't want.
Change the coverage annotation code along these lines, and then I will have
a look at it again.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list