Bug 232975 - Move m_doesGC from Heap to VM.
Summary: Move m_doesGC from Heap to VM.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks: 232849
  Show dependency treegraph
 
Reported: 2021-11-10 17:18 PST by Mark Lam
Modified: 2021-11-11 09:32 PST (History)
17 users (show)

See Also:


Attachments
proposed patch. (93.25 KB, patch)
2021-11-10 17:46 PST, Mark Lam
fpizlo: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 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.
Comment 1 Radar WebKit Bug Importer 2021-11-10 17:18:54 PST
<rdar://problem/85277492>
Comment 2 Mark Lam 2021-11-10 17:46:28 PST
Created attachment 443885 [details]
proposed patch.
Comment 3 Mark Lam 2021-11-11 09:32:21 PST
Thanks for the review.  Landed in r285636: <http://trac.webkit.org/r285636>.