Next: Optional feature grade options, Previous: Debugging grade options, Up: 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.
--deep-profiling
(grade modifier: ‘.profdeep’)Prepare the generated code for deep profiling. The Mercury deep
profiling tool mdprof
(note the “d” in the name) associates
much more context with each measurement than mprof
, making it
much more suitable for handling polymorphic code and higher order code,
both of which are much more common in typical Mercury code than in
typical C code. This option is supported only when targeting C with
‘--no-high-level-code’.
--no-coverage-profiling
Do not gather deep profiling information that is useful only for coverage profiling.
--profile-for-feedback
--profile-for-implicit-parallelism
Select deep profiling options that are suitable for profiler directed implicit parallelism. ‘--profile-for-implicit-parallelism’ is a deprecated synonym for this option.
--threadscope
(grade modifier: ‘.threadscope’)Enable support for profiling parallel execution. using Threadscope. This option is supported only when targeting C in parallel grades with ‘--no-high-level-code’, and only on some processors. See README.ThreadScope and Using threadscope for details.
Next: Optional feature grade options, Previous: Debugging grade options, Up: Grade options [Contents][Index]