Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 677:96b229c54d1e
6543938: G1: remove the concept of popularity
Reviewed-by: iveresov, tonyp
author | apetrusenko |
---|---|
date | Wed, 25 Mar 2009 13:10:54 -0700 |
parents | 7bb995fbd3c0 |
children | 29e7d79232b9 |
comparison
equal
deleted
inserted
replaced
649:59f139e8a8d1 | 677:96b229c54d1e |
---|---|
236 size_t _next_marked_bytes; // Bytes known to be live via in-progress marking. | 236 size_t _next_marked_bytes; // Bytes known to be live via in-progress marking. |
237 | 237 |
238 // See "sort_index" method. -1 means is not in the array. | 238 // See "sort_index" method. -1 means is not in the array. |
239 int _sort_index; | 239 int _sort_index; |
240 | 240 |
241 // Means it has (or at least had) a very large RS, and should not be | |
242 // considered for membership in a collection set. | |
243 enum PopularityState { | |
244 NotPopular, | |
245 PopularPending, | |
246 Popular | |
247 }; | |
248 PopularityState _popularity; | |
249 | |
250 // <PREDICTION> | 241 // <PREDICTION> |
251 double _gc_efficiency; | 242 double _gc_efficiency; |
252 // </PREDICTION> | 243 // </PREDICTION> |
253 | 244 |
254 enum YoungType { | 245 enum YoungType { |
429 } | 420 } |
430 void set_next_gc_alloc_region(HeapRegion* r) { | 421 void set_next_gc_alloc_region(HeapRegion* r) { |
431 assert(is_gc_alloc_region(), "should only invoke on member of CS."); | 422 assert(is_gc_alloc_region(), "should only invoke on member of CS."); |
432 assert(r == NULL || r->is_gc_alloc_region(), "Malformed CS."); | 423 assert(r == NULL || r->is_gc_alloc_region(), "Malformed CS."); |
433 _next_in_special_set = r; | 424 _next_in_special_set = r; |
434 } | |
435 | |
436 bool is_reserved() { | |
437 return popular(); | |
438 } | 425 } |
439 | 426 |
440 bool is_on_free_list() { | 427 bool is_on_free_list() { |
441 return _is_on_free_list; | 428 return _is_on_free_list; |
442 } | 429 } |
607 | 594 |
608 zero_marked_bytes(); | 595 zero_marked_bytes(); |
609 init_top_at_mark_start(); | 596 init_top_at_mark_start(); |
610 } | 597 } |
611 | 598 |
612 bool popular() { return _popularity == Popular; } | |
613 void set_popular(bool b) { | |
614 if (b) { | |
615 _popularity = Popular; | |
616 } else { | |
617 _popularity = NotPopular; | |
618 } | |
619 } | |
620 bool popular_pending() { return _popularity == PopularPending; } | |
621 void set_popular_pending(bool b) { | |
622 if (b) { | |
623 _popularity = PopularPending; | |
624 } else { | |
625 _popularity = NotPopular; | |
626 } | |
627 } | |
628 | |
629 // <PREDICTION> | 599 // <PREDICTION> |
630 void calc_gc_efficiency(void); | 600 void calc_gc_efficiency(void); |
631 double gc_efficiency() { return _gc_efficiency;} | 601 double gc_efficiency() { return _gc_efficiency;} |
632 // </PREDICTION> | 602 // </PREDICTION> |
633 | 603 |