/* * Copyright (c) 2021, 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. *
*/
inline oop stackChunkOopDesc::cont() const { return UseCompressedOops ? cont<narrowOop>() : cont<oop>(); /* jdk_internal_vm_StackChunk::cont(as_oop()); */ } template<typename P> inline oop stackChunkOopDesc::cont() const { // The state of the cont oop is used by ZCollectedHeap::requires_barriers, // to determine the age of the stackChunkOopDesc. For that to work, it is // only the GC that is allowed to perform a load barrier on the oop. // This function is used by non-GC code and therfore create a stack-local // copy on the oop and perform the load barrier on that copy instead.
oop obj = jdk_internal_vm_StackChunk::cont_raw<P>(as_oop());
obj = (oop)NativeAccess<>::oop_load(&obj); return obj;
} inlinevoid stackChunkOopDesc::set_cont(oop value) { jdk_internal_vm_StackChunk::set_cont(this, value); } template<typename P> inlinevoid stackChunkOopDesc::set_cont_raw(oop value) { jdk_internal_vm_StackChunk::set_cont_raw<P>(this, value); } template<DecoratorSet decorators> inlinevoid stackChunkOopDesc::set_cont_access(oop value) { jdk_internal_vm_StackChunk::set_cont_access<decorators>(this, value); }
should_continue = closure->do_frame(f, &full_map);
f.next(map);
f.handle_deopted(); // the stub caller might be deoptimized (as it's not at a call)
}
assert(!f.is_stub(), "");
for(; should_continue && !f.is_done(); f.next(map)) { if (frame_kind == ChunkFrames::Mixed) { // in slow mode we might freeze deoptimized frames
f.handle_deopted();
}
should_continue = closure->do_frame(f, map);
}
}
// the offsets are saved in the map after going through relativize_usp_offset, so they are sp - loc, in words
intptr_t offset = (intptr_t)map->location(reg, nullptr); // see usp_offset_to_index for the chunk case
intptr_t* base = derelativize_address(fr.offset_sp()); return (address)(base - offset);
}
#if !(defined(AMD64) || defined(AARCH64) || defined(RISCV64) || defined(PPC64)) || defined(ZERO) // Suppress compilation warning-as-error on unimplemented architectures // that stub out arch-specific methods. Some compilers are smart enough // to figure out the argument is always null and then warn about it. if (to != nullptr) #endif
memcpy(to, from, size << LogBytesPerWord);
}
#if !(defined(AMD64) || defined(AARCH64) || defined(RISCV64) || defined(PPC64)) || defined(ZERO) // Suppress compilation warning-as-error on unimplemented architectures // that stub out arch-specific methods. Some compilers are smart enough // to figure out the argument is always null and then warn about it. if (to != nullptr) #endif
memcpy(to, from, size << LogBytesPerWord);
}
inline intptr_t* stackChunkOopDesc::relative_base() const { // we relativize with respect to end rather than start because GC might compact the chunk return end_address() + frame::metadata_words;
}
inline intptr_t* stackChunkOopDesc::derelativize_address(int offset) const {
intptr_t* base = relative_base();
intptr_t* p = base - offset;
assert(start_address() <= p && p <= base, "start_address: " PTR_FORMAT " p: " PTR_FORMAT " base: " PTR_FORMAT,
p2i(start_address()), p2i(p), p2i(base)); return p;
}
inlinevoid stackChunkOopDesc::derelativize_frame(frame& fr) const {
fr.set_sp(derelativize_address(fr.offset_sp()));
fr.set_unextended_sp(derelativize_address(fr.offset_unextended_sp()));
derelativize_frame_pd(fr);
fr.set_frame_index(-1); // for the sake of assertions in frame
}
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.