Title: [161453] branches/jsCStack/Source/_javascript_Core
Revision
161453
Author
fpi...@apple.com
Date
2014-01-07 13:50:49 -0800 (Tue, 07 Jan 2014)

Log Message

--showDFGDisassembly=true shouldn't show baseline JIT stubs
https://bugs.webkit.org/show_bug.cgi?id=126593

Not yet reviewed.

* assembler/LinkBuffer.cpp:
(JSC::shouldShowDisassemblyFor):
* assembler/LinkBuffer.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompilePutByVal):
* jit/JITStubRoutine.h:
* jit/Repatch.cpp:
(JSC::generateProtoChainAccessStub):
(JSC::tryCacheGetByID):
(JSC::tryBuildGetByIDList):
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStub):
(JSC::tryRepatchIn):
(JSC::linkClosureCall):

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,28 @@
 2014-01-07  Filip Pizlo  <fpi...@apple.com>
 
+        --showDFGDisassembly=true shouldn't show baseline JIT stubs
+        https://bugs.webkit.org/show_bug.cgi?id=126593
+
+        Not yet reviewed.
+
+        * assembler/LinkBuffer.cpp:
+        (JSC::shouldShowDisassemblyFor):
+        * assembler/LinkBuffer.h:
+        * jit/JITPropertyAccess.cpp:
+        (JSC::JIT::privateCompileGetByVal):
+        (JSC::JIT::privateCompilePutByVal):
+        * jit/JITStubRoutine.h:
+        * jit/Repatch.cpp:
+        (JSC::generateProtoChainAccessStub):
+        (JSC::tryCacheGetByID):
+        (JSC::tryBuildGetByIDList):
+        (JSC::emitPutReplaceStub):
+        (JSC::emitPutTransitionStub):
+        (JSC::tryRepatchIn):
+        (JSC::linkClosureCall):
+
+2014-01-07  Filip Pizlo  <fpi...@apple.com>
+
         Merge trunk r161438.
 
 2014-01-07  Filip Pizlo  <fpi...@apple.com>

Modified: branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.cpp (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.cpp	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.cpp	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,11 +28,20 @@
 
 #if ENABLE(ASSEMBLER)
 
+#include "CodeBlock.h"
+#include "JITCode.h"
 #include "Options.h"
 #include <wtf/CompilationThread.h>
 
 namespace JSC {
 
+bool shouldShowDisassemblyFor(CodeBlock* codeBlock)
+{
+    if (JITCode::isOptimizingJIT(codeBlock->jitType()) && Options::showDFGDisassembly())
+        return true;
+    return Options::showDisassembly();
+}
+
 LinkBuffer::CodeRef LinkBuffer::finalizeCodeWithoutDisassembly()
 {
     performFinalization();

Modified: branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.h (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.h	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/assembler/LinkBuffer.h	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2009, 2010, 2012, 2013, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,6 +42,7 @@
 
 namespace JSC {
 
+class CodeBlock;
 class VM;
 
 // LinkBuffer:
@@ -302,6 +303,11 @@
      ? ((linkBufferReference).finalizeCodeWithDisassembly dataLogFArgumentsForHeading) \
      : (linkBufferReference).finalizeCodeWithoutDisassembly())
 
+bool shouldShowDisassemblyFor(CodeBlock* codeBlock);
+
+#define FINALIZE_CODE_FOR(codeBlock, linkBufferReference, dataLogFArgumentsForHeading)  \
+    FINALIZE_CODE_IF(shouldShowDisassemblyFor(codeBlock), linkBufferReference, dataLogFArgumentsForHeading)
+
 // Use this to finalize code, like so:
 //
 // CodeRef code = FINALIZE_CODE(linkBuffer, ("my super thingy number %d", number));

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITPropertyAccess.cpp (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -974,7 +974,7 @@
     patchBuffer.link(done, byValInfo->badTypeJump.labelAtOffset(byValInfo->badTypeJumpToDone));
     
     byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-        patchBuffer,
+        m_codeBlock, patchBuffer,
         ("Baseline get_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
     
     RepatchBuffer repatchBuffer(m_codeBlock);
@@ -1023,12 +1023,12 @@
     bool isDirect = m_interpreter->getOpcodeID(currentInstruction->u.opcode) == op_put_by_val_direct;
     if (!isDirect) {
         byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-            patchBuffer,
+            m_codeBlock, patchBuffer,
             ("Baseline put_by_val stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
         
     } else {
         byValInfo->stubRoutine = FINALIZE_CODE_FOR_STUB(
-            patchBuffer,
+            m_codeBlock, patchBuffer,
             ("Baseline put_by_val_direct stub for %s, return point %p", toCString(*m_codeBlock).data(), returnAddress.value()));
     }
     RepatchBuffer repatchBuffer(m_codeBlock);

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITStubRoutine.h (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/jit/JITStubRoutine.h	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITStubRoutine.h	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -150,12 +150,9 @@
 };
 
 // Helper for the creation of simple stub routines that need no help from the GC.
-#define FINALIZE_CODE_FOR_STUB(patchBuffer, dataLogFArguments) \
-    (adoptRef(new JITStubRoutine(FINALIZE_CODE((patchBuffer), dataLogFArguments))))
+#define FINALIZE_CODE_FOR_STUB(codeBlock, patchBuffer, dataLogFArguments) \
+    (adoptRef(new JITStubRoutine(FINALIZE_CODE_FOR((codeBlock), (patchBuffer), dataLogFArguments))))
 
-#define FINALIZE_CODE_FOR_DFG_STUB(patchBuffer, dataLogFArguments) \
-    (adoptRef(new JITStubRoutine(FINALIZE_DFG_CODE((patchBuffer), dataLogFArguments))))
-
 } // namespace JSC
 
 #endif // ENABLE(JIT)

Modified: branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp (161452 => 161453)


--- branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp	2014-01-07 21:27:10 UTC (rev 161452)
+++ branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp	2014-01-07 21:50:49 UTC (rev 161453)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -275,9 +275,9 @@
     
     linkRestoreScratch(patchBuffer, needToRestoreScratch, success, fail, failureCases, successLabel, slowCaseLabel);
     
-    stubRoutine = FINALIZE_CODE_FOR_DFG_STUB(
-        patchBuffer,
-        ("DFG prototype chain access stub for %s, return point %p",
+    stubRoutine = FINALIZE_CODE_FOR_STUB(
+        exec->codeBlock(), patchBuffer,
+        ("Prototype chain access stub for %s, return point %p",
             toCString(*exec->codeBlock()).data(), successLabel.executableAddress()));
 }
 
@@ -336,9 +336,9 @@
         
         linkRestoreScratch(patchBuffer, needToRestoreScratch, stubInfo, success, fail, failureCases);
         
-        stubInfo.stubRoutine = FINALIZE_CODE_FOR_DFG_STUB(
-            patchBuffer,
-            ("DFG GetById array length stub for %s, return point %p",
+        stubInfo.stubRoutine = FINALIZE_CODE_FOR_STUB(
+            exec->codeBlock(), patchBuffer,
+            ("GetById array length stub for %s, return point %p",
                 toCString(*exec->codeBlock()).data(), stubInfo.callReturnLocation.labelAtOffset(
                     stubInfo.patch.deltaCallToDone).executableAddress()));
         
@@ -599,9 +599,9 @@
         
         RefPtr<JITStubRoutine> stubRoutine =
             createJITStubRoutine(
-                FINALIZE_DFG_CODE(
-                    patchBuffer,
-                    ("DFG GetById polymorphic list access for %s, return point %p",
+                FINALIZE_CODE_FOR(
+                    exec->codeBlock(), patchBuffer,
+                    ("GetById polymorphic list access for %s, return point %p",
                         toCString(*exec->codeBlock()).data(), stubInfo.callReturnLocation.labelAtOffset(
                             stubInfo.patch.deltaCallToDone).executableAddress())),
                 *vm,
@@ -769,9 +769,9 @@
     patchBuffer.link(success, stubInfo.callReturnLocation.labelAtOffset(stubInfo.patch.deltaCallToDone));
     patchBuffer.link(failure, failureLabel);
             
-    stubRoutine = FINALIZE_CODE_FOR_DFG_STUB(
-        patchBuffer,
-        ("DFG PutById replace stub for %s, return point %p",
+    stubRoutine = FINALIZE_CODE_FOR_STUB(
+        exec->codeBlock(), patchBuffer,
+        ("PutById replace stub for %s, return point %p",
             toCString(*exec->codeBlock()).data(), stubInfo.callReturnLocation.labelAtOffset(
                 stubInfo.patch.deltaCallToDone).executableAddress()));
 }
@@ -969,9 +969,9 @@
     
     stubRoutine =
         createJITStubRoutine(
-            FINALIZE_DFG_CODE(
-                patchBuffer,
-                ("DFG PutById %stransition stub (%p -> %p) for %s, return point %p",
+            FINALIZE_CODE_FOR(
+                exec->codeBlock(), patchBuffer,
+                ("PutById %stransition stub (%p -> %p) for %s, return point %p",
                     structure->outOfLineCapacity() != oldStructure->outOfLineCapacity() ? "reallocating " : "",
                     oldStructure, structure,
                     toCString(*exec->codeBlock()).data(), stubInfo.callReturnLocation.labelAtOffset(
@@ -1245,9 +1245,9 @@
 
         linkRestoreScratch(patchBuffer, needToRestoreScratch, success, fail, failureCases, successLabel, slowCaseLabel);
         
-        stubRoutine = FINALIZE_CODE_FOR_DFG_STUB(
-            patchBuffer,
-            ("DFG In (found = %s) stub for %s, return point %p",
+        stubRoutine = FINALIZE_CODE_FOR_STUB(
+            exec->codeBlock(), patchBuffer,
+            ("In (found = %s) stub for %s, return point %p",
                 wasFound ? "yes" : "no", toCString(*exec->codeBlock()).data(),
                 successLabel.executableAddress()));
     }
@@ -1410,9 +1410,9 @@
     patchBuffer.link(slow, CodeLocationLabel(vm->getCTIStub(virtualThunkGeneratorFor(CodeForCall, registers)).code()));
     
     RefPtr<ClosureCallStubRoutine> stubRoutine = adoptRef(new ClosureCallStubRoutine(
-        FINALIZE_DFG_CODE(
-            patchBuffer,
-            ("DFG closure call stub for %s, return point %p, target %p (%s)",
+        FINALIZE_CODE_FOR(
+            callerCodeBlock, patchBuffer,
+            ("Closure call stub for %s, return point %p, target %p (%s)",
                 toCString(*callerCodeBlock).data(), callLinkInfo.callReturnLocation.labelAtOffset(0).executableAddress(),
                 codePtr.executableAddress(), toCString(pointerDump(calleeCodeBlock)).data())),
         *vm, callerCodeBlock->ownerExecutable(), structure, executable, callLinkInfo.codeOrigin));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to