Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/satbQueue.cpp @ 845:df6caf649ff7
6700789: G1: Enable use of compressed oops with G1 heaps
Summary: Modifications to G1 so as to allow the use of compressed oops.
Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author | ysr |
---|---|
date | Tue, 14 Jul 2009 15:40:39 -0700 |
parents | 37f87013dfd8 |
children | 44f61c24ddab |
comparison
equal
deleted
inserted
replaced
839:bb18957ad21e | 845:df6caf649ff7 |
---|---|
41 if (obj != NULL) { | 41 if (obj != NULL) { |
42 cl->do_object(obj); | 42 cl->do_object(obj); |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
46 | |
47 #ifdef ASSERT | |
48 void ObjPtrQueue::verify_oops_in_buffer() { | |
49 if (_buf == NULL) return; | |
50 for (size_t i = _index; i < _sz; i += oopSize) { | |
51 oop obj = (oop)_buf[byte_index_to_index((int)i)]; | |
52 assert(obj != NULL && obj->is_oop(true /* ignore mark word */), | |
53 "Not an oop"); | |
54 } | |
55 } | |
56 #endif | |
57 | |
46 #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away | 58 #ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away |
47 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list | 59 #pragma warning( disable:4355 ) // 'this' : used in base member initializer list |
48 #endif // _MSC_VER | 60 #endif // _MSC_VER |
49 | 61 |
50 | 62 |
64 } | 76 } |
65 } | 77 } |
66 | 78 |
67 | 79 |
68 void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) { | 80 void SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) { |
81 DEBUG_ONLY(t->satb_mark_queue().verify_oops_in_buffer();) | |
69 t->satb_mark_queue().handle_zero_index(); | 82 t->satb_mark_queue().handle_zero_index(); |
70 } | 83 } |
71 | 84 |
72 void SATBMarkQueueSet::set_active_all_threads(bool b) { | 85 void SATBMarkQueueSet::set_active_all_threads(bool b) { |
73 _all_active = b; | 86 _all_active = b; |
141 nd->next = buffers_to_delete; | 154 nd->next = buffers_to_delete; |
142 buffers_to_delete = nd; | 155 buffers_to_delete = nd; |
143 } | 156 } |
144 _completed_buffers_tail = NULL; | 157 _completed_buffers_tail = NULL; |
145 _n_completed_buffers = 0; | 158 _n_completed_buffers = 0; |
146 debug_only(assert_completed_buffer_list_len_correct_locked()); | 159 DEBUG_ONLY(assert_completed_buffer_list_len_correct_locked()); |
147 } | 160 } |
148 while (buffers_to_delete != NULL) { | 161 while (buffers_to_delete != NULL) { |
149 CompletedBufferNode* nd = buffers_to_delete; | 162 CompletedBufferNode* nd = buffers_to_delete; |
150 buffers_to_delete = nd->next; | 163 buffers_to_delete = nd->next; |
151 deallocate_buffer(nd->buf); | 164 deallocate_buffer(nd->buf); |