Closed Bug 1539570 Opened 5 years ago Closed 5 years ago

Improve documentation of Heap<T>, TenuredHeap<T>, HeapPtr<T>, GCPtr<T>

Categories

(Core :: JavaScript: GC, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: sfink, Assigned: jonco)

Details

Attachments

(2 files)

I'm not sure if this should be an overview comment (or a modification of an existing overview comment, eg the one in gc/Barrier.h) or changes to existing comments before each of the types.

The sort of thing I'm looking for is that it seems like each class handles a different subset of

  • prebarriered?
  • postbarriered?
    • movable?
    • destructible outside of a GC?
  • readbarriered? (sort of separately for weak or CC-gray reasons)

and perhaps things I'm missing. (Scanning through, I notice a bunch of less interesting ones: alignment, flag bits of TenuredHeap<T>, ...)

Specific information I find lacking:

  • Heap<T> is not pre-barriered, and why that is ok.
  • why to use HeapPtr<T> within the engine instead of Heap<T>
  • that Rooted<T> does not need write barriers of either sort, and why
  • what types to use as fields of a stack-only class

Some of this is just me -- every time I reread the existing documentation, I discover that something I thought was missing is actually there, quite plainly.

Priority: -- → P5

I was going to respond and say "I've needinfo'd sfink, every 6 months or so he writes 80% of a new document about this". Then noticed who was reporting this.

We should update the wiki page also. <- actually constructive comment.

Here's a first attempt to improve the comments. How does this look? Any areas that need improving?

Assignee: nobody → jcoppeard
Attachment #9054183 - Flags: feedback?(sphink)
Comment on attachment 9054183 [details] [diff] [review]
bug1539570-barrier-do

Review of attachment 9054183 [details] [diff] [review]:
-----------------------------------------------------------------

Oh, sorry! I hadn't seen this patch at the time of our meeting. This is great! It answers the main questions I always have right up front.

I have a couple of minor nits, but I'll leave those for the review.
Attachment #9054183 - Flags: feedback?(sphink) → feedback+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/48aa3ad3d66e
Improve documentation of our various barrier classes r=sfink
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: