[m-users.] Grade for profiling
Julien Fischer
jfischer at opturion.com
Tue Mar 21 22:06:01 AEDT 2023
Hi Zoltan,
On Tue, 21 Mar 2023, Zoltan Somogyi wrote:
> 2023-03-21 20:53 GMT+11:00 "Volker Wysk" <post at volker-wysk.de>:
>> Anyhow, including the process id in the Prof.* file's names sounds like a
>> good idea.
>
> Yes, it would be a good idea to do that *by default*. However, you also want
> a way to override this choice, for use when testing the generation of profile data.
I disagree, I think the default should be unchanged for the reason that
with it profiles can be viewed *without* having to specify extra options
to mprof.
The runtime can have two new options, something like:
--profile-suffix-name <name>
--profile-suffix-pid
which would use <name> or the process id respectively as a suffix on the
various Prof.* files. (Actually, the deep profiler has the same issue
with programs that fork, whatever solution we use with mprof should be
applied to it as well.)
For convenience, mprof should get a new option that allows the profile
suffix to be specified with one option rather than specifying -D, -C, -P
separately.
> We could use either MERCURY_OPTIONS, or a new, purpose-specific environment
> variable.
If we use MERCURY_OPTIONS, then programs like Volkers' could set the new
option at compile time via the --runtime-flags option.
Julien.
More information about the users
mailing list