| Summary: | Continue to consult InlineAccess's Structure even after switching to a stub IC | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||||||
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, tzagallo, webkit-bug-importer, ysuzuki | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Saam Barati
2021-07-07 18:32:00 PDT
We have an inline access that points to Structure S. However, S dies, and we don't clear it. Seems like the cache type of the SSI is changed from "get by id self" somehow. Found the bug: 1. Initialize SSI to be an inline self access loading from structure S. 2. We transition to being a PolymorphicAccess based SSI. But, we haven't generated code yet. We're buffered. So we are still running the inline access. But the SSI thinks it's a "Stub". 3. S is collected 4. we continue to run (1) Created attachment 433235 [details]
patch
Comment on attachment 433235 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=433235&action=review > Source/JavaScriptCore/ChangeLog:3 > + Stop running inline access code once we switch to being a Stub IC Doesn't that create a window of time when we're now taking slow path, when previously we would have had a fast path? Have you measured perf carefully? > Source/JavaScriptCore/ChangeLog:14 > + 2. We transition to being a PolymorphicAccess based StructureStubInfo. But, we haven't > + generated code yet. We're in the buffered state. So we are still running the inline access > + from (1). But the StructureStubInfo thinks it's a "Stub". This seems like a bad state to be in. Can we make it so that PolymorphicAccess only starts buffering after it has generated some initial thing? > Source/JavaScriptCore/ChangeLog:17 > + 4. We continue to run code from (1), because when we finalize the IC during GC, it > + doesn't think it's an inline access. Why not fix the bug by having the GC still look at the InlineAccess IC when we are in this state? Or maybe forever? It can reset it if it ever becomes invalid. Created attachment 433242 [details]
patch
Created attachment 433271 [details]
patch
Created attachment 433273 [details]
patch
Comment on attachment 433235 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=433235&action=review >> Source/JavaScriptCore/ChangeLog:17 >> + doesn't think it's an inline access. > > Why not fix the bug by having the GC still look at the InlineAccess IC when we are in this state? Or maybe forever? It can reset it if it ever becomes invalid. This is the approach I went with in the new patch. Comment on attachment 433273 [details]
patch
r=me
Committed r279813 (239574@main): <https://commits.webkit.org/239574@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 433273 [details]. |