Closed
Bug 1171612
Opened 8 years ago
Closed 8 years ago
Use C++11 features to make Statistics module nicer
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: terrence, Assigned: terrence)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
13.19 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
This is mostly centered around MAX_MULTIPARENT_PHASES. First, the nicer |using name = type| syntax allows us to easily extract the const from the PhaseTimeTable, allowing us to use replace even the declarations. Then we always used MAX_MULTIPARENT_PHASES with +1, so I just moved that into the def. Then we were not being consistent with iterating with size_t vs. int, so I made these use auto + MakeRange so that we get the right type for free.
Attachment #8615484 -
Flags: review?(sphink)
Comment 1•8 years ago
|
||
Comment on attachment 8615484 [details] [diff] [review] stats_use_cpp11-v0.diff Review of attachment 8615484 [details] [diff] [review]: ----------------------------------------------------------------- So, the patch is good but I'm hung up on the naming. Bumping MAX_MULTIPARENT_PHASES by 1 invalidates the meaning. On the other hand, the previous meaning -- while accurate -- was not how it was being used, so your patch plus a new name would be much better. The weird thing is that index 0 is used for regular, single-parent phases. Or rather, the timings stored at index 0 correspond to the subset of the tree that never pass through a multi-parent phase. (The difference is that a multi-parent phase could have a single-parent child, and that child's timing would be stored at a nonzero index.) NUM_DAG_INDEXES would be accurate for the new MAX_MULTIPARENT_PHASES+1 value, but it's pretty cryptic. NUM_TIMING_ARRAYS, maybe?
Attachment #8615484 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 2•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=93203e3e4b9f
https://hg.mozilla.org/mozilla-central/rev/53d75ce7f7fd
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•