sharedHeap.cpp revision 113
/*
* Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
# include "incls/_precompiled.incl"
# include "incls/_sharedHeap.cpp.incl"
// The set of potentially parallel tasks in strong root scanning.
// Leave this one last.
};
{
vm_exit_during_initialization("Failed necessary allocation.");
}
_sh = this; // ch is static, should be set only once.
if ((UseParNewGC ||
ParallelGCThreads > 0) {
vm_exit_during_initialization("Failed necessary allocation.");
}
}
}
void SharedHeap::set_par_threads(int t) {
_n_par_threads = t;
}
class AssertIsPermClosure: public OopClosure {
public:
}
};
void SharedHeap::change_strong_roots_parity() {
// Also set the new collection parity.
"Not in range.");
"Not in range.");
}
// General strong roots.
if (n_par_threads() == 0) change_strong_roots_parity();
// Consider perm-gen discovered lists to be strong.
}
// Global (strong) JNI handles
// All threads execute this; the individual threads are task groups.
if (ParallelGCThreads > 0) {
} else {
}
if (so & SO_AllClasses) {
} else
if (so & SO_SystemClasses) {
}
}
if (so & SO_Symbols) {
}
// Verify if the symbol table contents are in the perm gen
}
if (so & SO_Strings) {
}
// Verify if the string table contents are in the perm gen
}
if (so & SO_CodeCache) {
}
// Verify if the code cache contents are in the perm gen
}
// Roots that should point only into permanent generation.
{
if (collecting_perm_gen) {
} else {
}
}
}
if (!collecting_perm_gen) {
// All threads perform this; coordination is handled internally.
}
}
class AlwaysTrueClosure: public BoolObjectClosure {
public:
bool do_object_b(oop p) { return true; }
};
static AlwaysTrueClosure always_true;
class SkipAdjustingSharedStrings: public OopClosure {
public:
oop o = (*p);
if (!o->is_shared_readwrite()) {
}
}
};
// 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
if (UseSharedSpaces && !DumpSharedSpaces) {
} else {
}
}
_barrier_set = bs;
// Cached barrier set for fast access in oops
}
void SharedHeap::post_initialize() {
}
void SharedHeap::ref_processing_init() {
perm_gen()->ref_processor_init();
}
// Disable the posting of JVMTI VMObjectAlloc events as we
// don't want the filling of tlabs with filler arrays to be
// reported to the profiler.
// Disable low memory detector because there is no real allocation.
// It turns out that post_allocation_setup_array takes a handle, so the
// call below contains an implicit conversion. Best to free that handle
// as soon as possible.
if (word_size >= aligned_array_header_size) {
const size_t array_length =
const size_t array_length_words =
(int)array_length_words);
#ifdef ASSERT
#endif
} else {
}
}
// Some utilities.
}