1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2012, 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. |
529 st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " |
529 st->print_cr(" [" INTPTR_FORMAT ", " INTPTR_FORMAT ", " |
530 INTPTR_FORMAT ", " INTPTR_FORMAT ")", |
530 INTPTR_FORMAT ", " INTPTR_FORMAT ")", |
531 bottom(), top(), _offsets.threshold(), end()); |
531 bottom(), top(), _offsets.threshold(), end()); |
532 } |
532 } |
533 |
533 |
534 void ContiguousSpace::verify(bool allow_dirty) const { |
534 void ContiguousSpace::verify() const { |
535 HeapWord* p = bottom(); |
535 HeapWord* p = bottom(); |
536 HeapWord* t = top(); |
536 HeapWord* t = top(); |
537 HeapWord* prev_p = NULL; |
537 HeapWord* prev_p = NULL; |
538 while (p < t) { |
538 while (p < t) { |
539 oop(p)->verify(); |
539 oop(p)->verify(); |
963 { |
963 { |
964 _offsets.set_contig_space(this); |
964 _offsets.set_contig_space(this); |
965 initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle); |
965 initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle); |
966 } |
966 } |
967 |
967 |
968 |
|
969 class VerifyOldOopClosure : public OopClosure { |
|
970 public: |
|
971 oop _the_obj; |
|
972 bool _allow_dirty; |
|
973 void do_oop(oop* p) { |
|
974 _the_obj->verify_old_oop(p, _allow_dirty); |
|
975 } |
|
976 void do_oop(narrowOop* p) { |
|
977 _the_obj->verify_old_oop(p, _allow_dirty); |
|
978 } |
|
979 }; |
|
980 |
|
981 #define OBJ_SAMPLE_INTERVAL 0 |
968 #define OBJ_SAMPLE_INTERVAL 0 |
982 #define BLOCK_SAMPLE_INTERVAL 100 |
969 #define BLOCK_SAMPLE_INTERVAL 100 |
983 |
970 |
984 void OffsetTableContigSpace::verify(bool allow_dirty) const { |
971 void OffsetTableContigSpace::verify() const { |
985 HeapWord* p = bottom(); |
972 HeapWord* p = bottom(); |
986 HeapWord* prev_p = NULL; |
973 HeapWord* prev_p = NULL; |
987 VerifyOldOopClosure blk; // Does this do anything? |
|
988 blk._allow_dirty = allow_dirty; |
|
989 int objs = 0; |
974 int objs = 0; |
990 int blocks = 0; |
975 int blocks = 0; |
991 |
976 |
992 if (VerifyObjectStartArray) { |
977 if (VerifyObjectStartArray) { |
993 _offsets.verify(); |
978 _offsets.verify(); |