Commits

Andrew Sutherland  committed eb07827

update hunks to not fail as of 86027:411f1ddbccb9; not compiled yet

  • Participants
  • Parent commits 066f8e6

Comments (0)

Files changed (3)

File add-jsprobes-core-definitions

 # HG changeset patch
-# Parent 30d024f54ae6ed0ab8f1102cff6d1760e2565bcd
+# Parent c50673071389499e5a6e836f19f69854591b6e0b
 Add the jsprobes.tbl data, as well as core structs in jsprobedefs.h such as ProbeType, ProbeValue, and other useful data.
 
 diff --git a/js/src/Makefile.in b/js/src/Makefile.in
 --- a/js/src/Makefile.in
 +++ b/js/src/Makefile.in
-@@ -136,16 +136,17 @@ CPPSRCS		= \
- 		jsnativestack.cpp \
- 		jsnum.cpp \
- 		jsobj.cpp \
- 		json.cpp \
- 		jsonparser.cpp \
+@@ -140,6 +140,7 @@
  		jsopcode.cpp \
  		jsproxy.cpp \
  		jsprf.cpp \
  		jsprobes.cpp \
  		jspropertycache.cpp \
  		jspropertytree.cpp \
- 		jsreflect.cpp \
- 		jsscope.cpp \
- 		jsscript.cpp \
- 		jsstr.cpp \
- 		jstypedarray.cpp \
-@@ -203,16 +204,18 @@ INSTALLED_HEADERS = \
- 		jsgcstats.h \
- 		jshash.h \
- 		jslock.h \
- 		json.h \
- 		jsopcode.tbl \
+@@ -208,6 +209,8 @@
  		jsopcode.h \
  		jsproxy.h \
  		jsprf.h \
  		jsproto.tbl \
  		jsprvtd.h \
  		jspubtd.h \
- 		jsstdint.h \
- 		jstypedarray.h \
- 		jstypes.h \
- 		jsutil.h \
- 		jsversion.h \
 diff --git a/js/src/jsprobedefs.cpp b/js/src/jsprobedefs.cpp
 new file mode 100644
 --- /dev/null
 +                                                                                  _ARG(compartment, JSCompartmentPtr)))
 +PROBE_POINT(GLOBAL_GC_DID_START,       22,   "GC_DidStartGlobal",       1, _ARG_1(_ARG(    runtime, JSRuntimePtr)))
 +PROBE_POINT(GLOBAL_GC_WILL_END,        23,   "GC_DidEndGlobal",         1, _ARG_1(_ARG(    runtime, JSRuntimePtr)))
-+PROBE_POINT(GC_MARK_PHASE_START,       24,   "GC_MarkPhaseStart",       1, _ARG_1(_ARG(compartment, JSCompartmentPtr)))
-+PROBE_POINT(GC_MARK_PHASE_END,         25,   "GC_MarkPhaseEnd",         1, _ARG_1(_ARG(compartment, JSCompartmentPtr)))
-+PROBE_POINT(GC_SWEEP_PHASE_START,      26,   "GC_SweepPhaseStart",      1, _ARG_1(_ARG(compartment, JSCompartmentPtr)))
-+PROBE_POINT(GC_SWEEP_PHASE_END,        27,   "GC_SweepPhaseEnd",        1, _ARG_1(_ARG(compartment, JSCompartmentPtr)))
++PROBE_POINT(GC_MARK_PHASE_START,       24,   "GC_MarkPhaseStart",       0, _NO_ARGS)
++PROBE_POINT(GC_MARK_PHASE_END,         25,   "GC_MarkPhaseEnd",         0, _NO_ARGS)
++PROBE_POINT(GC_SWEEP_PHASE_START,      26,   "GC_SweepPhaseStart",      0, _NO_ARGS)
++PROBE_POINT(GC_SWEEP_PHASE_END,        27,   "GC_SweepPhaseEnd",        0, _NO_ARGS)
 +
 +
 +

File jsprobes-dispatch-integration

 # HG changeset patch
-# Parent 88161298a94a44a8844198bf0379f06ae1ba8d6e
+# Parent e370f4f4853a70c0a335985bb291cc4a1607e1c8
 integrate ProbeManager with jsprobes.h and the js shell (js.cpp)
 
 diff --git a/js/src/gc/Statistics.cpp b/js/src/gc/Statistics.cpp
 --- a/js/src/gc/Statistics.cpp
 +++ b/js/src/gc/Statistics.cpp
-@@ -184,17 +184,17 @@ Statistics::beginGC(JSCompartment *comp,
- 
-     PodArrayZero(phaseStarts);
-     PodArrayZero(phaseEnds);
-     PodArrayZero(phaseTimes);
- 
+@@ -206,7 +206,7 @@
      triggerReason = reason;
  
      beginPhase(PHASE_GC);
--    Probes::GCStart(compartment);
-+    Probes::GCStart(runtime, compartment);
+-    Probes::GCStart();
++    Probes::GCStart(runtime, comp);
  
      GCCrashData crashData;
      crashData.isCompartment = !!compartment;
-     crash::SaveCrashData(crash::JS_CRASH_TAG_GC, &crashData, sizeof(crashData));
- }
- 
- double
- Statistics::t(Phase phase)
-@@ -261,17 +261,17 @@ Statistics::printStats()
-                 t(PHASE_GC), t(PHASE_MARK), t(PHASE_SWEEP));
-     }
-     fflush(fp);
- }
- 
+@@ -283,7 +283,7 @@
  void
  Statistics::endGC()
  {
--    Probes::GCEnd(compartment);
+-    Probes::GCEnd();
 +    Probes::GCEnd(runtime, compartment);
      endPhase(PHASE_GC);
      crash::SnapshotGCStack();
  
-     for (int i = 0; i < PHASE_LIMIT; i++)
-         totals[i] += phaseTimes[i];
- 
-     if (JSAccumulateTelemetryDataCallback cb = runtime->telemetryCallback) {
-         (*cb)(JS_TELEMETRY_GC_REASON, triggerReason);
 diff --git a/js/src/jsprobes.cpp b/js/src/jsprobes.cpp
 --- a/js/src/jsprobes.cpp
 +++ b/js/src/jsprobes.cpp
-@@ -274,40 +274,55 @@ Probes::createRuntime(JSRuntime *rt)
-     initRuntime = rt;
-     if (!JS_CallOnce(&once, Probes::startEngine))
-         ok = false;
- 
- #ifdef MOZ_ETW
+@@ -279,6 +279,11 @@
      if (!ETWCreateRuntime(rt))
          ok = false;
  #endif
  
      return ok;
  }
- 
- bool
- Probes::destroyRuntime(JSRuntime *rt)
- {
-     bool ok = true;
- #ifdef MOZ_ETW
+@@ -291,6 +296,11 @@
      if (!ETWDestroyRuntime(rt))
          ok = false;
  #endif
  
      return ok;
  }
- 
- bool
- Probes::shutdown()
- {
-     bool ok = true;
- #ifdef MOZ_ETW
+@@ -303,6 +313,11 @@
      if (!ETWShutdown())
          ok = false;
  #endif
  
      Probes::removeAllJITWatchers(NULL);
  
-     return ok;
- }
- 
- #ifdef INCLUDE_MOZILLA_DTRACE
- static const char *
 diff --git a/js/src/jsprobes.h b/js/src/jsprobes.h
 --- a/js/src/jsprobes.h
 +++ b/js/src/jsprobes.h
-@@ -42,28 +42,33 @@
- 
- #ifdef INCLUDE_MOZILLA_DTRACE
- #include "javascript-trace.h"
- #endif
- #include "jspubtd.h"
+@@ -47,6 +47,9 @@
  #include "jsprvtd.h"
  #include "jsscript.h"
  #include "jsobj.h"
  
  #ifdef JS_METHODJIT
  #include "methodjit/MethodJIT.h"
- #endif
- 
- namespace js {
- 
- namespace mjit {
- struct NativeAddressInfo;
+@@ -59,6 +62,8 @@
  struct JSActiveFrame;
  }
  
  namespace Probes {
  
  /*
-  * Static probes
-  *
-  * The probe points defined in this file are scattered around the SpiderMonkey
-  * source tree. The presence of Probes::someEvent() means that someEvent is
-  * about to happen or has happened. To the extent possible, probes should be
-@@ -192,18 +197,18 @@ bool releaseMemory(JSContext *cx, void *
-  * GC timing is tricky and at the time of this writing is changing frequently.
-  * GCStart(NULL)/GCEnd(NULL) are intended to bracket the entire garbage
-  * collection (either global or single-compartment), but a separate thread may
-  * continue doing work after GCEnd.
-  *
+@@ -197,8 +202,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();
+-bool GCEnd();
 +bool GCStart(JSRuntime *rt, JSCompartment *compartment);
 +bool GCEnd(JSRuntime *rt, JSCompartment *compartment);
  
- bool GCStartMarkPhase(JSCompartment *compartment);
- bool GCEndMarkPhase(JSCompartment *compartment);
- 
- bool GCStartSweepPhase(JSCompartment *compartment);
- bool GCEndSweepPhase(JSCompartment *compartment);
- 
- /*
-@@ -419,17 +424,16 @@ Probes::enterJSFun(JSContext *cx, JSFunc
- #endif
- #ifdef MOZ_TRACE_JSCALLS
-     cx->doFunctionCallback(fun, script, counter);
- #endif
- #ifdef MOZ_ETW
+ bool GCStartMarkPhase();
+ bool GCEndMarkPhase();
+@@ -424,7 +429,6 @@
      if (ProfilingActive && !ETWEnterJSFun(cx, fun, script, counter))
          ok = false;
  #endif
      return ok;
  }
  
- inline bool
- Probes::exitJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter)
- {
-     bool ok = true;
- 
-@@ -454,16 +458,23 @@ inline bool
- Probes::resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
+@@ -459,6 +463,13 @@
      if (ProfilingActive && !ETWResizeHeap(compartment, oldSize, newSize))
          ok = false;
  #endif
  
      return ok;
  }
- 
- #ifdef INCLUDE_MOZILLA_DTRACE
- static const char *ObjectClassname(JSObject *obj) {
-     if (!obj)
-         return "(null object)";
-@@ -569,30 +580,39 @@ inline bool
- Probes::compileScriptBegin(JSContext *cx, const char *filename, int lineno)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
+@@ -574,6 +585,11 @@
      if (ProfilingActive && !ETWCompileScriptBegin(filename, lineno))
          ok = false;
  #endif
  
      return ok;
  }
- 
- inline bool
- Probes::compileScriptEnd(JSContext *cx, JSScript *script, const char *filename, int lineno)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
+@@ -587,7 +603,11 @@
      if (ProfilingActive && !ETWCompileScriptEnd(filename, lineno))
          ok = false;
  #endif
      return ok;
  }
  
- inline bool
- Probes::calloutBegin(JSContext *cx, JSFunction *fun)
- {
-     bool ok = true;
- 
-@@ -639,89 +659,128 @@ Probes::releaseMemory(JSContext *cx, voi
-     if (ProfilingActive && !ETWReleaseMemory(cx, address, nbytes))
-         ok = false;
- #endif
- 
-     return ok;
+@@ -644,7 +664,7 @@
  }
  
  inline bool
--Probes::GCStart(JSCompartment *compartment)
+-Probes::GCStart()
 +Probes::GCStart(JSRuntime *rt, JSCompartment *compartment)
  {
      bool ok = true;
  
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCStart(compartment))
+@@ -652,12 +672,22 @@
+     if (ProfilingActive && !ETWGCStart())
          ok = false;
  #endif
 +#ifdef MOZ_JSPROBES
  }
  
  inline bool
--Probes::GCEnd(JSCompartment *compartment)
+-Probes::GCEnd()
 +Probes::GCEnd(JSRuntime *rt, JSCompartment *compartment)
  {
      bool ok = true;
  
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCEnd(compartment))
+@@ -665,6 +695,16 @@
+     if (ProfilingActive && !ETWGCEnd())
          ok = false;
  #endif
- 
 +#ifdef MOZ_JSPROBES
 +    ProbeManager *mgr = ProbeManager::manager();
 +    if (!compartment) {
 +            ok = false;
 +    }
 +#endif
+ 
      return ok;
  }
- 
- inline bool
- Probes::GCStartMarkPhase(JSCompartment *compartment)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCStartMarkPhase(compartment))
+@@ -678,6 +718,11 @@
+     if (ProfilingActive && !ETWGCStartMarkPhase())
          ok = false;
  #endif
--
++#ifdef MOZ_JSPROBES
++    ProbeManager *mgr = ProbeManager::manager();
++    if (!mgr || !mgr->fireProbe(GC_MARK_PHASE_START))
++        ok = false;
++#endif
+ 
+     return ok;
+ }
+@@ -691,6 +736,11 @@
+     if (ProfilingActive && !ETWGCEndMarkPhase())
+         ok = false;
+ #endif
++#ifdef MOZ_JSPROBES
++    ProbeManager *mgr = ProbeManager::manager();
++    if (!mgr || !mgr->fireProbe(GC_MARK_PHASE_END))
++        ok = false;
++#endif
+ 
+     return ok;
+ }
+@@ -704,6 +754,11 @@
+     if (ProfilingActive && !ETWGCStartSweepPhase())
+         ok = false;
+ #endif
 +#ifdef MOZ_JSPROBES
 +    ProbeManager *mgr = ProbeManager::manager();
 +    if (!mgr || !mgr->fireProbe(GC_MARK_PHASE_START, compartment))
 +        ok = false;
 +#endif
+ 
      return ok;
  }
- 
- inline bool
- Probes::GCEndMarkPhase(JSCompartment *compartment)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCEndMarkPhase(compartment))
+@@ -717,6 +772,11 @@
+     if (ProfilingActive && !ETWGCEndSweepPhase())
          ok = false;
  #endif
 +#ifdef MOZ_JSPROBES
  
      return ok;
  }
- 
- inline bool
- Probes::GCStartSweepPhase(JSCompartment *compartment)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCStartSweepPhase(compartment))
-         ok = false;
- #endif
-+#ifdef MOZ_JSPROBES
-+    ProbeManager *mgr = ProbeManager::manager();
-+    if (!mgr || !mgr->fireProbe(GC_MARK_PHASE_START, compartment))
-+        ok = false;
-+#endif
- 
-     return ok;
- }
- 
- inline bool
- Probes::GCEndSweepPhase(JSCompartment *compartment)
- {
-     bool ok = true;
- 
- #ifdef MOZ_ETW
-     if (ProfilingActive && !ETWGCEndSweepPhase(compartment))
-         ok = false;
- #endif
-+#ifdef MOZ_JSPROBES
-+    ProbeManager *mgr = ProbeManager::manager();
-+    if (!mgr || !mgr->fireProbe(GC_MARK_PHASE_END, compartment))
-+        ok = false;
-+#endif
- 
-     return ok;
- }
- 
- inline bool
- Probes::CustomMark(JSString *string)
- {
-     bool ok = true;

File xpcom-nsIProbeService

 # User Steve Fink <sfink@mozilla.com>
 # Date 1315439921 25200
 # Node ID 485bc3c84dd3b340bade0754c33d4cc094198e5e
-# Parent 2de24c977f32ca48d46641aa88df7029a37b8724
+# Parent 7e417fa08eace8e00a8eed7ebed93dd31bdc3706
 [mq]: xpcom-probes
 
 diff --git a/toolkit/components/Makefile.in b/toolkit/components/Makefile.in
 --- a/toolkit/components/Makefile.in
 +++ b/toolkit/components/Makefile.in
-@@ -61,16 +61,17 @@ PARALLEL_DIRS += \
-   filepicker \
-   find \
-   intl \
-   microformats \
-   parentalcontrols \
+@@ -66,6 +66,7 @@
    passwordmgr \
    perf \
    places \
    prompts \
    reflect \
    startup \
-   statusfilter \
-   telemetry \
-   typeaheadfind \
-   urlformatter \
-   viewconfig \
 diff --git a/toolkit/components/probes/Makefile.in b/toolkit/components/probes/Makefile.in
 new file mode 100644
 --- /dev/null
 diff --git a/toolkit/content/Services.jsm b/toolkit/content/Services.jsm
 --- a/toolkit/content/Services.jsm
 +++ b/toolkit/content/Services.jsm
-@@ -68,16 +68,17 @@ let initTable = [
-   ["cookies", "@mozilla.org/cookiemanager;1", "nsICookieManager2"],
-   ["droppedLinkHandler", "@mozilla.org/content/dropped-link-handler;1", "nsIDroppedLinkHandler"],
-   ["eTLD", "@mozilla.org/network/effective-tld-service;1", "nsIEffectiveTLDService"],
-   ["io", "@mozilla.org/network/io-service;1", "nsIIOService2"],
-   ["locale", "@mozilla.org/intl/nslocaleservice;1", "nsILocaleService"],
+@@ -75,6 +75,7 @@
    ["logins", "@mozilla.org/login-manager;1", "nsILoginManager"],
    ["obs", "@mozilla.org/observer-service;1", "nsIObserverService"],
    ["perms", "@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
 +  ["probes", "@mozilla.org/base/probes;1", "nsIProbeService"],
    ["prompt", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
    ["scriptloader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
- #ifdef MOZ_TOOLKIT_SEARCH
-   ["search", "@mozilla.org/browser/search-service;1", "nsIBrowserSearchService"],
- #endif
-   ["storage", "@mozilla.org/storage/service;1", "mozIStorageService"],
-   ["strings", "@mozilla.org/intl/stringbundle;1", "nsIStringBundleService"],
-   ["telemetry", "@mozilla.org/base/telemetry;1", "nsITelemetry"],
+   ["scriptSecurityManager", "@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],
 diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
 --- a/toolkit/library/Makefile.in
 +++ b/toolkit/library/Makefile.in
-@@ -188,16 +188,17 @@ COMPONENT_LIBS += \
-   commandlines \
-   toolkitcomps \
-   pipboot \
-   pipnss \
-   appcomps \
+@@ -193,6 +193,7 @@
    jsreflect \
    composer \
    telemetry \
    jsdebugger \
    storagecomps \
    rdf \
-   windowds \
-   $(NULL)
- 
- ifdef BUILD_CTYPES
- COMPONENT_LIBS += \
 diff --git a/toolkit/library/nsStaticXULComponents.cpp b/toolkit/library/nsStaticXULComponents.cpp
 --- a/toolkit/library/nsStaticXULComponents.cpp
 +++ b/toolkit/library/nsStaticXULComponents.cpp
-@@ -246,16 +246,17 @@
-     OSXPROXY_MODULE                          \
-     WINDOWSPROXY_MODULE                      \
-     JSCTYPES_MODULE                          \
-     MODULE(jsreflect)                        \
-     MODULE(jsperf)                           \
+@@ -251,6 +251,7 @@
      MODULE(nsServicesCryptoModule)           \
      MOZ_APP_COMPONENT_MODULES                \
      MODULE(nsTelemetryModule)                \
      MODULE(jsdebugger)                       \
      /* end of list */
  
- #define MODULE(_name) \
-   NSMODULE_DECL(_name);
- 
- XUL_MODULES
-