[m-users.] Grade for profiling

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Mar 21 20:35:53 AEDT 2023


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.

Zoltan.


More information about the users mailing list