WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
155377
Bring separated jit heap to x86_64
https://bugs.webkit.org/show_bug.cgi?id=155377
Summary
Bring separated jit heap to x86_64
Oliver Hunt
Reported
2016-03-11 12:55:59 PST
Bring separated jit heap to x86_64
Attachments
Patch
(33.50 KB, patch)
2016-03-11 12:59 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(40.18 KB, patch)
2016-03-11 13:21 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(40.21 KB, patch)
2016-03-11 13:23 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2
(164.15 KB, application/zip)
2016-03-11 14:20 PST
,
Build Bot
no flags
Details
Patch
(40.19 KB, patch)
2016-03-11 14:52 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(40.19 KB, patch)
2016-03-11 15:47 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(40.15 KB, patch)
2016-03-11 16:24 PST
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(19.67 KB, patch)
2016-03-15 19:39 PDT
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(19.71 KB, patch)
2016-03-16 11:10 PDT
,
Oliver Hunt
no flags
Details
Formatted Diff
Diff
Patch
(19.76 KB, patch)
2016-03-16 11:12 PDT
,
Oliver Hunt
beidson
: review-
Details
Formatted Diff
Diff
Show Obsolete
(8)
View All
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2016-03-11 12:59:35 PST
Created
attachment 273756
[details]
Patch
Oliver Hunt
Comment 2
2016-03-11 13:21:50 PST
Created
attachment 273758
[details]
Patch
Oliver Hunt
Comment 3
2016-03-11 13:23:33 PST
Created
attachment 273759
[details]
Patch
Build Bot
Comment 4
2016-03-11 14:20:13 PST
Comment on
attachment 273759
[details]
Patch
Attachment 273759
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/962358
Number of test failures exceeded the failure limit.
Build Bot
Comment 5
2016-03-11 14:20:16 PST
Created
attachment 273766
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.10.5
Oliver Hunt
Comment 6
2016-03-11 14:52:14 PST
Created
attachment 273772
[details]
Patch
Oliver Hunt
Comment 7
2016-03-11 15:47:15 PST
Created
attachment 273779
[details]
Patch
Oliver Hunt
Comment 8
2016-03-11 16:24:03 PST
Created
attachment 273782
[details]
Patch
Darin Adler
Comment 9
2016-03-13 14:47:09 PDT
Comment on
attachment 273782
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273782&action=review
Someone else will have to review, but I have a few thoughts: Can we come up with a better name than performJITMemcpy? We should talk about what the function does and try to come up with more normal words for this. Maybe copyIntoExecutableMemory? Or whatever the concept of the function actually is.
> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:185 > + intptr_t randomLocation = 0; > + randomLocation = arc4random() & ((1 << 25) - 1); > + randomLocation += (1 << 24); > + randomLocation <<= 21;
Should do the first two operations on the same line; no need to have this “assign 0” that gets overwritten. Should have a comment explaining where the algorithm comes from.
> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:186 > + writableAddr = (mach_vm_address_t)randomLocation;
Normally in WebKit we use C++ casts, so this would be reinterpret_cast. It would be better to do that in the other code below too instead of the C casts.
> Source/WTF/wtf/Platform.h:1160 > +#if defined(ENABLE_SEPARATED_WX_HEAP) && defined(ENABLE_EXECUTABLE_ALLOCATOR_DEMAND) && ENABLE_EXECUTABLE_ALLOCATOR_DEMAND > +#error Separated WX heap requires a build to use the fixed pool executable allocator. > +#endif
Can this check go somewhere else? It doesn’t need to be in Platform.h itself, nor does it have to be compiled over and over again. Just need it one logical place in the project. Presumably the relevant .cpp file or header.
Oliver Hunt
Comment 10
2016-03-15 19:39:28 PDT
Created
attachment 274165
[details]
Patch
Saam Barati
Comment 11
2016-03-15 23:48:13 PDT
Comment on
attachment 274165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274165&action=review
Looks good to me. I'll let others also comment
> Source/JavaScriptCore/assembler/X86Assembler.h:2636 > + auto insn = OP_JMP_rel32;
Why not "instruction" instead of "insn" everywhere?
> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:182 > + writableAddr = (mach_vm_address_t)randomLocation;
Style: static_cast
> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:187 > + mach_task_self(), (mach_vm_address_t)jitBase,
Ditto
Oliver Hunt
Comment 12
2016-03-16 11:10:52 PDT
Created
attachment 274197
[details]
Patch
Oliver Hunt
Comment 13
2016-03-16 11:12:19 PDT
Created
attachment 274198
[details]
Patch
Brady Eidson
Comment 14
2017-08-19 16:00:58 PDT
Comment on
attachment 274198
[details]
Patch r-, as this has been pending review for over a year now. It is near-impossible that this patch still applies to trunk and unlikely to still be relevant in its current form.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug