Bug 1510604 - Add SPEW=help to explain structured spewer r=tcampbell
authorMatthew Gaudet <mgaudet@mozilla.com>
Fri, 30 Nov 2018 20:18:27 +0000
changeset 505490 3a4e05f965e943f4e1181a4270dacc98a491cac8
parent 505460 847bc008e00b9348a07b87b4c8063782c1d7ab11
child 505491 b9dcfde98e47814fdcefc6329e65b8337c74ae3d
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1510604
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1510604 - Add SPEW=help to explain structured spewer r=tcampbell Also cleans out no longer valid IONFLAG bl-ic-stats Differential Revision: https://phabricator.services.mozilla.com/D13548
js/src/jit/JitSpewer.cpp
js/src/jit/JitSpewer.h
js/src/util/StructuredSpewer.cpp
--- a/js/src/jit/JitSpewer.cpp
+++ b/js/src/jit/JitSpewer.cpp
@@ -386,17 +386,18 @@ void jit::CheckLogging() {
         "  bl-scripts    Baseline script-compilation\n"
         "  bl-op         Baseline compiler detailed op-specific messages\n"
         "  bl-ic         Baseline inline-cache messages\n"
         "  bl-ic-fb      Baseline IC fallback stub messages\n"
         "  bl-osr        Baseline IC OSR messages\n"
         "  bl-bails      Baseline bailouts\n"
         "  bl-dbg-osr    Baseline debug mode on stack recompile messages\n"
         "  bl-all        All baseline spew\n"
-        "  bl-ic-stats   Baseline IC Statistics\n"
+        "\n"
+        "See also SPEW=help for information on the Structured Spewer."
         "\n");
     exit(0);
     /*NOTREACHED*/
   }
   if (ContainsFlag(env, "aborts")) {
     EnableChannel(JitSpew_IonAbort);
   }
   if (ContainsFlag(env, "prune")) {
@@ -516,19 +517,16 @@ void jit::CheckLogging() {
     EnableChannel(JitSpew_BaselineOSR);
   }
   if (ContainsFlag(env, "bl-bails")) {
     EnableChannel(JitSpew_BaselineBailouts);
   }
   if (ContainsFlag(env, "bl-dbg-osr")) {
     EnableChannel(JitSpew_BaselineDebugModeOSR);
   }
-  if (ContainsFlag(env, "bl-ic-stats")) {
-    EnableChannel(JitSpew_BaselineIC_Statistics);
-  }
   if (ContainsFlag(env, "bl-all")) {
     EnableChannel(JitSpew_BaselineAbort);
     EnableChannel(JitSpew_BaselineScripts);
     EnableChannel(JitSpew_BaselineOp);
     EnableChannel(JitSpew_BaselineIC);
     EnableChannel(JitSpew_BaselineICFallback);
     EnableChannel(JitSpew_BaselineOSR);
     EnableChannel(JitSpew_BaselineBailouts);
--- a/js/src/jit/JitSpewer.h
+++ b/js/src/jit/JitSpewer.h
@@ -100,19 +100,17 @@ namespace jit {
   _(IonMIR)                                \
   /* Information during bailouts */        \
   _(IonBailouts)                           \
   /* Information during OSI */             \
   _(IonInvalidate)                         \
   /* Debug info about snapshots */         \
   _(IonSnapshots)                          \
   /* Generated inline cache stubs */       \
-  _(IonIC)                                 \
-  /* Baseline IC Statistic information */  \
-  _(BaselineIC_Statistics)
+  _(IonIC)
 
 enum JitSpewChannel {
 #define JITSPEW_CHANNEL(name) JitSpew_##name,
   JITSPEW_CHANNEL_LIST(JITSPEW_CHANNEL)
 #undef JITSPEW_CHANNEL
       JitSpew_Terminator
 };
 
--- a/js/src/util/StructuredSpewer.cpp
+++ b/js/src/util/StructuredSpewer.cpp
@@ -169,16 +169,53 @@ void StructuredSpewer::parseSpewFlags(co
 #define CHECK_CHANNEL(name)                             \
   if (ContainsFlag(flags, #name) || star) {             \
     selectedChannels_.enableChannel(SpewChannel::name); \
   }
 
   STRUCTURED_CHANNEL_LIST(CHECK_CHANNEL)
 
 #undef CHECK_CHANNEL
+
+  if (ContainsFlag(flags, "help")) {
+     printf(
+        "\n"
+        "usage: SPEW=option,option,option,... where options can be:\n"
+        "\n"
+        "  help               Dump this help message\n"
+        "  all|*              Enable all the below channels\n"
+        "  channel[,channel]  Enable the selected channels from below\n"
+        "\n"
+        " Channels: \n"
+        "\n"
+        // List Channels
+        "  BaselineICStats    Dump the IC Entry counters during Ion analysis\n"
+        // End Channel list
+        "\n\n"
+        "By default output goes to a file called spew_output.$PID.$THREAD\n"
+        "\n"
+        "Further control of the sepewer can be accomplished with the below\n"
+        "environment variables:\n"
+        "\n"
+        "   SPEW_FILE: Selects the file to write to. An absolute path.\n"
+        "\n"
+        "   SPEW_FILTER: A string which is matched against 'signature'\n"
+        "        constructed from a JSScript, currently connsisting of \n"
+        "        filename:line:col.\n"
+        "\n"
+        "        A JSScript matches the filter string is found in the\n"
+        "        signature\n"
+        "\n"
+        "   SPEW_UPLOAD: If this variable is set as well as MOZ_UPLOAD_DIR,\n"
+        "        output goes to $MOZ_UPLOAD_DIR/spew_output* to ease usage\n"
+        "        with Treeherder.\n"
+
+        );
+    exit(0);
+  }
 }
 
 AutoStructuredSpewer::AutoStructuredSpewer(JSContext* cx, SpewChannel channel,
                                            JSScript* script)
     : printer_(mozilla::Nothing()) {
   if (!cx->spewer().enabled(cx, script, channel)) {
     return;
   }