[m-rev.] diff: add library routines for controlling profiling

Ian MacLarty maclarty at csse.unimelb.edu.au
Wed Sep 27 17:24:08 AEST 2006


On Wed, Sep 27, 2006 at 08:19:41AM +0200, Peter Ross wrote:
> Hi,
> 
> 
> ===================================================================
> 
> 
> Estimated hours taken: 1
> Branches: main
> 
> library/benchmarking.m:
> 	Programmatically turn profiling on and off.
> 
> 
> Index: library/benchmarking.m
> ===================================================================
...
> +
> +:- pragma foreign_decl(c, local, "
> +#include ""mercury_prof.h""
> +#include ""mercury_heap_profile.h""
> +").
> +
> +:- pragma foreign_proc(c, turn_off_call_profiling,
> +        [will_not_call_mercury, thread_safe, tabled_for_io], "

tabled_for_io doesn't have any effect if there are no io state arguments
(even if the proc is impure).  I'm not sure you want to table these
anyway, since I wouldn't imagine anyone would want to debug and profile
their program at the same time.

Ian.
--------------------------------------------------------------------------
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