Title: [153255] trunk/Source/_javascript_Core
- Revision
- 153255
- Author
- [email protected]
- Date
- 2013-07-24 21:04:02 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: FTL should be able to dump disassembly
https://bugs.webkit.org/show_bug.cgi?id=118141
Reviewed by Geoffrey Garen.
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (153254 => 153255)
--- trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:04:01 UTC (rev 153254)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:04:02 UTC (rev 153255)
@@ -1,5 +1,15 @@
2013-06-27 Filip Pizlo <[email protected]>
+ fourthTier: FTL should be able to dump disassembly
+ https://bugs.webkit.org/show_bug.cgi?id=118141
+
+ Reviewed by Geoffrey Garen.
+
+ * ftl/FTLCompile.cpp:
+ (JSC::FTL::compile):
+
+2013-06-27 Filip Pizlo <[email protected]>
+
Unreviewed, fix build for LLVM ToT.
This doesn't affect those using the binary drops, but if you're building from
Modified: trunk/Source/_javascript_Core/ftl/FTLCompile.cpp (153254 => 153255)
--- trunk/Source/_javascript_Core/ftl/FTLCompile.cpp 2013-07-25 04:04:01 UTC (rev 153254)
+++ trunk/Source/_javascript_Core/ftl/FTLCompile.cpp 2013-07-25 04:04:02 UTC (rev 153255)
@@ -31,6 +31,7 @@
#include "CodeBlockWithJITType.h"
#include "DFGCCallHelpers.h"
#include "DFGCommon.h"
+#include "Disassembler.h"
#include "FTLJITCode.h"
#include "FTLLLVMHeaders.h"
#include "JITStubs.h"
@@ -117,6 +118,22 @@
state.generatedFunction = reinterpret_cast<GeneratedFunction>(LLVMGetPointerToGlobal(engine, state.function));
LLVMDisposePassManager(pass);
LLVMDisposeExecutionEngine(engine);
+
+ if (shouldShowDisassembly()) {
+ // FIXME: fourthTier: FTL memory allocator should be able to tell us which of
+ // these things is actually code or data.
+ // https://bugs.webkit.org/show_bug.cgi?id=116189
+ for (unsigned i = 0; i < state.jitCode->handles().size(); ++i) {
+ ExecutableMemoryHandle* handle = state.jitCode->handles()[i].get();
+ dataLog(
+ "Generated LLVM code for ",
+ CodeBlockWithJITType(state.graph.m_codeBlock, JITCode::DFGJIT),
+ " #", i, ":\n");
+ disassemble(
+ MacroAssemblerCodePtr(handle->start()), handle->sizeInBytes(),
+ " ", WTF::dataFile());
+ }
+ }
}
} } // namespace JSC::FTL
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes