Dumping OSR ExitValue should expand materializations only once
authorbasile_clement@apple.com <basile_clement@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 May 2015 18:39:46 +0000 (18:39 +0000)
committerbasile_clement@apple.com <basile_clement@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 May 2015 18:39:46 +0000 (18:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144694

Reviewed by Filip Pizlo.

Currently, dumping OSR exit values will print the full materialization
information each time it is encountered. We change it to print only a
brief description (only the materialization's address), and print the
whole set of materializations later on.

This makes the dump less confusing (less likely to think that two
instances of the same materialization are different), and will be a
necessary change if/when we support materialization cycles.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dumpInContext):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183939 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/ftl/FTLCompile.cpp
Source/JavaScriptCore/ftl/FTLExitValue.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

index e6458b1..c274094 100644 (file)
@@ -1,3 +1,26 @@
+2015-05-07  Basile Clement  <basile_clement@apple.com>
+
+        Dumping OSR ExitValue should expand materializations only once
+        https://bugs.webkit.org/show_bug.cgi?id=144694
+
+        Reviewed by Filip Pizlo.
+
+        Currently, dumping OSR exit values will print the full materialization
+        information each time it is encountered. We change it to print only a
+        brief description (only the materialization's address), and print the
+        whole set of materializations later on.
+
+        This makes the dump less confusing (less likely to think that two
+        instances of the same materialization are different), and will be a
+        necessary change if/when we support materialization cycles.
+
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::mmAllocateDataSection):
+        * ftl/FTLExitValue.cpp:
+        (JSC::FTL::ExitValue::dumpInContext):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::buildExitArguments):
+
 2015-05-07  Andreas Kling  <akling@apple.com>
 
         Worker threads leak WeakBlocks (as seen on leaks bot)
index df324f6..3ce8118 100644 (file)
@@ -396,6 +396,11 @@ static void fixFunctionBasedOnStackMaps(
             if (verboseCompilationEnabled()) {
                 DumpContext context;
                 dataLog("    Exit values: ", inContext(exit.m_values, &context), "\n");
+                if (!exit.m_materializations.isEmpty()) {
+                    dataLog("    Materializations: \n");
+                    for (ExitTimeObjectMaterialization* materialization : exit.m_materializations)
+                        dataLog("        Materialize(", pointerDump(materialization), ")\n");
+                }
             }
         }
         
index 2bcce6c..9d0bdef 100644 (file)
@@ -114,7 +114,7 @@ void ExitValue::dumpInContext(PrintStream& out, DumpContext* context) const
         out.print("Recovery(", recoveryOpcode(), ", arg", leftRecoveryArgument(), ", arg", rightRecoveryArgument(), ", ", recoveryFormat(), ")");
         return;
     case ExitValueMaterializeNewObject:
-        out.print("Materialize(", pointerDump(objectMaterialization()), ")");
+        out.print("Materialize(", WTF::RawPointer(objectMaterialization()), ":..)");
         return;
     }
     
index 4f5a3a8..94cc657 100644 (file)
@@ -7987,6 +7987,11 @@ private:
         
         if (verboseCompilationEnabled())
             dataLog("        Exit values: ", exit.m_values, "\n");
+            if (!exit.m_materializations.isEmpty()) {
+                dataLog("        Materializations: \n");
+                for (ExitTimeObjectMaterialization* materialization : exit.m_materializations)
+                    dataLog("            Materialize(", pointerDump(materialization), ")\n");
+            }
     }
     
     void callStackmap(OSRExit& exit, ExitArgumentList& arguments)