Page MenuHomePhabricator

[profile] Remove useless msync when dumping gcda files
ClosedPublic

Authored by calixte on Jun 3 2020, 1:08 AM.

Details

Summary

According the mmap man page (https://man7.org/linux/man-pages/man2/mmap.2.html) is only required to precisely control updates, so we can safely remove it.
Since gcda files are dumped just before to call exec** functions, dump need to be fast.
On my computer, Firefox built with --coverage needs ~1min40 to display something and in removing msync it needs ~8s.
The slowdown is probably because the directory where data are dumped is on a spinning disk.

Diff Detail

Event Timeline

calixte created this revision.Jun 3 2020, 1:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2020, 1:08 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
calixte edited the summary of this revision. (Show Details)Jun 3 2020, 9:49 AM

I have the same understanding as @calixte when reading the manpage: munmap forces the write and calling msync right before is redundant.

That being said, I would not expect such a speedup...

No more feedback, let's take the manpage as the tablets of the law here .

This revision is now accepted and ready to land.Oct 14 2020, 7:27 AM
marco-c accepted this revision.Oct 14 2020, 7:42 AM
This revision was landed with ongoing or failed builds.Oct 14 2020, 8:07 AM
This revision was automatically updated to reflect the committed changes.