Bug 1141614 - Part 4: Expose cycle collection markers in the devtools frontend; r=jsantell

This commit is contained in:
Nick Fitzgerald 2015-06-10 14:05:53 -07:00
Родитель 6e561802a9
Коммит 1bf42ce3a7
3 изменённых файлов: 34 добавлений и 1 удалений

Просмотреть файл

@ -107,7 +107,8 @@ a setTimeout.
## GarbageCollection
Emitted after a full GC has occurred (which will emit past incremental events).
Emitted after a full GC cycle has completed (which is after any number of
incremental slices).
* DOMString causeName - The reason for a GC event to occur. A full list of
GC reasons can be found [on MDN](https://developer.mozilla.org/en-US/docs/Tools/Debugger-API/Debugger.Memory#Debugger.Memory_Handler_Functions).
@ -115,6 +116,17 @@ Emitted after a full GC has occurred (which will emit past incremental events).
GC (smaller, quick GC events), and we have to walk the entire heap and
GC everything marked, then the reason listed here is why.
## nsCycleCollector::Collect
An `nsCycleCollector::Collect` marker is emitted for each incremental cycle
collection slice and each non-incremental cycle collection.
# nsCycleCollector::ForgetSkippable
`nsCycleCollector::ForgetSkippable` is presented as "Cycle Collection", but in
reality it is preparation/pre-optimization for cycle collection, and not the
actual tracing of edges and collecting of cycles.
## ConsoleTime
A marker generated via `console.time()` and `console.timeEnd()`.

Просмотреть файл

@ -435,6 +435,13 @@ const Formatters = {
return { "Restyle Hint": marker.restyleHint.replace(/eRestyle_/g, "") };
}
},
CycleCollectionFields: function (marker) {
let Type = PREFS["show-platform-data"]
? marker.name
: marker.name.replace(/nsCycleCollector::/g, "");
return { Type };
},
};
exports.getMarkerLabel = getMarkerLabel;

Просмотреть файл

@ -113,6 +113,20 @@ const TIMELINE_BLUEPRINT = {
{ property: "nonincrementalReason", label: "Non-incremental Reason:" }
],
},
"nsCycleCollector::Collect": {
group: 1,
colorName: "graphs-red",
collapseFunc: either(collapse.parent, collapse.child),
label: "Cycle Collection",
fields: Formatters.CycleCollectionFields,
},
"nsCycleCollector::ForgetSkippable": {
group: 1,
colorName: "graphs-red",
collapseFunc: either(collapse.parent, collapse.child),
label: "Cycle Collection",
fields: Formatters.CycleCollectionFields,
},
/* Group 2 - User Controlled */
"ConsoleTime": {