11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 26 #include "precompiled.hpp" 27 #include "code/nmethod.hpp" 28 #include "gc_implementation/g1/g1CodeCacheRemSet.hpp" 29 #include "memory/iterator.hpp" 30 31 G1CodeRootChunk::G1CodeRootChunk() : _top(NULL), _next(NULL), _prev(NULL) { 32 _top = bottom(); 33 } 34 35 void G1CodeRootChunk::reset() { 36 _next = _prev = NULL; 37 _top = bottom(); 38 } 39 40 void G1CodeRootChunk::nmethods_do(CodeBlobClosure* cl) { 41 nmethod** cur = bottom(); 42 while (cur != _top) { 43 cl->do_code_blob(*cur); 44 cur++; 45 } 46 } 47 48 G1CodeRootChunkManager::G1CodeRootChunkManager() : _free_list(), _num_chunks_handed_out(0) { 49 _free_list.initialize(); 50 _free_list.set_size(G1CodeRootChunk::word_size()); | 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 26 #include "precompiled.hpp" 27 #include "code/nmethod.hpp" 28 #include "gc_implementation/g1/g1CodeCacheRemSet.hpp" 29 #include "memory/iterator.hpp" 30 31 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC 32 33 G1CodeRootChunk::G1CodeRootChunk() : _top(NULL), _next(NULL), _prev(NULL) { 34 _top = bottom(); 35 } 36 37 void G1CodeRootChunk::reset() { 38 _next = _prev = NULL; 39 _top = bottom(); 40 } 41 42 void G1CodeRootChunk::nmethods_do(CodeBlobClosure* cl) { 43 nmethod** cur = bottom(); 44 while (cur != _top) { 45 cl->do_code_blob(*cur); 46 cur++; 47 } 48 } 49 50 G1CodeRootChunkManager::G1CodeRootChunkManager() : _free_list(), _num_chunks_handed_out(0) { 51 _free_list.initialize(); 52 _free_list.set_size(G1CodeRootChunk::word_size()); |