зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1141614 - Part 4: Expose cycle collection markers in the devtools frontend; r=jsantell
This commit is contained in:
Родитель
6e561802a9
Коммит
1bf42ce3a7
|
@ -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": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче