< prev index next >
src/share/vm/gc/g1/g1ConcurrentMark.hpp
Print this page
rev 11974 : imported patch 8159422-high-mark-stack-contention
rev 11975 : imported patch 8159422-mikael-review
rev 11977 : imported patch 8159422-kim-review
rev 11978 : imported patch 8159422-kim-review2
*** 188,207 ****
// Allocate a new chunk from the reserved memory, using the high water mark. Returns
// NULL if out of memory.
OopChunk* allocate_new_chunk();
! size_t volatile _chunks_in_chunk_list;
volatile bool _out_of_memory;
// Atomically add the given chunk to the list.
void add_chunk_to_list(OopChunk* volatile* list, OopChunk* elem);
// Atomically remove and return a chunk from the given list. Returns NULL if the
// list is empty.
OopChunk* remove_chunk_from_list(OopChunk* volatile* list);
bool _should_expand;
// Resizes the mark stack to the given new capacity. Releases any previous
// memory if successful.
bool resize(size_t new_capacity);
--- 188,213 ----
// Allocate a new chunk from the reserved memory, using the high water mark. Returns
// NULL if out of memory.
OopChunk* allocate_new_chunk();
! volatile size_t _chunks_in_chunk_list;
volatile bool _out_of_memory;
// Atomically add the given chunk to the list.
void add_chunk_to_list(OopChunk* volatile* list, OopChunk* elem);
// Atomically remove and return a chunk from the given list. Returns NULL if the
// list is empty.
OopChunk* remove_chunk_from_list(OopChunk* volatile* list);
+ void add_chunk_to_chunk_list(OopChunk* elem);
+ void add_chunk_to_free_list(OopChunk* elem);
+
+ OopChunk* remove_chunk_from_chunk_list();
+ OopChunk* remove_chunk_from_free_list();
+
bool _should_expand;
// Resizes the mark stack to the given new capacity. Releases any previous
// memory if successful.
bool resize(size_t new_capacity);
*** 227,238 ****
// chunk may contain up to OopsPerChunk elements. If there are less, the last
// element in the array is a NULL pointer.
bool par_pop_chunk(oop* buffer);
// Return whether the chunk list is empty. Racy due to unsynchronized access to
! // _chunks_in_chunk_list.
! bool is_empty() const { return _chunks_in_chunk_list == 0; }
size_t capacity() const { return _chunk_capacity; }
bool is_out_of_memory() const { return _out_of_memory; }
void clear_out_of_memory() { _out_of_memory = false; }
--- 233,244 ----
// chunk may contain up to OopsPerChunk elements. If there are less, the last
// element in the array is a NULL pointer.
bool par_pop_chunk(oop* buffer);
// Return whether the chunk list is empty. Racy due to unsynchronized access to
! // _chunk_list.
! bool is_empty() const { return _chunk_list == NULL; }
size_t capacity() const { return _chunk_capacity; }
bool is_out_of_memory() const { return _out_of_memory; }
void clear_out_of_memory() { _out_of_memory = false; }
< prev index next >