annotate src/share/vm/memory/compactingPermGenGen.cpp @ 1051:26f1542097f1

6801625: CDS: HeapDump tests crash with internal error in compactingPermGenGen.cpp Summary: Allow iteration over the shared spaces when using CDS, repealing previous proscription. Deferred further required CDS-related cleanups of perm gen to CR 6897789. Reviewed-by: phh, jmasa
author ysr
date Tue, 03 Nov 2009 16:43:16 -0800
parents 5251a9cd8eb8
children
rev   line source
duke@0 1 /*
xdono@196 2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
duke@0 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 20 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 21 * have any questions.
duke@0 22 *
duke@0 23 */
duke@0 24
duke@0 25 #include "incls/_precompiled.incl"
duke@0 26 #include "incls/_compactingPermGenGen.cpp.incl"
duke@0 27
duke@0 28
dcubed@47 29 // An ObjectClosure helper: Recursively adjust all pointers in an object
dcubed@47 30 // and all objects by referenced it. Clear marks on objects in order to
dcubed@47 31 // prevent visiting any object twice. This helper is used when the
dcubed@47 32 // RedefineClasses() API has been called.
dcubed@47 33
dcubed@47 34 class AdjustSharedObjectClosure : public ObjectClosure {
dcubed@47 35 public:
dcubed@47 36 void do_object(oop obj) {
dcubed@47 37 if (obj->is_shared_readwrite()) {
dcubed@47 38 if (obj->mark()->is_marked()) {
dcubed@47 39 obj->init_mark(); // Don't revisit this object.
dcubed@47 40 obj->adjust_pointers(); // Adjust this object's references.
dcubed@47 41 }
dcubed@47 42 }
dcubed@47 43 }
dcubed@47 44 };
dcubed@47 45
dcubed@47 46
dcubed@47 47 // An OopClosure helper: Recursively adjust all pointers in an object
dcubed@47 48 // and all objects by referenced it. Clear marks on objects in order
dcubed@47 49 // to prevent visiting any object twice.
duke@0 50
duke@0 51 class RecursiveAdjustSharedObjectClosure : public OopClosure {
coleenp@113 52 protected:
coleenp@113 53 template <class T> inline void do_oop_work(T* p) {
coleenp@113 54 oop obj = oopDesc::load_decode_heap_oop_not_null(p);
duke@0 55 if (obj->is_shared_readwrite()) {
duke@0 56 if (obj->mark()->is_marked()) {
duke@0 57 obj->init_mark(); // Don't revisit this object.
duke@0 58 obj->oop_iterate(this); // Recurse - adjust objects referenced.
duke@0 59 obj->adjust_pointers(); // Adjust this object's references.
duke@0 60
duke@0 61 // Special case: if a class has a read-only constant pool,
duke@0 62 // then the read-write objects referenced by the pool must
duke@0 63 // have their marks reset.
duke@0 64
duke@0 65 if (obj->klass() == Universe::instanceKlassKlassObj()) {
duke@0 66 instanceKlass* ik = instanceKlass::cast((klassOop)obj);
duke@0 67 constantPoolOop cp = ik->constants();
duke@0 68 if (cp->is_shared_readonly()) {
duke@0 69 cp->oop_iterate(this);
duke@0 70 }
duke@0 71 }
duke@0 72 }
duke@0 73 }
coleenp@113 74 }
coleenp@113 75 public:
coleenp@113 76 virtual void do_oop(oop* p) { RecursiveAdjustSharedObjectClosure::do_oop_work(p); }
coleenp@113 77 virtual void do_oop(narrowOop* p) { RecursiveAdjustSharedObjectClosure::do_oop_work(p); }
duke@0 78 };
duke@0 79
duke@0 80
duke@0 81 // We need to go through all placeholders in the system dictionary and
duke@0 82 // try to resolve them into shared classes. Other threads might be in
duke@0 83 // the process of loading a shared class and have strong roots on
duke@0 84 // their stack to the class without having added the class to the
duke@0 85 // dictionary yet. This means the class will be marked during phase 1
duke@0 86 // but will not be unmarked during the application of the
duke@0 87 // RecursiveAdjustSharedObjectClosure to the SystemDictionary. Note
duke@0 88 // that we must not call find_shared_class with non-read-only symbols
duke@0 89 // as doing so can cause hash codes to be computed, destroying
duke@0 90 // forwarding pointers.
duke@0 91 class TraversePlaceholdersClosure : public OopClosure {
coleenp@113 92 protected:
coleenp@113 93 template <class T> inline void do_oop_work(T* p) {
coleenp@113 94 oop obj = oopDesc::load_decode_heap_oop_not_null(p);
duke@0 95 if (obj->klass() == Universe::symbolKlassObj() &&
duke@0 96 obj->is_shared_readonly()) {
duke@0 97 symbolHandle sym((symbolOop) obj);
duke@0 98 oop k = SystemDictionary::find_shared_class(sym);
duke@0 99 if (k != NULL) {
duke@0 100 RecursiveAdjustSharedObjectClosure clo;
duke@0 101 clo.do_oop(&k);
duke@0 102 }
duke@0 103 }
duke@0 104 }
coleenp@113 105 public:
coleenp@113 106 virtual void do_oop(oop* p) { TraversePlaceholdersClosure::do_oop_work(p); }
coleenp@113 107 virtual void do_oop(narrowOop* p) { TraversePlaceholdersClosure::do_oop_work(p); }
coleenp@113 108
duke@0 109 };
duke@0 110
duke@0 111
duke@0 112 void CompactingPermGenGen::initialize_performance_counters() {
duke@0 113
duke@0 114 const char* gen_name = "perm";
duke@0 115
duke@0 116 // Generation Counters - generation 2, 1 subspace
duke@0 117 _gen_counters = new GenerationCounters(gen_name, 2, 1, &_virtual_space);
duke@0 118
duke@0 119 _space_counters = new CSpaceCounters(gen_name, 0,
duke@0 120 _virtual_space.reserved_size(),
duke@0 121 _the_space, _gen_counters);
duke@0 122 }
duke@0 123
duke@0 124 void CompactingPermGenGen::update_counters() {
duke@0 125 if (UsePerfData) {
duke@0 126 _space_counters->update_all();
duke@0 127 _gen_counters->update_all();
duke@0 128 }
duke@0 129 }
duke@0 130
duke@0 131
duke@0 132 CompactingPermGenGen::CompactingPermGenGen(ReservedSpace rs,
duke@0 133 ReservedSpace shared_rs,
duke@0 134 size_t initial_byte_size,
duke@0 135 int level, GenRemSet* remset,
duke@0 136 ContiguousSpace* space,
duke@0 137 PermanentGenerationSpec* spec_) :
duke@0 138 OneContigSpaceCardGeneration(rs, initial_byte_size, MinPermHeapExpansion,
duke@0 139 level, remset, space) {
duke@0 140
duke@0 141 set_spec(spec_);
duke@0 142 if (!UseSharedSpaces && !DumpSharedSpaces) {
duke@0 143 spec()->disable_sharing();
duke@0 144 }
duke@0 145
duke@0 146 // Break virtual space into address ranges for all spaces.
duke@0 147
duke@0 148 if (spec()->enable_shared_spaces()) {
duke@0 149 shared_end = (HeapWord*)(shared_rs.base() + shared_rs.size());
duke@0 150 misccode_end = shared_end;
duke@0 151 misccode_bottom = misccode_end - heap_word_size(spec()->misc_code_size());
duke@0 152 miscdata_end = misccode_bottom;
duke@0 153 miscdata_bottom = miscdata_end - heap_word_size(spec()->misc_data_size());
duke@0 154 readwrite_end = miscdata_bottom;
duke@0 155 readwrite_bottom =
duke@0 156 readwrite_end - heap_word_size(spec()->read_write_size());
duke@0 157 readonly_end = readwrite_bottom;
duke@0 158 readonly_bottom =
duke@0 159 readonly_end - heap_word_size(spec()->read_only_size());
duke@0 160 shared_bottom = readonly_bottom;
duke@0 161 unshared_end = shared_bottom;
duke@0 162 assert((char*)shared_bottom == shared_rs.base(), "shared space mismatch");
duke@0 163 } else {
duke@0 164 shared_end = (HeapWord*)(rs.base() + rs.size());
duke@0 165 misccode_end = shared_end;
duke@0 166 misccode_bottom = shared_end;
duke@0 167 miscdata_end = shared_end;
duke@0 168 miscdata_bottom = shared_end;
duke@0 169 readwrite_end = shared_end;
duke@0 170 readwrite_bottom = shared_end;
duke@0 171 readonly_end = shared_end;
duke@0 172 readonly_bottom = shared_end;
duke@0 173 shared_bottom = shared_end;
duke@0 174 unshared_end = shared_bottom;
duke@0 175 }
duke@0 176 unshared_bottom = (HeapWord*) rs.base();
duke@0 177
duke@0 178 // Verify shared and unshared spaces adjacent.
duke@0 179 assert((char*)shared_bottom == rs.base()+rs.size(), "shared space mismatch");
duke@0 180 assert(unshared_end > unshared_bottom, "shared space mismatch");
duke@0 181
duke@0 182 // Split reserved memory into pieces.
duke@0 183
duke@0 184 ReservedSpace ro_rs = shared_rs.first_part(spec()->read_only_size(),
duke@0 185 UseSharedSpaces);
duke@0 186 ReservedSpace tmp_rs1 = shared_rs.last_part(spec()->read_only_size());
duke@0 187 ReservedSpace rw_rs = tmp_rs1.first_part(spec()->read_write_size(),
duke@0 188 UseSharedSpaces);
duke@0 189 ReservedSpace tmp_rs2 = tmp_rs1.last_part(spec()->read_write_size());
duke@0 190 ReservedSpace md_rs = tmp_rs2.first_part(spec()->misc_data_size(),
duke@0 191 UseSharedSpaces);
duke@0 192 ReservedSpace mc_rs = tmp_rs2.last_part(spec()->misc_data_size());
duke@0 193
duke@0 194 _shared_space_size = spec()->read_only_size()
duke@0 195 + spec()->read_write_size()
duke@0 196 + spec()->misc_data_size()
duke@0 197 + spec()->misc_code_size();
duke@0 198
duke@0 199 // Allocate the unshared (default) space.
duke@0 200 _the_space = new ContigPermSpace(_bts,
duke@0 201 MemRegion(unshared_bottom, heap_word_size(initial_byte_size)));
duke@0 202 if (_the_space == NULL)
duke@0 203 vm_exit_during_initialization("Could not allocate an unshared"
duke@0 204 " CompactingPermGen Space");
duke@0 205
duke@0 206 // Allocate shared spaces
duke@0 207 if (spec()->enable_shared_spaces()) {
duke@0 208
duke@0 209 // If mapping a shared file, the space is not committed, don't
duke@0 210 // mangle.
duke@0 211 NOT_PRODUCT(bool old_ZapUnusedHeapArea = ZapUnusedHeapArea;)
duke@0 212 NOT_PRODUCT(if (UseSharedSpaces) ZapUnusedHeapArea = false;)
duke@0 213
duke@0 214 // Commit the memory behind the shared spaces if dumping (not
duke@0 215 // mapping).
duke@0 216 if (DumpSharedSpaces) {
duke@0 217 _ro_vs.initialize(ro_rs, spec()->read_only_size());
duke@0 218 _rw_vs.initialize(rw_rs, spec()->read_write_size());
duke@0 219 _md_vs.initialize(md_rs, spec()->misc_data_size());
duke@0 220 _mc_vs.initialize(mc_rs, spec()->misc_code_size());
duke@0 221 }
duke@0 222
duke@0 223 // Allocate the shared spaces.
duke@0 224 _ro_bts = new BlockOffsetSharedArray(
duke@0 225 MemRegion(readonly_bottom,
duke@0 226 heap_word_size(spec()->read_only_size())),
duke@0 227 heap_word_size(spec()->read_only_size()));
duke@0 228 _ro_space = new OffsetTableContigSpace(_ro_bts,
duke@0 229 MemRegion(readonly_bottom, readonly_end));
duke@0 230 _rw_bts = new BlockOffsetSharedArray(
duke@0 231 MemRegion(readwrite_bottom,
duke@0 232 heap_word_size(spec()->read_write_size())),
duke@0 233 heap_word_size(spec()->read_write_size()));
duke@0 234 _rw_space = new OffsetTableContigSpace(_rw_bts,
duke@0 235 MemRegion(readwrite_bottom, readwrite_end));
duke@0 236
duke@0 237 // Restore mangling flag.
duke@0 238 NOT_PRODUCT(ZapUnusedHeapArea = old_ZapUnusedHeapArea;)
duke@0 239
duke@0 240 if (_ro_space == NULL || _rw_space == NULL)
duke@0 241 vm_exit_during_initialization("Could not allocate a shared space");
duke@0 242
duke@0 243 // Cover both shared spaces entirely with cards.
duke@0 244 _rs->resize_covered_region(MemRegion(readonly_bottom, readwrite_end));
duke@0 245
duke@0 246 if (UseSharedSpaces) {
duke@0 247
duke@0 248 // Map in the regions in the shared file.
duke@0 249 FileMapInfo* mapinfo = FileMapInfo::current_info();
duke@0 250 size_t image_alignment = mapinfo->alignment();
duke@0 251 CollectedHeap* ch = Universe::heap();
duke@0 252 if ((!mapinfo->map_space(ro, ro_rs, _ro_space)) ||
duke@0 253 (!mapinfo->map_space(rw, rw_rs, _rw_space)) ||
duke@0 254 (!mapinfo->map_space(md, md_rs, NULL)) ||
duke@0 255 (!mapinfo->map_space(mc, mc_rs, NULL)) ||
duke@0 256 // check the alignment constraints
duke@0 257 (ch == NULL || ch->kind() != CollectedHeap::GenCollectedHeap ||
duke@0 258 image_alignment !=
duke@0 259 ((GenCollectedHeap*)ch)->gen_policy()->max_alignment())) {
duke@0 260 // Base addresses didn't match; skip sharing, but continue
duke@0 261 shared_rs.release();
duke@0 262 spec()->disable_sharing();
duke@0 263 // If -Xshare:on is specified, print out the error message and exit VM,
duke@0 264 // otherwise, set UseSharedSpaces to false and continue.
duke@0 265 if (RequireSharedSpaces) {
duke@0 266 vm_exit_during_initialization("Unable to use shared archive.", NULL);
duke@0 267 } else {
duke@0 268 FLAG_SET_DEFAULT(UseSharedSpaces, false);
duke@0 269 }
duke@0 270
duke@0 271 // Note: freeing the block offset array objects does not
duke@0 272 // currently free up the underlying storage.
duke@0 273 delete _ro_bts;
duke@0 274 _ro_bts = NULL;
duke@0 275 delete _ro_space;
duke@0 276 _ro_space = NULL;
duke@0 277 delete _rw_bts;
duke@0 278 _rw_bts = NULL;
duke@0 279 delete _rw_space;
duke@0 280 _rw_space = NULL;
duke@0 281 shared_end = (HeapWord*)(rs.base() + rs.size());
duke@0 282 _rs->resize_covered_region(MemRegion(shared_bottom, shared_bottom));
duke@0 283 }
duke@0 284 }
duke@0 285
duke@0 286 // Reserved region includes shared spaces for oop.is_in_reserved().
duke@0 287 _reserved.set_end(shared_end);
duke@0 288
duke@0 289 } else {
duke@0 290 _ro_space = NULL;
duke@0 291 _rw_space = NULL;
duke@0 292 }
duke@0 293 }
duke@0 294
duke@0 295
duke@0 296 // Do a complete scan of the shared read write space to catch all
duke@0 297 // objects which contain references to any younger generation. Forward
duke@0 298 // the pointers. Avoid space_iterate, as actually visiting all the
duke@0 299 // objects in the space will page in more objects than we need.
duke@0 300 // Instead, use the system dictionary as strong roots into the read
duke@0 301 // write space.
dcubed@47 302 //
dcubed@47 303 // If a RedefineClasses() call has been made, then we have to iterate
dcubed@47 304 // over the entire shared read-write space in order to find all the
dcubed@47 305 // objects that need to be forwarded. For example, it is possible for
dcubed@47 306 // an nmethod to be found and marked in GC phase-1 only for the nmethod
dcubed@47 307 // to be freed by the time we reach GC phase-3. The underlying method
dcubed@47 308 // is still marked, but we can't (easily) find it in GC phase-3 so we
dcubed@47 309 // blow up in GC phase-4. With RedefineClasses() we want replaced code
dcubed@47 310 // (EMCP or obsolete) to go away (i.e., be collectible) once it is no
dcubed@47 311 // longer being executed by any thread so we keep minimal attachments
dcubed@47 312 // to the replaced code. However, we can't guarantee when those EMCP
dcubed@47 313 // or obsolete methods will be collected so they may still be out there
dcubed@47 314 // even after we've severed our minimal attachments.
duke@0 315
duke@0 316 void CompactingPermGenGen::pre_adjust_pointers() {
duke@0 317 if (spec()->enable_shared_spaces()) {
dcubed@47 318 if (JvmtiExport::has_redefined_a_class()) {
dcubed@47 319 // RedefineClasses() requires a brute force approach
dcubed@47 320 AdjustSharedObjectClosure blk;
dcubed@47 321 rw_space()->object_iterate(&blk);
dcubed@47 322 } else {
dcubed@47 323 RecursiveAdjustSharedObjectClosure blk;
dcubed@47 324 Universe::oops_do(&blk);
dcubed@47 325 StringTable::oops_do(&blk);
dcubed@47 326 SystemDictionary::always_strong_classes_do(&blk);
dcubed@47 327 TraversePlaceholdersClosure tpc;
dcubed@47 328 SystemDictionary::placeholders_do(&tpc);
dcubed@47 329 }
duke@0 330 }
duke@0 331 }
duke@0 332
duke@0 333
duke@0 334 #ifdef ASSERT
duke@0 335 class VerifyMarksClearedClosure : public ObjectClosure {
duke@0 336 public:
duke@0 337 void do_object(oop obj) {
duke@0 338 assert(SharedSkipVerify || !obj->mark()->is_marked(),
duke@0 339 "Shared oop still marked?");
duke@0 340 }
duke@0 341 };
duke@0 342 #endif
duke@0 343
duke@0 344
duke@0 345 void CompactingPermGenGen::post_compact() {
duke@0 346 #ifdef ASSERT
duke@0 347 if (!SharedSkipVerify && spec()->enable_shared_spaces()) {
duke@0 348 VerifyMarksClearedClosure blk;
duke@0 349 rw_space()->object_iterate(&blk);
duke@0 350 }
duke@0 351 #endif
duke@0 352 }
duke@0 353
duke@0 354
ysr@1051 355 // Do not use in time-critical operations due to the possibility of paging
ysr@1051 356 // in otherwise untouched or previously unread portions of the perm gen,
ysr@1051 357 // for instance, the shared spaces. NOTE: Because CompactingPermGenGen
ysr@1051 358 // derives from OneContigSpaceCardGeneration which is supposed to have a
ysr@1051 359 // single space, and does not override its object_iterate() method,
ysr@1051 360 // object iteration via that interface does not look at the objects in
ysr@1051 361 // the shared spaces when using CDS. This should be fixed; see CR 6897798.
duke@0 362 void CompactingPermGenGen::space_iterate(SpaceClosure* blk, bool usedOnly) {
duke@0 363 OneContigSpaceCardGeneration::space_iterate(blk, usedOnly);
duke@0 364 if (spec()->enable_shared_spaces()) {
duke@0 365 // Making the rw_space walkable will page in the entire space, and
ysr@1051 366 // is to be avoided in the case of time-critical operations.
ysr@1051 367 // However, this is required for Verify and heap dump operations.
duke@0 368 blk->do_space(ro_space());
duke@0 369 blk->do_space(rw_space());
duke@0 370 }
duke@0 371 }
duke@0 372
duke@0 373
duke@0 374 void CompactingPermGenGen::print_on(outputStream* st) const {
duke@0 375 OneContigSpaceCardGeneration::print_on(st);
duke@0 376 if (spec()->enable_shared_spaces()) {
duke@0 377 st->print(" ro");
duke@0 378 ro_space()->print_on(st);
duke@0 379 st->print(" rw");
duke@0 380 rw_space()->print_on(st);
duke@0 381 } else {
duke@0 382 st->print_cr("No shared spaces configured.");
duke@0 383 }
duke@0 384 }
duke@0 385
duke@0 386
duke@0 387 // References from the perm gen to the younger generation objects may
duke@0 388 // occur in static fields in Java classes or in constant pool references
duke@0 389 // to String objects.
duke@0 390
duke@0 391 void CompactingPermGenGen::younger_refs_iterate(OopsInGenClosure* blk) {
duke@0 392 OneContigSpaceCardGeneration::younger_refs_iterate(blk);
duke@0 393 if (spec()->enable_shared_spaces()) {
duke@0 394 blk->set_generation(this);
duke@0 395 // ro_space has no younger gen refs.
duke@0 396 _rs->younger_refs_in_space_iterate(rw_space(), blk);
duke@0 397 blk->reset_generation();
duke@0 398 }
duke@0 399 }
duke@0 400
duke@0 401
duke@0 402 // Shared spaces are addressed in pre_adjust_pointers.
duke@0 403 void CompactingPermGenGen::adjust_pointers() {
duke@0 404 the_space()->adjust_pointers();
duke@0 405 }
duke@0 406
duke@0 407
duke@0 408 void CompactingPermGenGen::compact() {
duke@0 409 the_space()->compact();
duke@0 410 }
duke@0 411
duke@0 412
duke@0 413 size_t CompactingPermGenGen::contiguous_available() const {
duke@0 414 // Don't include shared spaces.
duke@0 415 return OneContigSpaceCardGeneration::contiguous_available()
duke@0 416 - _shared_space_size;
duke@0 417 }
duke@0 418
duke@0 419 size_t CompactingPermGenGen::max_capacity() const {
duke@0 420 // Don't include shared spaces.
duke@0 421 assert(UseSharedSpaces || (_shared_space_size == 0),
duke@0 422 "If not used, the size of shared spaces should be 0");
duke@0 423 return OneContigSpaceCardGeneration::max_capacity()
duke@0 424 - _shared_space_size;
duke@0 425 }
duke@0 426
duke@0 427
duke@0 428 // No young generation references, clear this generation's main space's
duke@0 429 // card table entries. Do NOT clear the card table entries for the
duke@0 430 // read-only space (always clear) or the read-write space (valuable
duke@0 431 // information).
duke@0 432
duke@0 433 void CompactingPermGenGen::clear_remembered_set() {
duke@0 434 _rs->clear(MemRegion(the_space()->bottom(), the_space()->end()));
duke@0 435 }
duke@0 436
duke@0 437
duke@0 438 // Objects in this generation's main space may have moved, invalidate
duke@0 439 // that space's cards. Do NOT invalidate the card table entries for the
duke@0 440 // read-only or read-write spaces, as those objects never move.
duke@0 441
duke@0 442 void CompactingPermGenGen::invalidate_remembered_set() {
duke@0 443 _rs->invalidate(used_region());
duke@0 444 }
duke@0 445
duke@0 446
duke@0 447 void CompactingPermGenGen::verify(bool allow_dirty) {
duke@0 448 the_space()->verify(allow_dirty);
duke@0 449 if (!SharedSkipVerify && spec()->enable_shared_spaces()) {
duke@0 450 ro_space()->verify(allow_dirty);
duke@0 451 rw_space()->verify(allow_dirty);
duke@0 452 }
duke@0 453 }
duke@0 454
duke@0 455
duke@0 456 HeapWord* CompactingPermGenGen::unshared_bottom;
duke@0 457 HeapWord* CompactingPermGenGen::unshared_end;
duke@0 458 HeapWord* CompactingPermGenGen::shared_bottom;
duke@0 459 HeapWord* CompactingPermGenGen::shared_end;
duke@0 460 HeapWord* CompactingPermGenGen::readonly_bottom;
duke@0 461 HeapWord* CompactingPermGenGen::readonly_end;
duke@0 462 HeapWord* CompactingPermGenGen::readwrite_bottom;
duke@0 463 HeapWord* CompactingPermGenGen::readwrite_end;
duke@0 464 HeapWord* CompactingPermGenGen::miscdata_bottom;
duke@0 465 HeapWord* CompactingPermGenGen::miscdata_end;
duke@0 466 HeapWord* CompactingPermGenGen::misccode_bottom;
duke@0 467 HeapWord* CompactingPermGenGen::misccode_end;
duke@0 468
duke@0 469 // JVM/TI RedefineClasses() support:
duke@0 470 bool CompactingPermGenGen::remap_shared_readonly_as_readwrite() {
duke@0 471 assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
duke@0 472
duke@0 473 if (UseSharedSpaces) {
duke@0 474 // remap the shared readonly space to shared readwrite, private
duke@0 475 FileMapInfo* mapinfo = FileMapInfo::current_info();
duke@0 476 if (!mapinfo->remap_shared_readonly_as_readwrite()) {
duke@0 477 return false;
duke@0 478 }
duke@0 479 }
duke@0 480 return true;
duke@0 481 }
duke@0 482
duke@0 483 void** CompactingPermGenGen::_vtbl_list;