comparison src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp @ 1705:2d160770d2e5

6814437: G1: remove the _new_refs array Summary: The per-worker _new_refs array is used to hold references that point into the collection set. It is populated during RSet updating and subsequently processed. In the event of an evacuation failure it processed again to recreate the RSets of regions in the collection set. Remove the per-worker _new_refs array by processing the references directly. Use a DirtyCardQueue to hold the cards containing the references so that the RSets of regions in the collection set can be recreated when handling an evacuation failure. Reviewed-by: iveresov, jmasa, tonyp
author johnc
date Mon, 02 Aug 2010 12:51:43 -0700
parents c18cbe5936b8
children 6e0aac35bfa9
comparison
equal deleted inserted replaced
1704:63f4675ac87d 1705:2d160770d2e5
1 /* 1 /*
2 * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
121 // is returned to the completed buffer set, and this call returns false. 121 // is returned to the completed buffer set, and this call returns false.
122 bool apply_closure_to_completed_buffer(int worker_i = 0, 122 bool apply_closure_to_completed_buffer(int worker_i = 0,
123 int stop_at = 0, 123 int stop_at = 0,
124 bool during_pause = false); 124 bool during_pause = false);
125 125
126 bool apply_closure_to_completed_buffer_helper(int worker_i, 126 // If there exists some completed buffer, pop it, then apply the
127 // specified closure to all its elements, nulling out those elements
128 // processed. If all elements are processed, returns "true". If no
129 // completed buffers exist, returns false. If a completed buffer exists,
130 // but is only partially completed before a "yield" happens, the
131 // partially completed buffer (with its processed elements set to NULL)
132 // is returned to the completed buffer set, and this call returns false.
133 bool apply_closure_to_completed_buffer(CardTableEntryClosure* cl,
134 int worker_i = 0,
135 int stop_at = 0,
136 bool during_pause = false);
137
138 // Helper routine for the above.
139 bool apply_closure_to_completed_buffer_helper(CardTableEntryClosure* cl,
140 int worker_i,
127 BufferNode* nd); 141 BufferNode* nd);
128 142
129 BufferNode* get_completed_buffer(int stop_at); 143 BufferNode* get_completed_buffer(int stop_at);
130 144
131 // Applies the current closure to all completed buffers, 145 // Applies the current closure to all completed buffers,
133 void apply_closure_to_all_completed_buffers(); 147 void apply_closure_to_all_completed_buffers();
134 148
135 DirtyCardQueue* shared_dirty_card_queue() { 149 DirtyCardQueue* shared_dirty_card_queue() {
136 return &_shared_dirty_card_queue; 150 return &_shared_dirty_card_queue;
137 } 151 }
152
153 // Deallocate any completed log buffers
154 void clear();
138 155
139 // If a full collection is happening, reset partial logs, and ignore 156 // If a full collection is happening, reset partial logs, and ignore
140 // completed ones: the full collection will make them all irrelevant. 157 // completed ones: the full collection will make them all irrelevant.
141 void abandon_logs(); 158 void abandon_logs();
142 159