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 #include "precompiled.hpp"
26 #include "gc/parallel/cardTableExtension.hpp"
27 #include "gc/parallel/gcTaskManager.hpp"
28 #include "gc/parallel/objectStartArray.inline.hpp"
29 #include "gc/parallel/parallelScavengeHeap.hpp"
30 #include "gc/parallel/psPromotionManager.inline.hpp"
31 #include "gc/parallel/psScavenge.hpp"
32 #include "gc/parallel/psTasks.hpp"
33 #include "gc/parallel/psYoungGen.hpp"
34 #include "oops/oop.inline.hpp"
35 #include "runtime/prefetch.inline.hpp"
36
37 // Checks an individual oop for missing precise marks. Mark
38 // may be either dirty or newgen.
39 class CheckForUnmarkedOops : public OopClosure {
40 private:
41 PSYoungGen* _young_gen;
42 CardTableExtension* _card_table;
43 HeapWord* _unmarked_addr;
44
45 protected:
46 template <class T> void do_oop_work(T* p) {
47 oop obj = oopDesc::load_decode_heap_oop(p);
48 if (_young_gen->is_in_reserved(obj) &&
49 !_card_table->addr_is_marked_imprecise(p)) {
50 // Don't overwrite the first missing card mark
51 if (_unmarked_addr == NULL) {
52 _unmarked_addr = (HeapWord*)p;
53 }
54 }
55 }
|
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 #include "precompiled.hpp"
26 #include "gc/parallel/cardTableExtension.hpp"
27 #include "gc/parallel/gcTaskManager.hpp"
28 #include "gc/parallel/objectStartArray.inline.hpp"
29 #include "gc/parallel/parallelScavengeHeap.hpp"
30 #include "gc/parallel/psPromotionManager.inline.hpp"
31 #include "gc/parallel/psScavenge.hpp"
32 #include "gc/parallel/psTasks.hpp"
33 #include "gc/parallel/psYoungGen.hpp"
34 #include "oops/oop.inline.hpp"
35 #include "runtime/prefetch.inline.hpp"
36 #include "utilities/align.hpp"
37
38 // Checks an individual oop for missing precise marks. Mark
39 // may be either dirty or newgen.
40 class CheckForUnmarkedOops : public OopClosure {
41 private:
42 PSYoungGen* _young_gen;
43 CardTableExtension* _card_table;
44 HeapWord* _unmarked_addr;
45
46 protected:
47 template <class T> void do_oop_work(T* p) {
48 oop obj = oopDesc::load_decode_heap_oop(p);
49 if (_young_gen->is_in_reserved(obj) &&
50 !_card_table->addr_is_marked_imprecise(p)) {
51 // Don't overwrite the first missing card mark
52 if (_unmarked_addr == NULL) {
53 _unmarked_addr = (HeapWord*)p;
54 }
55 }
56 }
|