equal
deleted
inserted
replaced
51 // |
51 // |
52 // This can significantly reduce the overhead of the write barrier |
52 // This can significantly reduce the overhead of the write barrier |
53 // code, increasing throughput. |
53 // code, increasing throughput. |
54 |
54 |
55 class G1HotCardCache: public CHeapObj<mtGC> { |
55 class G1HotCardCache: public CHeapObj<mtGC> { |
|
56 public: |
|
57 typedef CardTable::CardValue CardValue; |
56 |
58 |
|
59 private: |
57 G1CollectedHeap* _g1h; |
60 G1CollectedHeap* _g1h; |
58 |
61 |
59 bool _use_cache; |
62 bool _use_cache; |
60 |
63 |
61 G1CardCounts _card_counts; |
64 G1CardCounts _card_counts; |
62 |
65 |
63 |
66 |
64 // The card cache table |
67 // The card cache table |
65 jbyte** _hot_cache; |
68 CardValue** _hot_cache; |
66 |
69 |
67 size_t _hot_cache_size; |
70 size_t _hot_cache_size; |
68 |
71 |
69 size_t _hot_cache_par_chunk_size; |
72 size_t _hot_cache_par_chunk_size; |
70 |
73 |
105 // added to the hot card cache. |
108 // added to the hot card cache. |
106 // If there is enough room in the hot card cache for the card we're |
109 // If there is enough room in the hot card cache for the card we're |
107 // adding, NULL is returned and no further action in needed. |
110 // adding, NULL is returned and no further action in needed. |
108 // If we evict a card from the cache to make room for the new card, |
111 // If we evict a card from the cache to make room for the new card, |
109 // the evicted card is then returned for refinement. |
112 // the evicted card is then returned for refinement. |
110 jbyte* insert(jbyte* card_ptr); |
113 CardValue* insert(CardValue* card_ptr); |
111 |
114 |
112 // Refine the cards that have delayed as a result of |
115 // Refine the cards that have delayed as a result of |
113 // being in the cache. |
116 // being in the cache. |
114 void drain(G1CardTableEntryClosure* cl, uint worker_i); |
117 void drain(G1CardTableEntryClosure* cl, uint worker_i); |
115 |
118 |