Bug 1056332 - Remove cross-global adopt telemetry. r=gabor

This commit is contained in:
Bobby Holley 2014-08-23 09:01:50 +02:00
parent c143f98cab
commit 44b8336fd5
5 changed files with 0 additions and 62 deletions

View File

@ -1788,10 +1788,6 @@ ReparentWrapper(JSContext* aCx, JS::Handle<JSObject*> aObjArg)
return NS_OK;
}
// Telemetry.
xpc::RecordDonatedNode(oldCompartment);
xpc::RecordAdoptedNode(newCompartment);
nsISupports* native = UnwrapDOMObjectToISupports(aObj);
if (!native) {
return NS_OK;

View File

@ -258,32 +258,9 @@ public:
namespace xpc {
static uint32_t kLivingAdopters = 0;
void
RecordAdoptedNode(JSCompartment *c)
{
CompartmentPrivate *priv = CompartmentPrivate::Get(c);
if (!priv->adoptedNode) {
priv->adoptedNode = true;
++kLivingAdopters;
}
}
void
RecordDonatedNode(JSCompartment *c)
{
CompartmentPrivate::Get(c)->donatedNode = true;
}
CompartmentPrivate::~CompartmentPrivate()
{
MOZ_COUNT_DTOR(xpc::CompartmentPrivate);
Telemetry::Accumulate(Telemetry::COMPARTMENT_ADOPTED_NODE, adoptedNode);
Telemetry::Accumulate(Telemetry::COMPARTMENT_DONATED_NODE, donatedNode);
if (adoptedNode)
--kLivingAdopters;
}
static bool
@ -779,13 +756,6 @@ XPCJSRuntime::GCSliceCallback(JSRuntime *rt,
void
XPCJSRuntime::CustomGCCallback(JSGCStatus status)
{
// Record kLivingAdopters once per GC to approximate time sampling during
// periods of activity.
if (status == JSGC_BEGIN) {
Telemetry::Accumulate(Telemetry::COMPARTMENT_LIVING_ADOPTERS,
kLivingAdopters);
}
nsTArray<xpcGCCallback> callbacks(extraGCCallbacks);
for (uint32_t i = 0; i < callbacks.Length(); ++i)
callbacks[i](status);

View File

@ -3602,8 +3602,6 @@ public:
, skipWriteToGlobalPrototype(false)
, universalXPConnectEnabled(false)
, forcePermissiveCOWs(false)
, adoptedNode(false)
, donatedNode(false)
, warnedAboutXrays(false)
, scriptability(c)
, scope(nullptr)
@ -3656,10 +3654,6 @@ public:
// Using it in production is inherently unsafe.
bool forcePermissiveCOWs;
// for telemetry. See bug 928476.
bool adoptedNode;
bool donatedNode;
// Whether we've emitted a warning about a property that was filtered out
// by XrayWrappers. See XrayWrapper.cpp.
bool warnedAboutXrays;

View File

@ -479,12 +479,6 @@ SystemErrorReporter(JSContext *cx, const char *message, JSErrorReport *rep);
void
SimulateActivityCallback(bool aActive);
void
RecordAdoptedNode(JSCompartment *c);
void
RecordDonatedNode(JSCompartment *c);
// This function may be used off-main-thread, in which case it is benignly
// racey.
bool

View File

@ -82,22 +82,6 @@
"kind": "boolean",
"description": "blocklist.xml has been loaded synchronously"
},
"COMPARTMENT_DONATED_NODE": {
"expires_in_version": "never",
"kind": "boolean",
"description": "When a compartment is destroyed, we record whether one of its nodes was ever adopted into another compartment"
},
"COMPARTMENT_ADOPTED_NODE": {
"expires_in_version": "never",
"kind": "boolean",
"description": "When a compartment is destroyed, we record whether it had ever adopted a node from another compartment"
},
"COMPARTMENT_LIVING_ADOPTERS": {
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 10,
"description": "The number of living compartments for which COMPARTMENT_ADOPTED_NODE is true"
},
"CYCLE_COLLECTOR": {
"expires_in_version": "never",
"kind": "exponential",