Bug 232975

Summary: Move m_doesGC from Heap to VM.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, calvaris, ews-watchlist, fpizlo, gyuyoung.kim, hi, joepeck, keith_miller, msaboff, pangle, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 232849    
Attachments:
Description Flags
proposed patch. fpizlo: review+, ews-feeder: commit-queue-

Mark Lam
Reported 2021-11-10 17:18:06 PST
m_doesGC is only needed for ENABLE(DFG_DOES_GC_VALIDATION), and is used for checking if the VM thread's execution is in a state that can allow GC to run. Hence, it is more related to VM thread execution as opposed to the state of the Heap. This patch moves m_doesGC from Heap to VM to get it out of the way of upcoming Global GC work. Also change DeferGC and DeferGCForAWhile to take a VM& instead of a Heap&. DeferGC needs to access VM& in order to call VM::verifyCanGC(). DeferGCForAWhile does not need VM&, but we're changing it to be consistent with DeferGC. There should be no perf impact for this change.
Attachments
proposed patch. (93.25 KB, patch)
2021-11-10 17:46 PST, Mark Lam
fpizlo: review+
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2021-11-10 17:18:54 PST
Mark Lam
Comment 2 2021-11-10 17:46:28 PST
Created attachment 443885 [details] proposed patch.
Mark Lam
Comment 3 2021-11-11 09:32:21 PST
Thanks for the review. Landed in r285636: <http://trac.webkit.org/r285636>.
Note You need to log in before you can comment on or make changes to this bug.