Quellcode-Bibliothek resolvedMethodTable.cpp
Sprache: C
/* * Copyright (c) 2017, 2021, 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. *
*/
while (true) { if (_local_table->get(thread, lookup, rmg)) { return rmg.get_res_oop();
}
WeakHandle wh(_oop_storage, rmethod_name); // The hash table takes ownership of the WeakHandle, even if it's not inserted. if (_local_table->insert(thread, lookup, wh)) {
log_insert(method); return wh.resolve();
}
}
}
staticconstdouble PREF_AVG_LIST_LEN = 2.0; // If we have as many dead items as 50% of the number of bucket staticconstdouble CLEAN_DEAD_HIGH_WATER_MARK = 0.5;
double load_factor = get_load_factor(); double dead_factor = get_dead_factor(num_dead); // We should clean/resize if we have more dead than alive, // more items than preferred load factor or // more dead items than water mark. if ((dead_factor > load_factor) ||
(load_factor > PREF_AVG_LIST_LEN) ||
(dead_factor > CLEAN_DEAD_HIGH_WATER_MARK)) {
log_debug(membername, table)("Concurrent work triggered, live factor: %g dead factor: %g",
load_factor, dead_factor);
trigger_concurrent_work();
}
}
// It is called at safepoint only for RedefineClasses void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); // For each entry in RMT, change to new method
AdjustMethodEntries adjust(trace_name_printed);
_local_table->do_safepoint_scan(adjust);
} #endif// INCLUDE_JVMTI
void ResolvedMethodTable::verify() {
VerifyResolvedMethod vcs; if (!_local_table->try_scan(Thread::current(), vcs)) {
log_info(membername, table)("verify unavailable at this moment");
}
}
¤ 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.0.2Bemerkung:
(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.