thread_aix_ppc.hpp revision 7575:a7fd2288ce2f
1227825Stheraven/* 2227825Stheraven * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 3227825Stheraven * Copyright 2012, 2013 SAP AG. All rights reserved. 4227825Stheraven * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5227825Stheraven * 6227825Stheraven * This code is free software; you can redistribute it and/or modify it 7227825Stheraven * under the terms of the GNU General Public License version 2 only, as 8227825Stheraven * published by the Free Software Foundation. 9227825Stheraven * 10227825Stheraven * This code is distributed in the hope that it will be useful, but WITHOUT 11227825Stheraven * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12227825Stheraven * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13227825Stheraven * version 2 for more details (a copy is included in the LICENSE file that 14227825Stheraven * accompanied this code). 15227825Stheraven * 16227825Stheraven * You should have received a copy of the GNU General Public License version 17227825Stheraven * 2 along with this work; if not, write to the Free Software Foundation, 18227825Stheraven * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19227825Stheraven * 20227825Stheraven * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21227825Stheraven * or visit www.oracle.com if you need additional information or have any 22227825Stheraven * questions. 23227825Stheraven * 24227825Stheraven */ 25227825Stheraven 26227825Stheraven#ifndef OS_CPU_AIX_PPC_VM_THREAD_AIX_PPC_HPP 27227825Stheraven#define OS_CPU_AIX_PPC_VM_THREAD_AIX_PPC_HPP 28227825Stheraven 29227825Stheraven private: 30227825Stheraven void pd_initialize() { 31227825Stheraven _anchor.clear(); 32227825Stheraven _last_interpreter_fp = NULL; 33227825Stheraven } 34227825Stheraven 35227825Stheraven // The `last' frame is the youngest Java frame on the thread's stack. 36227825Stheraven frame pd_last_frame() { 37227825Stheraven assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); 38227825Stheraven 39227825Stheraven intptr_t* sp = last_Java_sp(); 40227825Stheraven address pc = _anchor.last_Java_pc(); 41227825Stheraven 42227825Stheraven // Last_Java_pc ist not set, if we come here from compiled code. 43227825Stheraven if (pc == NULL) 44227825Stheraven pc = (address) *(sp + 2); 45227825Stheraven 46227825Stheraven return frame(sp, pc); 47227825Stheraven } 48227825Stheraven 49227825Stheraven public: 50227825Stheraven void set_base_of_stack_pointer(intptr_t* base_sp) {} 51227825Stheraven intptr_t* base_of_stack_pointer() { return NULL; } 52227825Stheraven void record_base_of_stack_pointer() {} 53227825Stheraven 54227825Stheraven // These routines are only used on cpu architectures that 55227825Stheraven // have separate register stacks (Itanium). 56227825Stheraven static bool register_stack_overflow() { return false; } 57227825Stheraven static void enable_register_stack_guard() {} 58227825Stheraven static void disable_register_stack_guard() {} 59227825Stheraven 60227825Stheraven bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, 61227825Stheraven bool isInJava); 62227825Stheraven 63227825Stheraven // -Xprof support 64227825Stheraven // 65227825Stheraven // In order to find the last Java fp from an async profile 66227825Stheraven // tick, we store the current interpreter fp in the thread. 67227825Stheraven // This value is only valid while we are in the C++ interpreter 68227825Stheraven // and profiling. 69227825Stheraven protected: 70227825Stheraven intptr_t *_last_interpreter_fp; 71227825Stheraven 72227825Stheraven public: 73227825Stheraven static ByteSize last_interpreter_fp_offset() { 74227825Stheraven return byte_offset_of(JavaThread, _last_interpreter_fp); 75227825Stheraven } 76227825Stheraven 77227825Stheraven intptr_t* last_interpreter_fp() { return _last_interpreter_fp; } 78227825Stheraven 79227825Stheraven#endif // OS_CPU_AIX_PPC_VM_THREAD_AIX_PPC_HPP 80227825Stheraven