Re: [m-users.] Grade for profiling

Julien Fischer <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Hi Zoltan,

On Tue, 21 Mar 2023, Zoltan Somogyi wrote:

> 2023-03-21 20:53 GMT+11:00 "Volker Wysk" <[email protected]>:

>> 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.
_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.