RESOLVED FIXED 197062
Add option to dump JIT memory
https://bugs.webkit.org/show_bug.cgi?id=197062
Summary Add option to dump JIT memory
Tadeu Zagallo
Reported 2019-04-18 09:52:13 PDT
...
Attachments
Patch (5.36 KB, patch)
2019-04-18 14:55 PDT, Tadeu Zagallo
no flags
Patch for landing (5.36 KB, patch)
2019-04-19 13:58 PDT, Tadeu Zagallo
no flags
Tadeu Zagallo
Comment 1 2019-04-18 14:55:19 PDT
Tadeu Zagallo
Comment 2 2019-04-18 14:56:11 PDT
Saam Barati
Comment 3 2019-04-19 09:55:25 PDT
Comment on attachment 367762 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367762&action=review > Source/JavaScriptCore/assembler/LinkBuffer.cpp:264 > + dumpJITMemory(outData, outData, m_executableMemory->sizeInBytes()); I think you want m_size here > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:565 > + ASSERT(fd != -1); RELEASE_ASSERT > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:583 > + if (UNLIKELY(offset + size > bufferSize)) It’s unlikely this would happen, but you should just make the buffer size the size of the jit memory pool. That way you’re guaranteed there is enough space in it. This code here is wrong if a jitmemcpy copies > 32MB
Tadeu Zagallo
Comment 4 2019-04-19 13:56:50 PDT
Comment on attachment 367762 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367762&action=review Thanks for the review! >> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:583 >> + if (UNLIKELY(offset + size > bufferSize)) > > It’s unlikely this would happen, but you should just make the buffer size the size of the jit memory pool. That way you’re guaranteed there is enough space in it. This code here is wrong if a jitmemcpy copies > 32MB Yeah, I thought it was unlikely enough that it shouldn't matter, but I'll switch it to use `fixedExecutableMemoryPoolSize` instead.
Tadeu Zagallo
Comment 5 2019-04-19 13:58:02 PDT
Created attachment 367821 [details] Patch for landing
WebKit Commit Bot
Comment 6 2019-04-19 14:47:38 PDT
Comment on attachment 367821 [details] Patch for landing Clearing flags on attachment: 367821 Committed r244470: <https://trac.webkit.org/changeset/244470>
WebKit Commit Bot
Comment 7 2019-04-19 14:47:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.