g1RemSet.hpp revision 890
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * This code is free software; you can redistribute it and/or modify it
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * under the terms of the GNU General Public License version 2 only, as
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * published by the Free Software Foundation.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * This code is distributed in the hope that it will be useful, but WITHOUT
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * version 2 for more details (a copy is included in the LICENSE file that
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * accompanied this code).
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * You should have received a copy of the GNU General Public License version
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * 2 along with this work; if not, write to the Free Software Foundation,
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * CA 95054 USA or visit www.sun.com if you need additional information or
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy * have any questions.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy// A G1RemSet provides ways of iterating over pointers into a selected
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy// collection set.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // Invoke "blk->do_oop" on all pointers into the CS in object in regions
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // outside the CS (having invoked "blk->set_region" to set the "from"
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // region correctly beforehand.) The "worker_i" param is for the
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // parallel case where the number of the worker thread calling this
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // function can be helpful in partitioning the work to be done. It
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // should be the same as the "i" passed to the calling thread's
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy // work(i) function. In the sequential case this param will be ingored.
f38cb554a534c6df738be3f4d23327e69888e634John Wren Kennedy virtual void oops_into_collection_set_do(OopsInHeapRegionClosure* blk,
virtual void prepare_for_oops_into_collection_set_do() = 0;
virtual void cleanup_after_oops_into_collection_set_do() = 0;
virtual void print_summary_info() {}
virtual void prepare_for_verify() {};
int worker_i);
void prepare_for_oops_into_collection_set_do() {}
enum SomePrivateConstants {
UpdateRStoMergeSync = 0,
SeqTask = 0,
if (UseCompressedOops) {
void cleanupHRRS();
~HRInto_G1RemSet();
int worker_i);
if (UseCompressedOops) {
virtual void print_summary_info();
virtual void prepare_for_verify();
#define G1_REM_SET_LOGGING 0
int _n;
int n() { return _n; };
int _worker_i;
template <class T> void do_oop_work(T* p);
bool apply_to_weak_ref_discovered_field() { return true; }