[m-users.] Grade for profiling

Volker Wysk post at volker-wysk.de
Tue Mar 21 20:53:47 AEDT 2023


Am Dienstag, dem 21.03.2023 um 20:35 +1100 schrieb Zoltan Somogyi:
> 2023-03-21 20:31 GMT+11:00 "Volker Wysk" <post at volker-wysk.de>:
> > > That makes sense. The Prof.Decl file would be written when the program
> > > starts up, and the Prof.Counts file is probably overwritten by each
> > > process when it shuts down. Obviously, you may not get usable profiling
> > > information then.
> > 
> > But I *have* got usable profiling information. At least it seems to me.
> > (It's the first time I'm using a profiler.) This way I've found a
> > performance bug, btw.
> > 
> > The processes I create with fork/exec, and the one forking, are all the same
> > program. It's a command line option, which tells each child process what to
> > do. Maybe that's the reason why I get usable profiling data.
> 
> Peter did not say you *definitely* wouldn't get usable data; he said
> you *may* not get usable data. If Peter's overwriting theory is true
> (I have not checked), then you get the profiling data from the last
> process of your program to exit. This process *may* contain
> a bottleneck that profiling can reveal, but  bottlenecks may exist
> in the earlier-exiting processes as well.

Anyhow, including the process id in the Prof.* file's names sounds like a
good idea.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20230321/0e57b41d/attachment.sig>


More information about the users mailing list