Commits

Brian Burg committed 9fd3e0e

UPDATE: tmp-idl

Comments (0)

Files changed (1)

 # HG changeset patch
 # Parent 1e9d1bfd4b6ae675761f66b50e595fe3154f0ddf
-diff --git a/js/src/jsprobes.h b/js/src/jsprobes.h
---- a/js/src/jsprobes.h
-+++ b/js/src/jsprobes.h
-@@ -45,7 +45,7 @@
- #endif
- #include "jspubtd.h"
- #include "jsprvtd.h"
--
-+#include "jscompartment.h"
- #include "jsprobedefs.h"
- #include "jsprobemgr.h"
- 
-@@ -179,8 +179,8 @@
-  * Multiple compartments' GC will be interleaved during a global collection
-  * (eg, compartment 1 starts, compartment 2 starts, compartment 1 ends, ...)
-  */
--bool GCStart(JSCompartment *compartment);
--bool GCEnd(JSCompartment *compartment);
-+bool GCStart(JSRuntime *runtime, JSCompartment *compartment);
-+bool GCEnd(JSRuntime *runtime, JSCompartment *compartment);
- 
- bool GCStartMarkPhase(JSCompartment *compartment);
- bool GCEndMarkPhase(JSCompartment *compartment);
-@@ -231,8 +231,8 @@
- bool ETWCalloutEnd(JSContext *cx, JSFunction *fun);
- bool ETWAcquireMemory(JSContext *cx, void *address, size_t nbytes);
- bool ETWReleaseMemory(JSContext *cx, void *address, size_t nbytes);
--bool ETWGCStart(JSCompartment *compartment);
--bool ETWGCEnd(JSCompartment *compartment);
-+bool ETWGCStart(JSRuntime *runtime, JSCompartment *compartment);
-+bool ETWGCEnd(JSRuntime *runtime, JSCompartment *compartment);
- bool ETWGCStartMarkPhase(JSCompartment *compartment);
- bool ETWGCEndMarkPhase(JSCompartment *compartment);
- bool ETWGCStartSweepPhase(JSCompartment *compartment);
-@@ -369,7 +369,9 @@
- #endif
- #ifdef MOZ_JSPROBES
-     ProbeManager *mgr = ProbeManager::manager();
--    if (!mgr || !mgr->fireProbe(JS_WILL_RESIZE_HEAP, compartment, oldSize, newSize))
-+    if (!mgr 
-+        || mgr->isProbeRuntime(compartment->rt) 
-+        || !mgr->fireProbe(JS_WILL_RESIZE_HEAP, compartment, oldSize, newSize))
-         ok = false;
- #endif
- 
-@@ -555,25 +557,30 @@
- }
- 
- inline bool
--Probes::GCStart(JSCompartment *compartment)
-+Probes::GCStart(JSRuntime *runtime, JSCompartment *compartment)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
--    if (ProfilingActive && !ETWGCStart(compartment))
-+    if (ProfilingActive && !ETWGCStart(runtime, compartment))
-         ok = false;
- #endif
- #ifdef MOZ_JSPROBES
-     ProbeManager *mgr = ProbeManager::manager();
--    if (!compartment || !mgr || !mgr->fireProbe(GC_DID_START, compartment))
--        ok = false;
-+    if (!compartment) {
-+        if (!mgr || !mgr->fireProbe(GLOBAL_GC_DID_START, runtime))
-+            ok = false;
-+    } else {
-+        if (!mgr || !mgr->fireProbe(COMPARTMENT_GC_DID_START, runtime, compartment))
-+            ok = false;
-+    }
- #endif
- 
-     return ok;
- }
- 
- inline bool
--Probes::GCEnd(JSCompartment *compartment)
-+Probes::GCEnd(JSRuntime *runtime, JSCompartment *compartment)
- {
-     bool ok = true;
- 
-@@ -581,10 +588,16 @@
-     if (ProfilingActive && !ETWGCEnd(compartment))
-         ok = false;
- #endif
-+
- #ifdef MOZ_JSPROBES
-     ProbeManager *mgr = ProbeManager::manager();
--    if (!compartment || !mgr || !mgr->fireProbe(GC_WILL_END, compartment))
--        ok = false;
-+    if (!compartment) {
-+        if (!mgr || !mgr->fireProbe(GLOBAL_GC_WILL_END, runtime))
-+            ok = false;
-+    } else {
-+        if (!mgr || !mgr->fireProbe(COMPARTMENT_GC_WILL_END, runtime, compartment))
-+            ok = false;
-+    }
- #endif
-     return ok;
- }
+
 diff --git a/toolkit/components/probes/nsIProbeService.idl b/toolkit/components/probes/nsIProbeService.idl
 --- a/toolkit/components/probes/nsIProbeService.idl
 +++ b/toolkit/components/probes/nsIProbeService.idl