RESOLVED FIXED 207673
[JSC] Compact JITCodeMap by storing BytecodeIndex and CodeLocation separately
https://bugs.webkit.org/show_bug.cgi?id=207673
Summary [JSC] Compact JITCodeMap by storing BytecodeIndex and CodeLocation separately
Yusuke Suzuki
Reported 2020-02-12 17:55:31 PST
[JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately
Attachments
Patch (7.66 KB, patch)
2020-02-12 18:01 PST, Yusuke Suzuki
no flags
Patch (7.85 KB, patch)
2020-02-12 18:05 PST, Yusuke Suzuki
no flags
Patch (7.85 KB, patch)
2020-02-12 18:08 PST, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2020-02-12 18:01:56 PST
Mark Lam
Comment 2 2020-02-12 18:05:34 PST
Comment on attachment 390603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390603&action=review > Source/JavaScriptCore/ChangeLog:3 > + [JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately /stroing/strong/
Yusuke Suzuki
Comment 3 2020-02-12 18:05:57 PST
Yusuke Suzuki
Comment 4 2020-02-12 18:06:35 PST
Comment on attachment 390603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390603&action=review >> Source/JavaScriptCore/ChangeLog:3 >> + [JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately > > /stroing/strong/ Thanks, fixing.
Yusuke Suzuki
Comment 5 2020-02-12 18:08:29 PST
Mark Lam
Comment 6 2020-02-12 18:28:17 PST
Comment on attachment 390606 [details] Patch r=me
Yusuke Suzuki
Comment 7 2020-02-12 18:30:12 PST
Radar WebKit Bug Importer
Comment 8 2020-02-12 18:31:14 PST
Robin Morisset
Comment 9 2020-02-12 18:31:45 PST
Comment on attachment 390606 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390606&action=review > Source/JavaScriptCore/jit/JITCodeMap.h:46 > + m_pointer = MallocPtr<uint8_t>::malloc(sizeof(CodeLocationLabel<JSEntryPtrTag>) * m_size + sizeof(BytecodeIndex) * m_size); Don't we need to insure some alignment minimum here ? (I would say alignof(CodeLocationLabel<JSEntryPtrTag>) > Source/JavaScriptCore/jit/JITCodeMap.h:56 > + return codeLocations()[index - indexes()]; I'm confused about this line. Can you explain why it is not just codeLocations()[index] ?
Yusuke Suzuki
Comment 10 2020-02-12 18:38:35 PST
Comment on attachment 390606 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390606&action=review >> Source/JavaScriptCore/jit/JITCodeMap.h:46 >> + m_pointer = MallocPtr<uint8_t>::malloc(sizeof(CodeLocationLabel<JSEntryPtrTag>) * m_size + sizeof(BytecodeIndex) * m_size); > > Don't we need to insure some alignment minimum here ? (I would say alignof(CodeLocationLabel<JSEntryPtrTag>) MallocPtr is just calling malloc. So we can assume usual alignment requirement for malloc here. >> Source/JavaScriptCore/jit/JITCodeMap.h:56 >> + return codeLocations()[index - indexes()]; > > I'm confused about this line. Can you explain why it is not just codeLocations()[index] ? index is `BytecodeIndex*` pointing the found entry (or nullptr). `index - indexes()` can calculate the offset.
Note You need to log in before you can comment on or make changes to this bug.