/* * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
intptr_t oopDesc::slow_identity_hash() { // slow case; we have to acquire the micro lock in order to locate the header
Thread* current = Thread::current(); return ObjectSynchronizer::FastHashCode(current, this);
}
// used only for asserts and guarantees bool oopDesc::is_oop(oop obj, bool ignore_mark_word) { if (!Universe::heap()->is_oop(obj)) { returnfalse;
}
// Header verification: the mark is typically non-zero. If we're // at a safepoint, it must not be zero. // Outside of a safepoint, the header could be changing (for example, // another thread could be inflating a lock on this object). if (ignore_mark_word) { returntrue;
} if (obj->mark().value() != 0) { returntrue;
} return !SafepointSynchronize::is_at_safepoint();
}
// used only for asserts and guarantees bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) { return obj == NULL ? true : is_oop(obj, ignore_mark_word);
}
bool oopDesc::size_might_change() { // UseParallelGC and UseG1GC can change the length field // of an "old copy" of an object array in the young gen so it indicates // the grey portion of an already copied array. This will cause the first // disjunct below to fail if the two comparands are computed across such // a concurrent change. return Universe::heap()->is_gc_active() && is_objArray() && is_forwarded() && (UseParallelGC || UseG1GC);
} #endif
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.