[m-users.] Profiling

Matthias Guedemann matthias.guedemann at googlemail.com
Tue Apr 21 03:50:03 AEST 2015


> the lists?  (2) Can anyone provide a few simple templates for (a)
> compiling for profiling, and (b) executing with profiling.

For your program, use for example:

,----
| mmc --rebuild --make --profiling test_prime
`----

and then use 

,----
| mprof |less
`----

but you need a profiling grade for this. IIRC you mentioned that you
used `--disable-most-grades`, if so, you need to configure and compile
for profiling. You might also want to have a look at deep profiling with
`mdprof`.

Best would be to read the section in the user's guide:

http://www.mercurylang.org/information/doc-latest/mercury_user_guide/Profiling.html#Profiling

Best regards,
Matthias



More information about the users mailing list