Bug 1189513 - Get rid of separation between e10s and non-e10s probes;r=felipe

--HG--
extra : commitid : An5D6KSBmQj
extra : rebase_source : 5542a80f091b3c5fdea38b5114f4c8d3dac8279b
This commit is contained in:
David Rajchenbach-Teller 2015-07-30 23:14:03 +02:00
parent 28edcba412
commit 4cb2a5ef13
3 changed files with 7 additions and 80 deletions

View File

@ -154,7 +154,9 @@ let Delta = {
* Utilities for dealing with state
*/
let State = {
_monitor: PerformanceStats.getMonitor(["jank", "cpow", "ticks"]),
_monitor: PerformanceStats.getMonitor([
"jank", "cpow", "ticks",
]),
/**
* Indexed by the number of minutes since the snapshot was taken.

View File

@ -27,8 +27,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
* For the sake of simplicity, rather than attempting to map each PerformanceMonitor
* of the parent to a PerformanceMonitor in each child process, we maintain a single
* PerformanceMonitor in each child process. Probes activation/deactivation for this
* monitor is controlled by the activation/deactivation of probes marked as "-content"
* in the parent.
* monitor is controlled by the activation/deactivation of probes in the parent.
*
* In the parent, this is always an empty monitor.
*/

View File

@ -79,6 +79,7 @@ Probe.prototype = {
acquire: function() {
if (this._counter == 0) {
this._impl.isActive = true;
Process.broadcast("acquire", [this._name]);
}
this._counter++;
},
@ -92,6 +93,7 @@ Probe.prototype = {
this._counter--;
if (this._counter == 0) {
this._impl.isActive = false;
Process.broadcast("release", [this._name]);
}
},
@ -303,81 +305,6 @@ let Probes = {
importChildCompartments: function() { /* nothing to do */ },
}),
"jank-content": new Probe("jank-content", {
_isActive: false,
set isActive(x) {
this._isActive = x;
if (x) {
Process.broadcast("acquire", ["jank"]);
} else {
Process.broadcast("release", ["jank"]);
}
},
get isActive() {
return this._isActive;
},
extract: function(xpcom) {
return {};
},
isEqual: function(a, b) {
return true;
},
subtract: function(a, b) {
return null;
},
importChildCompartments: function() { /* nothing to do */ },
}),
"cpow-content": new Probe("cpow-content", {
_isActive: false,
set isActive(x) {
this._isActive = x;
if (x) {
Process.broadcast("acquire", ["cpow"]);
} else {
Process.broadcast("release", ["cpow"]);
}
},
get isActive() {
return this._isActive;
},
extract: function(xpcom) {
return {};
},
isEqual: function(a, b) {
return true;
},
subtract: function(a, b) {
return null;
},
importChildCompartments: function() { /* nothing to do */ },
}),
"ticks-content": new Probe("ticks-content", {
_isActive: false,
set isActive(x) {
this._isActive = x;
if (x) {
Process.broadcast("acquire", ["ticks"]);
} else {
Process.broadcast("release", ["ticks"]);
}
},
get isActive() {
return this._isActive;
},
extract: function(xpcom) {
return {};
},
isEqual: function(a, b) {
return true;
},
subtract: function(a, b) {
return null;
},
importChildCompartments: function() { /* nothing to do */ },
}),
compartments: new Probe("compartments", {
set isActive(x) {
performanceStatsService.isMonitoringPerCompartment = x;
@ -397,10 +324,9 @@ let Probes = {
importChildCompartments: function(parent, children) {
parent.children = children;
},
})
}),
};
/**
* A monitor for a set of probes.
*