Next: Deep profiling grade options, Up: Profiling grade options [Contents][Index]
-p
(grade modifier: ‘.prof’)--profiling
Prepare the generated code for time profiling by Mercury’s version of
the standard Unix profiler gprof
, which is a tool called
mprof
. In ‘.prof’ grades, the compiler will insert
profiling hooks into the generated code (e.g. to count calls), and will
also output the static call graph of the module to
module.prof for use by mprof
. Please see the
Building profiled applications in the Mercury User’s Guide for
details.
This option is supported only when targeting C.
--memory-profiling
(grade modifier: ‘.memprof’)Prepare the generated code for profiling of memory usage and retention by mprof. Please see the Using mprof for profiling memory retention in the Mercury User’s Guide for details.
This option is supported only when targeting C.