precise and imprecise card marking?
Y. Srinivas Ramakrishna
y.s.ramakrishna at oracle.com
Mon Apr 4 09:54:17 PDT 2011
Sorry for a somewhat naive question, but i have forgotten a few old
history lessons, which i'll need to relearn...
As I understand, array objects in hotspot are always precisely marked,
but non-array objects are sometimes precisely and sometimes imprecisely
marked. (Is this understanding correct?)
I ask because there is some card-scanning code in GC that gets quite
convoluted on account of the latter (imprecise and precise marking
of non-array objects), which has recently turned up a(n apparently
long-standing) bug in parallel card-scanning with ParNew, re 6883834.
While it is possible to fix this bug assuming the current card-marking
constraints, I wanted to check what people thought of the (im)possibility
(or otherwise) of making the JVM always precisely card-mark all
updates. (This would simplify the code in card-scanning,
allow us to throw away a bunch of somewhat convoluted code in
ParNew's parallel card-scanning, and eliminate the bug in 6883834.)
So, what is the fundamental reason for sometimes marking objects
imprecisely? Does it make generated code much faster, or ..., or ... ?
thanks!
-- ramki
More information about the hotspot-dev
mailing list