Closed
Bug 710712
Opened 13 years ago
Closed 13 years ago
Measure peak virtual memory usage of link.exe process during libxul PGO link
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox9 affected, firefox10 fixed, firefox11 fixed)
RESOLVED
FIXED
mozilla11
People
(Reporter: ted, Assigned: ted)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
8.15 KB,
patch
|
catlee
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
bug 709193 makes it very hard for us to do development. We should monitor the peak virtual memory usage of link.exe when we're linking libxul the final time so we have some sort of benchmark for how close we are to the danger zone, so we can at least make reasonable decisions about what we're doing.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ted.mielczarek
Assignee | ||
Comment 1•13 years ago
|
||
I have this mostly working, just testing it currently.
Assignee | ||
Comment 2•13 years ago
|
||
This seems to do the trick locally. I've pushed it to try just to make sure it doesn't screw anything up there, but I think this should do what we want. It currently prints the measurement to stdout, as well as writing it to $objdir/toolkit/library/linker-vsize.
https://tbpl.mozilla.org/?tree=Try&rev=a076385f7cb7
Assignee | ||
Updated•13 years ago
|
Attachment #581941 -
Flags: review?(catlee)
Comment 3•13 years ago
|
||
Comment on attachment 581941 [details] [diff] [review]
Measure peak virtual memory usage of link.exe, print and output to a file
Review of attachment 581941 [details] [diff] [review]:
-----------------------------------------------------------------
looks good!
Attachment #581941 -
Flags: review?(catlee) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Status: NEW → ASSIGNED
Should we make the build automatically go orange if the linker memory usage goes over some danger threshold? Seems like that would be helpful to warn us if we're about to hit the wall.
Comment 6•13 years ago
|
||
> Should we make the build automatically go orange
See bug 710840 comment 1 :-)
Comment 7•13 years ago
|
||
On the last pgo build on inbound currently (7a0d03046d42):
linker max virtual size: 2266345472
That seems reaaaally low. It would be good to try on one of the changesets that was failing to link.
Assignee | ||
Comment 8•13 years ago
|
||
On the changeset I pushed to try (which was about a month out of date), it was ~2.83GB. We can certainly push this to try on top of some of the failing changesets to get data points, but I'm fairly confident in the measurement here. It matched Process Explorer's number exactly (which makes sense because it's calling the exact same API).
Comment 9•13 years ago
|
||
Which suggests we have managed to reduce the memory usage by more than 700MB, that's an order of magnitude more than what Kyle has seen.
Comment 10•13 years ago
|
||
I'm tempted to say this would be interesting to land on beta and aurora.
Assignee | ||
Comment 11•13 years ago
|
||
On 718a7411a72b, it measured at 2265296896, which is exactly 1MB more, which seems like pretty decent consistency.
Assignee | ||
Comment 12•13 years ago
|
||
Comment on attachment 581941 [details] [diff] [review]
Measure peak virtual memory usage of link.exe, print and output to a file
This is a build-system-only change that simply adds reporting to the amount of virtual memory used by the linker during our PGO builds. Since exhausting the virtual address space has disastrous consequences, this should give us fair warning if we're about to destroy our ability to ship Firefox.
Attachment #581941 -
Flags: approval-mozilla-beta?
Attachment #581941 -
Flags: approval-mozilla-aurora?
(In reply to Mike Hommey [:glandium] from comment #9)
> Which suggests we have managed to reduce the memory usage by more than
> 700MB, that's an order of magnitude more than what Kyle has seen.
I would find it incredibly hard to believe that we've reduced linker memory usage by 700 MB.
Comment 14•13 years ago
|
||
Another data point that would be interesting to have (but not necessary tracked, Try is probably enough) is the value for non-PGO builds.
Comment 15•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Assignee | ||
Comment 16•13 years ago
|
||
Turns out that gavin broke PGO builds in an insidious way in bug 696436 (bug 711478), so I can't give you the non-PGO number, but I can tell you that those numbers above are "PGO without any profiling data", which is why they're much lower than expected. A non-broken inbound run measured at 3027816448, which is 2.82GB, which sounds a lot more reasonable.
(If you wanted to test this on non-PGO runs, you could just drop the ifdefs around the Makefile hunk in this patch.)
Comment 17•13 years ago
|
||
Comment on attachment 581941 [details] [diff] [review]
Measure peak virtual memory usage of link.exe, print and output to a file
[Triage Comment]
Approved for Aurora and Beta.
Attachment #581941 -
Flags: approval-mozilla-beta?
Attachment #581941 -
Flags: approval-mozilla-beta+
Attachment #581941 -
Flags: approval-mozilla-aurora?
Attachment #581941 -
Flags: approval-mozilla-aurora+
Comment 18•13 years ago
|
||
Comment 19•13 years ago
|
||
Marking qa- as I don't think this is something QA needs to verify. Please mark qa+ if this is not the case.
Whiteboard: [qa-]
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•