Closed Bug 1614875 Opened 5 years ago Closed 5 years ago

Tune some PHC knobs

Categories

(Core :: Memory Allocator, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox74 --- fixed
firefox75 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

PHC has a bunch of knobs that affect allocation and recycling rates. They're currently not set very well -- the allocation rate is too high, which leads to early slot saturation, and the recycling speed is too fast, which leads to incorrect stacks in crash reports.

Specifically, the number of page allocs in use, and the page alloc hit rate.

With the old constants the page alloc slots would fill up quickly and the hit
rate would quickly drop below 20%.

With the new constants the alloc slots don't fill up so quickly and the hit
rate remains at or near 100% for a lot longer. Also, page allocs are recycled
more slowly, which should decrease the likelihood of incorrect alloc/free stack
traces in reported crashes.

Depends on D62538

Assignee: nobody → n.nethercote
Attachment #9126019 - Attachment description: Bug 1614875 - Gather more stats in PHC. → Bug 1614875 - Gather more stats in PHC. r=glandium
Status: NEW → ASSIGNED
Attachment #9126020 - Attachment description: Bug 1614875 - Tweak constants to prevent saturation and improve the hit rate. → Bug 1614875 - Tweak constants to prevent saturation and improve the hit rate. r=glandium
Blocks: PHC
Pushed by nnethercote@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c41dc66209f6 Gather more stats in PHC. r=glandium https://hg.mozilla.org/integration/autoland/rev/81d380c3ec9e Tweak constants to prevent saturation and improve the hit rate. r=glandium

Comment on attachment 9126019 [details]
Bug 1614875 - Gather more stats in PHC. r=glandium

Beta/Release Uplift Approval Request

  • User impact if declined: These simple commits tweak PHC's parameters, which will hopefully make it more effective at detecting UAFs. They also include some simple stats-gathering that informed the parameter tweaking.

PHC is only enabled in early beta so if they don't get uplifted we will have to wait until the next release cycle to evaluate the new parameters.

  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just tweaks some existing parameters and adds a tiny bit of stats-gathering code, which isn't even used by default because you need to compile with PHC_LOGGING = 1 to see the stats, and we ship with PHC_LOGGING = 0.
  • String changes made/needed: None
Attachment #9126019 - Flags: approval-mozilla-beta?
Attachment #9126020 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

Comment on attachment 9126019 [details]
Bug 1614875 - Gather more stats in PHC. r=glandium

PHC improvements. Approved for 74.0b3 so we can get feedback sooner.

Attachment #9126019 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9126020 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: