| Summary: | [JSC] Compact JITCodeMap by storing BytecodeIndex and CodeLocation separately | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, dbates, ews-watchlist, keith_miller, mark.lam, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Yusuke Suzuki
2020-02-12 17:55:31 PST
Created attachment 390603 [details]
Patch
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/ Created attachment 390605 [details]
Patch
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. Created attachment 390606 [details]
Patch
Comment on attachment 390606 [details]
Patch
r=me
Committed r256498: <https://trac.webkit.org/changeset/256498> 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] ? 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. |