Closed
Bug 1376614
Opened 7 years ago
Closed 7 years ago
Pass budget to forgetSkippable and return early when budget has been used
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
13.41 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
13.55 KB,
patch
|
Details | Diff | Splinter Review |
In some cases forgetSkippables are too slow. I think we could make it more incremental.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 1•7 years ago
|
||
This seems to trigger the overbudget every now and then when running speedometer remote: Follow the progress of your build on Treeherder: remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8a8ed0c53a14c8c530d4b66eeaebd12237ab8673
Assignee | ||
Comment 2•7 years ago
|
||
I think I want always some budget. remote: View your change here: remote: https://hg.mozilla.org/try/rev/4647333853181099895b35d7b99f79cda3ae0a97 remote: remote: Follow the progress of your build on Treeherder: remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4647333853181099895b35d7b99f79cda3ae0a97
Attachment #8881756 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8881776 -
Flags: review?(continuation)
Comment 3•7 years ago
|
||
Comment on attachment 8881776 [details] [diff] [review] v2 Review of attachment 8881776 [details] [diff] [review]: ----------------------------------------------------------------- r=me with these fixes ::: xpcom/base/nsCycleCollector.cpp @@ +1073,5 @@ > auto iterFromLastEntry = mEntries.IterFromLast(); > for (; !iter.Done(); iter.Next()) { > nsPurpleBufferEntry& e = iter.Get(); > if (e.mObject) { > + if (!aVisitor.Visit(*this, &e)) { It is a little ugly to require these checks here, but the alternative would be to always check a budget in here, and then pass in unlimitedBudget for the other cases, which isn't great either. So I guess this is okay. @@ +2780,5 @@ > + if (mBudget.isOverBudget()) { > + return false; > + } > + > + mBudget.step(); Should this be stepped by a larger value? With 1, we only actually check the time every 1000 things in the purple buffer. @@ +2804,4 @@ > } > > private: > + js::SliceBudget mBudget; This should be a reference. There's state in the SliceBudget that gets modified when we check the budget.
Attachment #8881776 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 4•7 years ago
|
||
We could pass budget as value or reference, doesn't really matter in the current setup.
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3) > ::: xpcom/base/nsCycleCollector.cpp > @@ +1073,5 @@ > > auto iterFromLastEntry = mEntries.IterFromLast(); > > for (; !iter.Done(); iter.Next()) { > > nsPurpleBufferEntry& e = iter.Get(); > > if (e.mObject) { > > + if (!aVisitor.Visit(*this, &e)) { > > It is a little ugly to require these checks here, but the alternative would > be to always check a budget in here, and then pass in unlimitedBudget for > the other cases, which isn't great either. So I guess this is okay. Yeah. I just took the simplest approach > @@ +2780,5 @@ > > + if (mBudget.isOverBudget()) { > > + return false; > > + } > > + > > + mBudget.step(); > > Should this be stepped by a larger value? With 1, we only actually check the > time every 1000 things in the purple buffer. Well that is what MarkRoots does. Though that is too high. Perhaps I could try 5.
Assignee | ||
Comment 6•7 years ago
|
||
I can check how many other entries were removed from purple buffer (because of CanSkip) and pass also that number to step
Assignee | ||
Comment 7•7 years ago
|
||
Er, no I can't. I don't have that information. I guess I'll just use random number 5
Assignee | ||
Comment 8•7 years ago
|
||
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/648731530278 Pass budget to forgetSkippable and return early when budget has been used, r=mccr8
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/648731530278
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•