Add option to dump JIT memory
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 21:47:32 +0000 (21:47 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 21:47:32 +0000 (21:47 +0000)
commit485d7bbe800260a0cea443d61183c0565cf81876
tree24ccd0a94bd1e84d3b745580227a8e6504b55297
parent9ca3570b654e593f27cf8bbaf07f12302caee0ab
Add option to dump JIT memory
https://bugs.webkit.org/show_bug.cgi?id=197062
<rdar://problem/49744332>

Reviewed by Saam Barati.

Dump all writes into JIT memory to the specified file. The format is:
- 64-bit destination address for the write
- 64-bit size of the content written
- Copy of the data that was written to JIT memory

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::copyCompactAndLinkCode):
* jit/ExecutableAllocator.cpp:
(JSC::dumpJITMemory):
* jit/ExecutableAllocator.h:
(JSC::performJITMemcpy):
* runtime/Options.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/LinkBuffer.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.cpp
Source/JavaScriptCore/jit/ExecutableAllocator.h
Source/JavaScriptCore/runtime/Options.h