/* * Copyright (c) 2017, 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.
*/
// Find all oop relocations
RelocIterator iter(nm); while (iter.next()) { if (iter.type() != relocInfo::oop_type) { // Not an oop continue;
}
oop_Relocation* r = iter.oop_reloc();
if (!r->oop_is_immediate()) { // Non-immediate oop found
non_immediate_oops = true; continue;
}
if (r->oop_value() != NULL) { // Non-NULL immediate oop found. NULL oops can safely be // ignored since the method will be re-registered if they // are later patched to be non-NULL.
immediate_oops.push(r->oop_addr());
}
}
// Attach GC data to nmethod
ZNMethodData* data = gc_data(nm); if (data == NULL) {
data = new ZNMethodData();
set_gc_data(nm, data);
}
// Attach oops in GC data
ZNMethodDataOops* const new_oops = ZNMethodDataOops::create(immediate_oops, non_immediate_oops);
ZNMethodDataOops* const old_oops = data->swap_oops(new_oops);
ZNMethodDataOops::destroy(old_oops);
}
// Process immediate oops
{
oop** const begin = oops->immediates_begin();
oop** const end = oops->immediates_end(); for (oop** p = begin; p < end; p++) { if (*p != Universe::non_oop_word()) {
cl->do_oop(*p);
}
}
}
// Process non-immediate oops if (oops->has_non_immediates()) {
nm->fix_oop_relocations();
}
}
class ZNMethodOopClosure : public OopClosure { public: virtualvoid do_oop(oop* p) { if (ZResurrection::is_blocked()) {
ZBarrier::keep_alive_barrier_on_phantom_root_oop_field(p);
} else {
ZBarrier::load_barrier_on_root_oop_field(p);
}
}
// Cleaning failed because we ran out of transitional IC stubs, // so we have to refill and try again. Refilling requires taking // a safepoint, so we temporarily leave the suspendible thread set.
SuspendibleThreadSetLeaver sts;
InlineCacheBuffer::refill_ic_stubs();
}
}
¤ 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.1Bemerkung:
(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 und die Messung sind noch experimentell.