Closed
Bug 1189490
Opened 10 years ago
Closed 10 years ago
[jsdbg2] The allocation and tenure promotions logs shouldn't use linked lists
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 8 obsolete files)
5.45 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
8.67 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
24.96 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
4.71 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
In broad strokes, here's the plan:
* Whip up an amortized O(1) FIFO queue backed by two vectors
* Make a DynamicTraceable version for gc/traceable things
* Use that instead of mozilla::LinkedList for the allocation and tenure promotion logs
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8641279 -
Flags: review?(terrence)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8641280 -
Flags: review?(terrence)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8641280 -
Attachment is obsolete: true
Attachment #8641280 -
Flags: review?(terrence)
Attachment #8641425 -
Flags: review?(terrence)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8641426 -
Flags: review?(terrence)
Assignee | ||
Comment 5•10 years ago
|
||
This version of part 1 uses StaticTraceable instead of DynamicTraceable as we discussed on IRC.
I just ran some benchmarks (esprima JS parser parsing its own source while we use the Debugger API to sample allocations with P=.05) and didn't see any perf benefit that looks statistically significant. The benchmarks are fairly noisy with a pretty high stddev.
Without this patch series:
> [Stats total: 24.91024096679684s, mean: 0.04982048193359368s, stddev: 16%]
With this patch:
> [Stats total: 24.31464379882813s, mean: 0.04862928759765626s, stddev: 16%]
Pretty sure the stack capturing is way more expensive than the cache-unfriendly pointer following of the linked list traversal, but either way this actually simplifies the code quite nicely. Maybe it would show up if I was actually draining the logs in the benchmark...
(There's still some room to consolidate and abstract the common functionality of the logs in the future, but I will leave it for just that: the future.)
Comment 6•10 years ago
|
||
Comment on attachment 8641279 [details] [diff] [review]
Part 0: Add a FIFO queue container type to js/public
Review of attachment 8641279 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
Attachment #8641279 -
Flags: review?(terrence) → review+
Updated•10 years ago
|
Attachment #8641425 -
Flags: review?(terrence) → review+
Comment 7•10 years ago
|
||
Comment on attachment 8641426 [details] [diff] [review]
Part 2: Stop using mozilla::LinkedList for the allocations and tenure promotions logs and use js::TraceableFifo instead
Review of attachment 8641426 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
::: js/src/vm/Debugger.cpp
@@ +1744,5 @@
> + auto className = obj->getClass()->name;
> + auto size = JS::ubi::Node(obj.get()).size(cx->runtime()->debuggerMallocSizeOf);
> +
> + if (!allocationsLog.emplaceBack(wrappedFrame, when, className, ctorName, size))
> + {
{ on the same line as the if ().
Attachment #8641426 -
Flags: review?(terrence) → review+
Backed out for bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=12371671&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/91cb27a1be1e
Flags: needinfo?(nfitzgerald)
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8641279 -
Attachment is obsolete: true
Attachment #8645256 -
Flags: review+
Assignee | ||
Comment 11•10 years ago
|
||
Attachment #8641425 -
Attachment is obsolete: true
Attachment #8645257 -
Flags: review+
Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8641426 -
Attachment is obsolete: true
Attachment #8645258 -
Flags: review+
Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8645259 -
Flags: review+
Assignee | ||
Comment 14•10 years ago
|
||
Flags: needinfo?(nfitzgerald)
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/af32792fe260 for linux32 debug jit2 failures like https://treeherder.mozilla.org/logviewer.html#?job_id=12671345&repo=mozilla-inbound
Assignee | ||
Comment 17•10 years ago
|
||
Attachment #8645256 -
Attachment is obsolete: true
Attachment #8645917 -
Flags: review+
Assignee | ||
Comment 18•10 years ago
|
||
Attachment #8645257 -
Attachment is obsolete: true
Attachment #8645918 -
Flags: review+
Assignee | ||
Comment 19•10 years ago
|
||
Attachment #8645258 -
Attachment is obsolete: true
Attachment #8645919 -
Flags: review+
Assignee | ||
Comment 20•10 years ago
|
||
Attachment #8645259 -
Attachment is obsolete: true
Attachment #8645920 -
Flags: review+
Assignee | ||
Comment 21•10 years ago
|
||
Rebased and got a green try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c4776797e693
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 22•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad0477fe507c
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0dddf4ef555
https://hg.mozilla.org/integration/mozilla-inbound/rev/069907acacef
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a68d5a3fdb6
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ad0477fe507c
https://hg.mozilla.org/mozilla-central/rev/b0dddf4ef555
https://hg.mozilla.org/mozilla-central/rev/069907acacef
https://hg.mozilla.org/mozilla-central/rev/5a68d5a3fdb6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•