Closed
Bug 623205
Opened 14 years ago
Closed 6 years ago
AsymmGC - Refactor collection operations into SafepointTasks
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect, P3)
Tamarin Graveyard
Garbage Collection (mmGC)
Tracking
(Not tracked)
RESOLVED
WONTFIX
Q3 12 - Dolores
People
(Reporter: siwilkin, Unassigned)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
pnkfelix
:
review+
|
Details | Diff | Splinter Review |
This patch refactors the following collection operations into SafepointTasks:
GC::StartIncrementalMark
GC::IncrementalMark
GC::Collect
GC::FinishIncrementalMark
GC::ReapZCT
GC-owner threads are permitted to perform any of these tasks. VM-threads may only perform StartIncrementalMark and IncrementalMark as they do not demand thread-affinity of the GC-owner thread.
Using 'FinishIncrementalMark' as an example, the refactoring takes the following general form:
- FinishIncrementalMark is split into two methods, RequestFinishIncrementalMark and DoFinishIncrementalMark.
- DoFinishIncrementalMark contains the original method body of FinishIncrementalMark, with an added assert that the calling thread is a valid collector (see GC::CurrentThreadValidAsCollector()). In typical use, DoFinishIncrementalMark may only be called by a SafepointTask.
- RequestFinishIncrementalMark wraps a request to the GC's SafepointManager to dispatch a GCSafepointTask_IncrementalMark runnable object when all of the GC's mutators are safepointed. The GCSafepointTask_IncrementalMark object then calls DoFinishIncrementalMark.
As GC::Collect and GC::ReapZCT are public APIs, the original methods are left in place, but simply call GC::RequestCollect and GC::RequestReapZCT respectively.
Safepointing protocol demands that any thread running a SafepointTask must acquire all of the locks it will need for the task before requesting the safepoint. In the case of the collection tasks above, the only lock that we need is GC::m_coarseLock. The 'Request' version of the methods above assert that this lock is held by the calling thread before requesting the SafepointTask on the SafepointManager.
Reporter | ||
Updated•14 years ago
|
Attachment #501310 -
Attachment is patch: true
Attachment #501310 -
Attachment mime type: application/octet-stream → text/plain
Reporter | ||
Comment 1•14 years ago
|
||
(In reply to comment #0)
> As GC::Collect and GC::ReapZCT are public APIs, the original methods are left
> in place, but simply call GC::RequestCollect and GC::RequestReapZCT
> respectively.
In fact, StartIncrementalMark, FinishIncrementalMark and IncrementalMark are public APIs too. So they have also been refactored to simply call their respective 'Request' version.
Comment 2•14 years ago
|
||
(In reply to comment #1)
> (In reply to comment #0)
> > As GC::Collect and GC::ReapZCT are public APIs, the original methods are left
> > in place, but simply call GC::RequestCollect and GC::RequestReapZCT
> > respectively.
>
> In fact, StartIncrementalMark, FinishIncrementalMark and IncrementalMark are
> public APIs too.
That seems like a bug waiting to happen, depending a little on what you mean by "public".
Reporter | ||
Comment 3•14 years ago
|
||
(In reply to comment #2)
> That seems like a bug waiting to happen, depending a little on what you mean by
> "public".
IncrementalMark is 'public' in the C++ sense.
StartIncrementalMark and FinishIncrementalMark are private in the C++ sense, but 'public' as legacy selftests assume they can use them. I've already fixed up some legacy selftests to avoid asserting in AsymmGC. They could also be changed to use the 'Request' versions of these methods.
Comment 4•14 years ago
|
||
Gosh, I'm pretty sure these should all be 'private' in the C++ sense; selftests could be provided with more appropriate APIs or be friended, in a pinch.
Reporter | ||
Comment 5•14 years ago
|
||
Attachment #501310 -
Attachment is obsolete: true
Reporter | ||
Comment 6•14 years ago
|
||
Comment on attachment 515822 [details] [diff] [review]
MQ rev 250
See http://asteam/hg/users/siwilkin/asymmGC-01 for an asymmGC patch queue
qfinished at rev 250 (against TR rev 5916).
See http://asteam.corp.adobe.com/hg/users/fklockii/tr-patch-queues for the
current queue
Attachment #515822 -
Flags: review?(rulohani)
Attachment #515822 -
Flags: review?(lhansen)
Attachment #515822 -
Flags: review?(fklockii)
Comment 7•14 years ago
|
||
Comment on attachment 515822 [details] [diff] [review]
MQ rev 250
No red flags here.
Attachment #515822 -
Flags: review?(lhansen) → review+
Reporter | ||
Comment 8•14 years ago
|
||
Attachment #515822 -
Attachment is obsolete: true
Attachment #521936 -
Flags: review?(rulohani)
Attachment #521936 -
Flags: review?(fklockii)
Attachment #515822 -
Flags: review?(rulohani)
Attachment #515822 -
Flags: review?(fklockii)
Assignee: nobody → siwilkin
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
Priority: -- → P3
Target Milestone: --- → Q3 11 - Serrano
Updated•14 years ago
|
Attachment #521936 -
Flags: review?(fklockii) → review+
Reporter | ||
Updated•14 years ago
|
Assignee: siwilkin → fklockii
Updated•14 years ago
|
Target Milestone: Q3 11 - Serrano → Q1 12 - Brannan
Retargeting to Dolores.
Target Milestone: Q1 12 - Brannan → Q3 12 - Dolores
Updated•13 years ago
|
Attachment #521936 -
Flags: review?(rulohani)
Comment 10•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 11•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•