< prev index next >

src/share/vm/interpreter/interpreterRuntime.hpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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 SHARE_VM_INTERPRETER_INTERPRETERRUNTIME_HPP
  26 #define SHARE_VM_INTERPRETER_INTERPRETERRUNTIME_HPP
  27 
  28 #include "interpreter/bytecode.hpp"
  29 #include "interpreter/linkResolver.hpp"
  30 #include "memory/universe.hpp"
  31 #include "oops/method.hpp"
  32 #include "runtime/frame.inline.hpp"
  33 #include "runtime/signature.hpp"
  34 #include "runtime/thread.hpp"

  35 
  36 // The InterpreterRuntime is called by the interpreter for everything
  37 // that cannot/should not be dealt with in assembly and needs C support.
  38 
  39 class InterpreterRuntime: AllStatic {
  40   friend class BytecodeClosure; // for method and bcp
  41   friend class PrintingClosure; // for method and bcp
  42 
  43  private:
  44   // Helper functions to access current interpreter state
  45   static frame     last_frame(JavaThread *thread)    { return thread->last_frame(); }
  46   static Method*   method(JavaThread *thread)        { return last_frame(thread).interpreter_frame_method(); }
  47   static address   bcp(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bcp(); }
  48   static int       bci(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bci(); }
  49   static void      set_bcp_and_mdp(address bcp, JavaThread*thread);
  50   static Bytecodes::Code code(JavaThread *thread)    {
  51     // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
  52     return Bytecodes::code_at(method(thread), bcp(thread));
  53   }
  54   static Bytecode  bytecode(JavaThread *thread)      { return Bytecode(method(thread), bcp(thread)); }


 150     ConstantPoolCacheEntry *cp_entry, jvalue *value);
 151   static void post_method_entry(JavaThread *thread);
 152   static void post_method_exit (JavaThread *thread);
 153   static int  interpreter_contains(address pc);
 154 
 155   // Native signature handlers
 156   static void prepare_native_call(JavaThread* thread, Method* method);
 157   static address slow_signature_handler(JavaThread* thread,
 158                                         Method* method,
 159                                         intptr_t* from, intptr_t* to);
 160 
 161 #if defined(IA32) || defined(AMD64) || defined(ARM)
 162   // Popframe support (only needed on x86, AMD64 and ARM)
 163   static void popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address);
 164 #endif
 165 
 166   // bytecode tracing is only used by the TraceBytecodes
 167   static intptr_t trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2) PRODUCT_RETURN0;
 168 
 169   // Platform dependent stuff
 170 #ifdef TARGET_ARCH_x86
 171 # include "interpreterRT_x86.hpp"
 172 #endif
 173 #ifdef TARGET_ARCH_sparc
 174 # include "interpreterRT_sparc.hpp"
 175 #endif
 176 #ifdef TARGET_ARCH_zero
 177 # include "interpreterRT_zero.hpp"
 178 #endif
 179 #ifdef TARGET_ARCH_arm
 180 # include "interpreterRT_arm.hpp"
 181 #endif
 182 #ifdef TARGET_ARCH_ppc
 183 # include "interpreterRT_ppc.hpp"
 184 #endif
 185 #ifdef TARGET_ARCH_aarch64
 186 # include "interpreterRT_aarch64.hpp"
 187 #endif
 188 
 189   // optional normalization of fingerprints to reduce the number of adapters
 190   static uint64_t normalize_fast_native_fingerprint(uint64_t fingerprint);
 191 
 192   // Interpreter's frequency counter overflow
 193   static nmethod* frequency_counter_overflow(JavaThread* thread, address branch_bcp);
 194 
 195   // Interpreter profiling support
 196   static jint    bcp_to_di(Method* method, address cur_bcp);
 197   static void    profile_method(JavaThread* thread);
 198   static void    update_mdp_for_ret(JavaThread* thread, int bci);
 199 #ifdef ASSERT
 200   static void    verify_mdp(Method* method, address bcp, address mdp);
 201 #endif // ASSERT
 202   static MethodCounters* build_method_counters(JavaThread* thread, Method* m);
 203 };
 204 
 205 
 206 class SignatureHandlerLibrary: public AllStatic {
 207  public:




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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 SHARE_VM_INTERPRETER_INTERPRETERRUNTIME_HPP
  26 #define SHARE_VM_INTERPRETER_INTERPRETERRUNTIME_HPP
  27 
  28 #include "interpreter/bytecode.hpp"
  29 #include "interpreter/linkResolver.hpp"
  30 #include "memory/universe.hpp"
  31 #include "oops/method.hpp"
  32 #include "runtime/frame.inline.hpp"
  33 #include "runtime/signature.hpp"
  34 #include "runtime/thread.hpp"
  35 #include "utilities/macros.hpp"
  36 
  37 // The InterpreterRuntime is called by the interpreter for everything
  38 // that cannot/should not be dealt with in assembly and needs C support.
  39 
  40 class InterpreterRuntime: AllStatic {
  41   friend class BytecodeClosure; // for method and bcp
  42   friend class PrintingClosure; // for method and bcp
  43 
  44  private:
  45   // Helper functions to access current interpreter state
  46   static frame     last_frame(JavaThread *thread)    { return thread->last_frame(); }
  47   static Method*   method(JavaThread *thread)        { return last_frame(thread).interpreter_frame_method(); }
  48   static address   bcp(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bcp(); }
  49   static int       bci(JavaThread *thread)           { return last_frame(thread).interpreter_frame_bci(); }
  50   static void      set_bcp_and_mdp(address bcp, JavaThread*thread);
  51   static Bytecodes::Code code(JavaThread *thread)    {
  52     // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
  53     return Bytecodes::code_at(method(thread), bcp(thread));
  54   }
  55   static Bytecode  bytecode(JavaThread *thread)      { return Bytecode(method(thread), bcp(thread)); }


 151     ConstantPoolCacheEntry *cp_entry, jvalue *value);
 152   static void post_method_entry(JavaThread *thread);
 153   static void post_method_exit (JavaThread *thread);
 154   static int  interpreter_contains(address pc);
 155 
 156   // Native signature handlers
 157   static void prepare_native_call(JavaThread* thread, Method* method);
 158   static address slow_signature_handler(JavaThread* thread,
 159                                         Method* method,
 160                                         intptr_t* from, intptr_t* to);
 161 
 162 #if defined(IA32) || defined(AMD64) || defined(ARM)
 163   // Popframe support (only needed on x86, AMD64 and ARM)
 164   static void popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address);
 165 #endif
 166 
 167   // bytecode tracing is only used by the TraceBytecodes
 168   static intptr_t trace_bytecode(JavaThread* thread, intptr_t preserve_this_value, intptr_t tos, intptr_t tos2) PRODUCT_RETURN0;
 169 
 170   // Platform dependent stuff
 171 #include CPU_HEADER(interpreterRT)

















 172 
 173   // optional normalization of fingerprints to reduce the number of adapters
 174   static uint64_t normalize_fast_native_fingerprint(uint64_t fingerprint);
 175 
 176   // Interpreter's frequency counter overflow
 177   static nmethod* frequency_counter_overflow(JavaThread* thread, address branch_bcp);
 178 
 179   // Interpreter profiling support
 180   static jint    bcp_to_di(Method* method, address cur_bcp);
 181   static void    profile_method(JavaThread* thread);
 182   static void    update_mdp_for_ret(JavaThread* thread, int bci);
 183 #ifdef ASSERT
 184   static void    verify_mdp(Method* method, address bcp, address mdp);
 185 #endif // ASSERT
 186   static MethodCounters* build_method_counters(JavaThread* thread, Method* m);
 187 };
 188 
 189 
 190 class SignatureHandlerLibrary: public AllStatic {
 191  public:


< prev index next >