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 19:19 +1100 schrieb Peter Wang: > On Tue, 21 Mar 2023 18:43:36 +1100 Julien Fischer <[email protected]> wrote: > > > > Hi Peter, > > > > On Tue, 21 Mar 2023, Peter Wang wrote: > > > > > On Tue, 21 Mar 2023 08:08:19 +0100 Volker Wysk <[email protected]> wrote: > > > > For the record (if someone stumbles into the same problem). With the help of > > > > Julien I was able to find the solution. > > > > > > > > A (Linux) kernel feature called "Address space layout randomization" (ASLR) > > > > must be turned off, before running the program which is to be profiled. This > > > > can be accomplished with this command: > > > > > > > > sudo bash -c "echo 0 > /proc/sys/kernel/randomize_va_space" > > > > > > > > Then you get the right names for most predicates. > > > > > > Did you merge profiling data from different runs? > > > Otherwise, if the Prof.* files are generated in the same run > > > then I don't see why ASLR should make a difference. > > > > Because there's more going on that just that. Volker's program forks > > off separate processes and I suspect the the Prof.* files end up being > > inconsistent -- ASLR just complicates matters because the addresses > > differ between each of them. > > 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. Cheers Volker _______________________________________________ users mailing list [email protected] https://lists.mercurylang.org/listinfo/users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmQZeXgACgkQ+K4ydFOs HoUs1hAAhuhYHgALjuiGG6+HgAvpzwxovyhm5rmLp9kekamQI9Sb6MAMwmTR6qwW EnBbhES/GTrWz3zHRYIA2hh1jTb0XPJS6anCZOO7mQ9cFJQei93FXNj2VCVreFr9 FjQDbXRIVPmKuAJVqOMdfRse/sbVY1H3wi+l32laW0iMSqRnFoIBYOySOCtDlrt5 BVy0KvP5Sq/lbcwI3rH2Z+0bQCjFBX6QzEpTGRS86KqHL1BNGyXrxhtv5ZcY0VKw iyG4shWKR2BdF0ALSEiPgQb9RuqdpWS+JgVWAvnlD7l32gx1F6aJZfY+uFriNyAW xaW/dRjqZC044KVyOLK0OWO+BkPZLkqzYjmd1lbMZywZ7mbcsG70NdxZ9N4SlF3a FxzT+76EhTfwP5eO9a4XVUzjXfTBNQ1KeH7ft52Um4xKnacNxBLADFFCys9Tn/y8 IuAEfi+dp5IqhsVVnzFe4j2cifepBeA0iFRBXJudXMzI6YjanwtLEoawKbGD9Drk iHOJIaM6zZfDlPNi1kW+S1sC79GT64pOKxZgCOIpylO/iOyjuM8BILOrfGGRC+oE EnkMoIp+GOIzlY+NwnHdO2gsLYi9mOb8NydwHje4zsj6TDsoPGScJjNjDoDs4+vF Wx4Jl9/aRtUpyo/2NSYAp6OS/Msvn+324QbosnFQtBs34xn1SjM= =msa8 -----END PGP SIGNATURE-----