We can just hold the offset in JIT code pool.
(In reply to Yusuke Suzuki from comment #0) > We can just hold the offset in JIT code pool. We should have different types for (1) JIT code pointer and (2) C runtime pointer. And making (1) 32bit.
Created attachment 369825 [details] Patch
Attachment 369825 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/jit/CodeOffset.h:47: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:52: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:54: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 3 in 24 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 369825 [details] Patch Attachment 369825 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/12185748 Number of test failures exceeded the failure limit.
Created attachment 369829 [details] Archive of layout-test-results from ews114 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 369906 [details] Patch
Attachment 369906 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/jit/CodeOffset.h:47: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:52: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:54: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 3 in 24 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 369919 [details] Patch
Attachment 369919 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/jit/CodeOffset.h:47: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:52: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] ERROR: Source/JavaScriptCore/jit/CodeOffset.h:54: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 3 in 24 files If any of these errors are false positives, please file a bug against check-webkit-style.
I think this should be definitely done. https://bugs.webkit.org/show_bug.cgi?id=186422 shows that Bag takes much memory. 6. WebKit BagNode_0x117c78000 30.0M 16.6M 16.6M 0K 195956 16.0M 575K 4% 30 This Bag is used by Watchpoint and JITIC things. And JITIC things include these CodeLocationLabel, and each takes 8bytes. If we use CodeOffset instead, it becomes 4bytes. Furthermore, CodeOffset thing ensures that repatch only happens within 32bit range, this is further safer than having a pointer which can be read/write later. I think the current patch is WIP. We should limit the source of CodeOffset and threading it in various places.