Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.inline.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 6cd6d394f280 |
children | 63a4eb8bcd23 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 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. |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 inline void CMSCollector::save_sweep_limits() { | 267 inline void CMSCollector::save_sweep_limits() { |
268 _cmsGen->save_sweep_limit(); | 268 _cmsGen->save_sweep_limit(); |
269 _permGen->save_sweep_limit(); | |
270 } | 269 } |
271 | 270 |
272 inline bool CMSCollector::is_dead_obj(oop obj) const { | 271 inline bool CMSCollector::is_dead_obj(oop obj) const { |
273 HeapWord* addr = (HeapWord*)obj; | 272 HeapWord* addr = (HeapWord*)obj; |
274 assert((_cmsGen->cmsSpace()->is_in_reserved(addr) | 273 assert((_cmsGen->cmsSpace()->is_in_reserved(addr) |
275 && _cmsGen->cmsSpace()->block_is_obj(addr)) | 274 && _cmsGen->cmsSpace()->block_is_obj(addr)), |
276 || | |
277 (_permGen->cmsSpace()->is_in_reserved(addr) | |
278 && _permGen->cmsSpace()->block_is_obj(addr)), | |
279 "must be object"); | 275 "must be object"); |
280 return should_unload_classes() && | 276 return should_unload_classes() && |
281 _collectorState == Sweeping && | 277 _collectorState == Sweeping && |
282 !_markBitMap.isMarked(addr); | 278 !_markBitMap.isMarked(addr); |
283 } | 279 } |
449 if (ConcurrentMarkSweepThread::should_yield() && | 445 if (ConcurrentMarkSweepThread::should_yield() && |
450 !_collector->foregroundGCIsActive() && | 446 !_collector->foregroundGCIsActive() && |
451 _yield) { | 447 _yield) { |
452 do_yield_work(); | 448 do_yield_work(); |
453 } | 449 } |
450 } | |
451 | |
452 inline void PushOrMarkClosure::do_yield_check() { | |
453 _parent->do_yield_check(); | |
454 } | |
455 | |
456 inline void Par_PushOrMarkClosure::do_yield_check() { | |
457 _parent->do_yield_check(); | |
454 } | 458 } |
455 | 459 |
456 // Return value of "true" indicates that the on-going preclean | 460 // Return value of "true" indicates that the on-going preclean |
457 // should be aborted. | 461 // should be aborted. |
458 inline bool ScanMarkedObjectsAgainCarefullyClosure::do_yield_check() { | 462 inline bool ScanMarkedObjectsAgainCarefullyClosure::do_yield_check() { |