sharedHeap.cpp revision 1753
2N/A * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2N/A * This code is free software; you can redistribute it and/or modify it 2N/A * under the terms of the GNU General Public License version 2 only, as 2N/A * published by the Free Software Foundation. 2N/A * This code is distributed in the hope that it will be useful, but WITHOUT 2N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 2N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 2N/A * version 2 for more details (a copy is included in the LICENSE file that 2N/A * accompanied this code). 2N/A * You should have received a copy of the GNU General Public License version 2N/A * 2 along with this work; if not, write to the Free Software Foundation, 2N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2N/A#
include "incls/_precompiled.incl" 2N/A// The set of potentially parallel tasks in strong root scanning. 2N/A // Leave this one last. 2N/A _sh =
this;
// ch is static, should be set only once. 2N/A /* are_GC_task_threads */true,
2N/A /* are_ConcurrentGC_threads */false);
2N/A // Also set the new collection parity. 2N/A // nothing particular 2N/A // General strong roots. 2N/A // Consider perm-gen discovered lists to be strong. 2N/A // Global (strong) JNI handles 2N/A // All threads execute this; the individual threads are task groups. 2N/A // Verify if the symbol table contents are in the perm gen 2N/A // Verify if the string table contents are in the perm gen // (Currently, CMSCollector uses this to do intermediate-strength collections.) // If we are collecting from class statics, but we are not going to // visit all of the CodeCache, collect from the non-perm roots if any. // This makes the code cache function temporarily as a source of strong // roots for oops, until the next major collection. // If collecting_perm_gen is true, we require that this phase will call // CodeCache::do_unloading. This will kill off nmethods with expired // weak references, such as stale invokedynamic targets. // Verify if the code cache contents are in the perm gen // Roots that should point only into permanent generation. // All threads perform this; coordination is handled internally. // Unmarked shared Strings in the StringTable (which got there due to // being in the constant pools of as-yet unloaded shared classes) were // not marked and therefore did not have their mark words preserved. // These entries are also deliberately not purged from the string // table during unloading of unmarked strings. If an identity hash // code was computed for any of these objects, it will not have been // cleared to zero during the forwarding process or by the // RecursiveAdjustSharedObjectClosure, and will be confused by the // adjusting process as a forwarding pointer. We need to skip // forwarding StringTable entries which contain unmarked shared // Strings. Actually, since shared strings won't be moving, we can // just skip adjusting any shared entries in the string table. // Global (weak) JNI handles // Cached barrier set for fast access in oops