[m-rev.] review: add a profiling grade compile time switch for trace goals

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jun 29 13:43:33 AEST 2009


On Fri, 26 Jun 2009, Peter Ross wrote:

> This is useful for users who wish to turn off profiling and turn it back
> on when in the profiling grades conditionally and not pay any overhead.
>
>
> ===================================================================
>
>
> Estimated hours taken: 1
> Branches: main
>
> Allow a compile time condition on trace goals whether
> or not we are compiling in profiling grade.

I suggest:

 	Add a new compile-time primitive condition for trace goals that
 	is true if a program is compiled in a profiling .prof grade
 	and false otherwise.

> compiler/prog_data.m:
> compiler/mercury_to_mercury.m:
> compiler/simplify.m:
> 	Add trace_grade_profile and handle it.
>
> doc/reference_manual.texi:
> 	Document that the option exists.
>

...

> Index: doc/reference_manual.texi
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
> retrieving revision 1.431
> diff -u -r1.431 reference_manual.texi
> --- doc/reference_manual.texi	10 Mar 2009 05:00:32 -0000	1.431
> +++ doc/reference_manual.texi	26 Jun 2009 05:47:08 -0000
> @@ -9473,9 +9473,9 @@
> where @var{FlagName} is an arbitrary name picked by the programmer;
> this condition is true
> if the module is compiled with the option @samp{--trace-flag=@var{FlagName}}.
> -The second has the form @samp{grade(debug)};
> +The second has the form @samp{grade(debug)} or @samp{grade(profile)};
> this condition is true
> -if the module is compiled in a debugging grade.
> +if the module is compiled in a debugging or profiling (not deep profiling) grade.

Also, not memory profiling (.memprof) or did you intend that be covered
by the grade(profile) condition?

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