aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-03-27 16:27:06 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-03-29 07:04:28 +0000
commit3026e2c5b0e8163c3ea6b691a1f88bd3f41eb171 (patch)
tree416567f4f23da0bb23de8500c54a7ae18a20221d /src
parent73f365f9f2d04131ae27a5dba26255feda18baa2 (diff)
Add support for showing disassembly for cache mapped code
Change-Id: I6199d624a23e2e1b67bcbb841f0bc999880a3993 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jit/qv4assembler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index 5c90aba464..c5a60ec013 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -95,6 +95,12 @@ bool CompilationUnit::memoryMapCode(QString *errorString)
JSC::MacroAssemblerCodeRef codeRef = JSC::MacroAssemblerCodeRef::createSelfManagedCodeRef(JSC::MacroAssemblerCodePtr(codePtr));
JSC::ExecutableAllocator::makeExecutable(codePtr, compiledFunction->codeSize);
codeRefs[i] = codeRef;
+
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_ASM");
+ if (showCode) {
+ WTF::dataLogF("Mapped JIT code for %s\n", qPrintable(stringAt(compiledFunction->nameIndex)));
+ disassemble(codeRef.code(), compiledFunction->codeSize, " ", WTF::dataFile());
+ }
}
return true;