17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP
26 #define CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP
27
28 #include "interpreter/oopMapCache.hpp"
29 #include "runtime/frame.inline.hpp"
30 #include "runtime/registerMap.hpp"
31
32 #ifdef ASSERT
33 template <ChunkFrames frame_kind>
34 inline bool StackChunkFrameStream<frame_kind>::is_in_frame(void* p0) const {
35 assert(!is_done(), "");
36 assert(is_compiled(), "");
37 intptr_t* p = (intptr_t*)p0;
38 int argsize = (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
39 int frame_size = _cb->frame_size() + (argsize > 0 ? argsize + frame::metadata_words_at_top : 0);
40 return (p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size;
41 }
42 #endif
43
44 template <ChunkFrames frame_kind>
45 inline frame StackChunkFrameStream<frame_kind>::to_frame() const {
46 if (is_done()) {
47 return frame(_sp, _sp, nullptr, nullptr, nullptr, nullptr, true);
48 } else {
49 // Compiled frames on heap don't have back links. See FreezeBase::patch_pd() and frame::setup().
50 return frame(sp(), unextended_sp(), Interpreter::contains(pc()) ? fp() : nullptr, pc(), cb(), _oopmap, true);
51 }
52 }
53
54 template <ChunkFrames frame_kind>
55 inline address StackChunkFrameStream<frame_kind>::get_pc() const {
56 assert(!is_done(), "");
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP
26 #define CPU_PPC_STACKCHUNKFRAMESTREAM_PPC_INLINE_HPP
27
28 #include "interpreter/oopMapCache.hpp"
29 #include "runtime/frame.inline.hpp"
30 #include "runtime/registerMap.hpp"
31
32 #ifdef ASSERT
33 template <ChunkFrames frame_kind>
34 inline bool StackChunkFrameStream<frame_kind>::is_in_frame(void* p0) const {
35 assert(!is_done(), "");
36 assert(is_compiled(), "");
37 assert(!_cb->as_nmethod()->needs_stack_repair(), "unsupported");
38 intptr_t* p = (intptr_t*)p0;
39 int argsize = (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
40 int frame_size = _cb->frame_size() + (argsize > 0 ? argsize + frame::metadata_words_at_top : 0);
41 return (p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size;
42 }
43 #endif
44
45 template <ChunkFrames frame_kind>
46 inline frame StackChunkFrameStream<frame_kind>::to_frame() const {
47 if (is_done()) {
48 return frame(_sp, _sp, nullptr, nullptr, nullptr, nullptr, true);
49 } else {
50 // Compiled frames on heap don't have back links. See FreezeBase::patch_pd() and frame::setup().
51 return frame(sp(), unextended_sp(), Interpreter::contains(pc()) ? fp() : nullptr, pc(), cb(), _oopmap, true);
52 }
53 }
54
55 template <ChunkFrames frame_kind>
56 inline address StackChunkFrameStream<frame_kind>::get_pc() const {
57 assert(!is_done(), "");
|