Mercurial > hg > truffle
comparison src/share/vm/memory/space.cpp @ 6008:b632e80fc9dc
4988100: oop_verify_old_oop appears to be dead
Summary: removed oop_verify_old_oop and allow_dirty. Also reviewed by: alexlamsl@gmail.com
Reviewed-by: jmasa, jwilhelm
author | brutisso |
---|---|
date | Mon, 16 Apr 2012 08:57:18 +0200 |
parents | 3c648b9ad052 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6007:5c86f8211d1e | 6008:b632e80fc9dc |
---|---|
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(); |
1005 blocks++; | 990 blocks++; |
1006 } | 991 } |
1007 | 992 |
1008 if (objs == OBJ_SAMPLE_INTERVAL) { | 993 if (objs == OBJ_SAMPLE_INTERVAL) { |
1009 oop(p)->verify(); | 994 oop(p)->verify(); |
1010 blk._the_obj = oop(p); | |
1011 oop(p)->oop_iterate(&blk); | |
1012 objs = 0; | 995 objs = 0; |
1013 } else { | 996 } else { |
1014 objs++; | 997 objs++; |
1015 } | 998 } |
1016 prev_p = p; | 999 prev_p = p; |