News for hackers. Stuff that matters.
Re:GC Tuning Confessions of a Performance Engineer by vitalyd on Friday May 29, 2015 @01:24PM (#9625937)
A card in the card table covers more than one object, so the entire dirty card needs to be scanned. Card marks only help with old->young references, and stack based roots still need to be visited each time, irrespective of what happened in the last collection.
Re:GC Tuning Confessions of a Performance Engineer by dumael on Friday May 29, 2015 @09:05PM (#9628427)
Except card marking (this region of the heap was changed) is only one way of flagging changes. It's entire possible to instead record the address of objects unconditionally and then flag them as they are visiting during a generation.
Re:GC Tuning Confessions of a Performance Engineer by vitalyd on Friday May 29, 2015 @09:49PM (#9628533)
You could but it's likely to perform worse for common case. Where are you going to record the addresses? How are you going to size that buffer? Card table is fixed size, and doesn't care whether you're using compressed pointers or full blown word sized ones. Cards also benefit from cache locality if recording objects in the same card. Marking a card clean is dirt cheap, and incremental cleaning is cheaper than removing entries individually from an exact buffer.

The downside to card marking is the impreciseness but with java being very reference heavy, I don't know how much that is a problem. Secondary problem is false sharing of memory when multiple mutators write in there; Hotspot, e.g. has a special flag to enable conditional marking, but it's not on by default.

Re:GC Tuning Confessions of a Performance Engineer by pron on Friday May 29, 2015 @04:52PM (#9627324)
That's why I said proportional.