Re: [m-users.] Grade for profiling

Volker Wysk <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Am Dienstag, dem 21.03.2023 um 22:06 +1100 schrieb Julien Fischer:
> 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

I'd add another option:

    --profile-dir <dir>

This would be the directory, which the profile data is stored in. Then the
current working directory wouldn't be cluttered. Especially if we get the
three files for every forked process.

> 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.

Or let the user specify (any) one of the three files. mprof would recognize
the file (by name) and load all three.

> > 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.


Bye,
Volker

_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmQZlEIACgkQ+K4ydFOs
HoXYCA//WjSH+oH2T487ezcmXxgsO/0hJR7kQ3axSxTNfqby5x+qX9/iSg/6nLmE
BkZjmCy56LdHuZw+qEXcxduQzu48rC469t1K1IggF+GAOmdD9/N11OetTqDvNgUA
Kf+3b3b2O6OqDfd8hO1uDHCAf+uLc5VgD1ORhSZ4fF41eG5GbHaRP1ahXncnGzgi
XYe3uTlZ+RKcvnypBoRbcPaJE9Kj8oT3FUYr4TEvOzBQEOZdsI4HN4/pR2NecHOm
WVImOMtcqyNek6dhCxqsX5a7KrVfesi0FByKdDaqit++lMWzKxkVT6dZuIL412Gn
sNKDjHVCfAsx0FipA7bJvJqxR/5r9UBB+1hL09L9GUZ+mJmcqa4t9F5l1Iju0+MM
YqiSvq6zpZOB7ZQR3WfctjH0nGJcr9ZEpVXjoy3et7tn+u272WeN9z0/ScAuwb40
o9+9ws0WC1x5gpzKy/6ZMN4mwuH6swWc+pK7fEr1YZ6s1TwBNuXSsLuhYTTufBvl
nulAG5nsE6+iLemvCvZFUeHYioxFbsrwg6K2LA87Zjh2eGqIbYGiMyxhtmkLwkRo
MrKzdHyyB+oKRqiaM7SVkSwPBRSYg4Upp5safGUTto5e9WHiJzu0zp66EnxF/aFb
F3pznLnn+dLJf+6pQt5iMKxQZBasCKrqwfugdymCGiv6O36EAGY=
=h02/
-----END PGP SIGNATURE-----
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.