// // G1 string deduplication candidate selection // // An object is considered a deduplication candidate if all of the following // statements are true: // // - The object is an instance of java.lang.String // // - The object is being evacuated from a young heap region // // - The object is being evacuated to a young/survivor heap region and the // object's age is equal to the deduplication age threshold // // or // // The object is being evacuated to an old heap region and the object's age is // less than the deduplication age threshold // // Once an string object has been promoted to an old region, or its age is higher // than the deduplication age threshold, is will never become a candidate again. // This approach avoids making the same object a candidate more than once. //
class G1StringDedup : AllStatic { public: // Candidate selection policy for full GC, returning true if the given // String is a candidate for string deduplication. // precondition: StringDedup::is_enabled() // precondition: java_string is a Java String staticbool is_candidate_from_mark(oop java_string);
// Candidate selection policy for young/mixed GC. // If to is young then age should be the new (survivor's) age. // if to is old then age should be the age of the copied from object. staticbool is_candidate_from_evacuation(const Klass* klass,
G1HeapRegionAttr from,
G1HeapRegionAttr to,
uint age) { return StringDedup::is_enabled_string(klass) &&
from.is_young() &&
(to.is_young() ?
StringDedup::is_threshold_age(age) :
StringDedup::is_below_threshold_age(age));
}
};
#endif// SHARE_GC_G1_G1STRINGDEDUP_HPP
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.