Closed Bug 745034 Opened 12 years ago Closed 12 years ago

Add page fault counts to GC statistics

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: billm, Assigned: billm)

References

Details

Attachments

(2 files)

Attached patch patchSplinter Review
This counts how many page faults happened during a GC and puts it in the JSON data. It counts both hard and soft faults, since Windows is apparently unable to separate them. Hopefully that will still be valuable though.

I also changed the formatting of text and JSON a little. For the text output, it changes this:
  Slice: 3, Time: 1300ms (Pause: 18ms, Reason: ...)
to this:
  Slice: 3, Pause: 18ms (When: 1300ms, Reason: ...)
This moves the number people care about to the front and is less confusing.

I also noticed that beginArray and beginObject use putQuoted and I think they should use putKey. The consequence of this is that the slices array in JSON was called "Slices" rather than "slices". This patch fixes the problem.
Attachment #614625 - Flags: review?(terrence)
Comment on attachment 614625 [details] [diff] [review]
patch

Review of attachment 614625 [details] [diff] [review]:
-----------------------------------------------------------------

I love it.
Attachment #614625 - Flags: review?(terrence) → review+
Apparently we need this psapi.lib thing in order to use GetProcessMemoryInfo, which tells us the number of page faults.
Attachment #621648 - Flags: review?(dmandelin)
Attachment #621648 - Flags: review?(dmandelin) → review+
https://hg.mozilla.org/mozilla-central/rev/77a87e7c6f50
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
FWIW, we have code for this on *nix in xpcom/base/nsMemoryReporterManager.cpp.  We can separate hard and soft faults there, which is nice.
(In reply to Justin Lebar [:jlebar] from comment #5)
> FWIW, we have code for this on *nix in
> xpcom/base/nsMemoryReporterManager.cpp.  We can separate hard and soft
> faults there, which is nice.

I couldn't figure out how to do this on Windows, so I just decided to combine them. Maybe later if it makes sense we can split them out on Mac and Linux.
> I couldn't figure out how to do this on Windows, so I just decided to combine them.

Yes, I don't think it's possible to split them out on Windows.  And I don't know how useful soft page faults are for detecting memory pressure.
This bug isn't about detecting memory pressure. It's for bug triage. If someone has really long GC times, I want to be able to see if it's because they're paging a lot.
Depends on: 759459
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: