src/share/vm/runtime/frame.inline.hpp

Wed, 19 Nov 2014 14:21:09 -0800

author
mchung
date
Wed, 19 Nov 2014 14:21:09 -0800
changeset 7368
fa6adc194d48
parent 6521
af8cc1dae608
child 6876
710a3c8b516e
child 9191
a0373be7fe1b
permissions
-rw-r--r--

8064667: Add -XX:+CheckEndorsedAndExtDirs flag to JDK 8
Reviewed-by: coleenp, ccheung

duke@435 1 /*
sla@5237 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_RUNTIME_FRAME_INLINE_HPP
stefank@2314 26 #define SHARE_VM_RUNTIME_FRAME_INLINE_HPP
stefank@2314 27
stefank@2314 28 #include "interpreter/bytecodeInterpreter.hpp"
stefank@2314 29 #include "interpreter/bytecodeInterpreter.inline.hpp"
stefank@2314 30 #include "interpreter/interpreter.hpp"
coleenp@4037 31 #include "oops/method.hpp"
stefank@2314 32 #include "runtime/frame.hpp"
stefank@2314 33 #include "runtime/signature.hpp"
stefank@2314 34 #ifdef TARGET_ARCH_x86
stefank@2314 35 # include "jniTypes_x86.hpp"
stefank@2314 36 #endif
stefank@2314 37 #ifdef TARGET_ARCH_sparc
stefank@2314 38 # include "jniTypes_sparc.hpp"
stefank@2314 39 #endif
stefank@2314 40 #ifdef TARGET_ARCH_zero
stefank@2314 41 # include "jniTypes_zero.hpp"
stefank@2314 42 #endif
bobv@2508 43 #ifdef TARGET_ARCH_arm
bobv@2508 44 # include "jniTypes_arm.hpp"
bobv@2508 45 #endif
bobv@2508 46 #ifdef TARGET_ARCH_ppc
bobv@2508 47 # include "jniTypes_ppc.hpp"
bobv@2508 48 #endif
stefank@2314 49 #ifdef ZERO
stefank@2314 50 #ifdef TARGET_ARCH_zero
stefank@2314 51 # include "entryFrame_zero.hpp"
stefank@2314 52 # include "fakeStubFrame_zero.hpp"
stefank@2314 53 # include "interpreterFrame_zero.hpp"
stefank@2314 54 # include "sharkFrame_zero.hpp"
stefank@2314 55 #endif
stefank@2314 56 #endif
stefank@2314 57
twisti@1040 58 // This file holds platform-independent bodies of inline functions for frames.
duke@435 59
duke@435 60 // Note: The bcx usually contains the bcp; however during GC it contains the bci
coleenp@4037 61 // (changed by gc_prologue() and gc_epilogue()) to be Method* position
duke@435 62 // independent. These accessors make sure the correct value is returned
duke@435 63 // by testing the range of the bcx value. bcp's are guaranteed to be above
duke@435 64 // max_method_code_size, since methods are always allocated in OldSpace and
duke@435 65 // Eden is allocated before OldSpace.
duke@435 66 //
duke@435 67 // The bcp is accessed sometimes during GC for ArgumentDescriptors; than
duke@435 68 // the correct translation has to be performed (was bug).
duke@435 69
duke@435 70 inline bool frame::is_bci(intptr_t bcx) {
duke@435 71 #ifdef _LP64
duke@435 72 return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
duke@435 73 #else
duke@435 74 return 0 <= bcx && bcx <= max_method_code_size;
duke@435 75 #endif
duke@435 76 }
duke@435 77
duke@435 78 inline bool frame::is_entry_frame() const {
duke@435 79 return StubRoutines::returns_to_call_stub(pc());
duke@435 80 }
duke@435 81
sla@5237 82 inline bool frame::is_stub_frame() const {
sla@5237 83 return StubRoutines::is_stub_code(pc()) || (_cb != NULL && _cb->is_adapter_blob());
sla@5237 84 }
sla@5237 85
duke@435 86 inline bool frame::is_first_frame() const {
duke@435 87 return is_entry_frame() && entry_frame_is_first();
duke@435 88 }
duke@435 89
goetz@6521 90 #ifdef CC_INTERP
goetz@6521 91 inline oop* frame::interpreter_frame_temp_oop_addr() const {
goetz@6521 92 interpreterState istate = get_interpreterState();
goetz@6521 93 return (oop *)&istate->_oop_temp;
goetz@6521 94 }
goetz@6521 95 #endif // CC_INTERP
goetz@6521 96
duke@435 97 // here are the platform-dependent bodies:
duke@435 98
stefank@2314 99 #ifdef TARGET_ARCH_x86
stefank@2314 100 # include "frame_x86.inline.hpp"
stefank@2314 101 #endif
stefank@2314 102 #ifdef TARGET_ARCH_sparc
stefank@2314 103 # include "frame_sparc.inline.hpp"
stefank@2314 104 #endif
stefank@2314 105 #ifdef TARGET_ARCH_zero
stefank@2314 106 # include "frame_zero.inline.hpp"
stefank@2314 107 #endif
bobv@2508 108 #ifdef TARGET_ARCH_arm
bobv@2508 109 # include "frame_arm.inline.hpp"
bobv@2508 110 #endif
bobv@2508 111 #ifdef TARGET_ARCH_ppc
bobv@2508 112 # include "frame_ppc.inline.hpp"
bobv@2508 113 #endif
stefank@2314 114
stefank@2314 115
stefank@2314 116 #endif // SHARE_VM_RUNTIME_FRAME_INLINE_HPP

mercurial