[m-rev.] Re: For post-commit review: Improve the performance of coverage propagation.

Paul Bone pbone at csse.unimelb.edu.au
Mon Aug 30 11:10:09 AEST 2010


On Mon, Aug 30, 2010 at 11:03:54AM +1000, Paul Bone wrote:
> 
> For post-commit review.
>

I forgot to describe the changes to create_report.m in the original ChangeLog.
Here is the correct ChangeLog, since I haven't committed yet the new ChangeLog
will be used for the commit.

---

Improve the performance of coverage propagation.

Modify coverage propagation code so that it uses less memory.  This makes the
recursion frequency query roughly 8% faster.

Avoid generating call site summary reports for every call site in a procedure
when doing coverage propagation.  Coverage propagation only needs the number of
calls and exits, generating the other data was overkill and expensive.  This
makes the recursion frequency query roughly 46 times faster.  It now finishes
in roughly 50 rather than 36 minutes.  This was tested once the above change
had already been made.  It's possible that the above change had more of an
impact than was measured.

These speed improvements where measured using a profile for the Mercury
compiler's execution.

deep_profiler/coverage.m:
    Create special constructor symbols in our data types for cases where
    execution counts are zero because the code is never executed.  This is
    relatively common.  This uses less memory and causes fewer dereferences
    during execution.

    Change the type of the call sites map passed to the coverage propagation
    code.  It now uses values of the type own_prof_info rather than
    call_site_perf.  The own_prof_info structures are already available in the
    deep data-structure where as the call_site_perf structures must be
    generated manually.

deep_profiler/create_report.m:
    Conform to changes in coverage.m.
    
    In particular build a call site map mapping goal paths to own_prof_info
    values rather than call_site_perf values.  This is where the second
    performance improvement has been made.

deep_profiler/display_report.m:
    Conform to changes in coverage.m.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20100830/c332608f/attachment.sig>


More information about the reviews mailing list