< prev index next >

src/share/vm/jvmci/jvmciRuntime.cpp

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


  27 #include "code/codeCache.hpp"
  28 #include "compiler/compileBroker.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "jvmci/jvmciRuntime.hpp"
  31 #include "jvmci/jvmciCompilerToVM.hpp"
  32 #include "jvmci/jvmciCompiler.hpp"
  33 #include "jvmci/jvmciJavaClasses.hpp"
  34 #include "jvmci/jvmciEnv.hpp"
  35 #include "logging/log.hpp"
  36 #include "memory/oopFactory.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "oops/oop.inline.hpp"
  39 #include "oops/objArrayOop.inline.hpp"
  40 #include "prims/jvm.h"
  41 #include "runtime/biasedLocking.hpp"
  42 #include "runtime/interfaceSupport.hpp"
  43 #include "runtime/reflection.hpp"
  44 #include "runtime/sharedRuntime.hpp"
  45 #include "utilities/debug.hpp"
  46 #include "utilities/defaultStream.hpp"

  47 
  48 #if defined(_MSC_VER)
  49 #define strtoll _strtoi64
  50 #endif
  51 
  52 jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL;
  53 bool JVMCIRuntime::_HotSpotJVMCIRuntime_initialized = false;
  54 bool JVMCIRuntime::_well_known_classes_initialized = false;
  55 int JVMCIRuntime::_trivial_prefixes_count = 0;
  56 char** JVMCIRuntime::_trivial_prefixes = NULL;
  57 JVMCIRuntime::CompLevelAdjustment JVMCIRuntime::_comp_level_adjustment = JVMCIRuntime::none;
  58 bool JVMCIRuntime::_shutdown_called = false;
  59 
  60 BasicType JVMCIRuntime::kindToBasicType(Handle kind, TRAPS) {
  61   if (kind.is_null()) {
  62     THROW_(vmSymbols::java_lang_NullPointerException(), T_ILLEGAL);
  63   }
  64   jchar ch = JavaKind::typeChar(kind);
  65   switch(ch) {
  66     case 'Z': return T_BOOLEAN;


 753             } else {
 754               metadataRoot->print();
 755               ShouldNotReachHere();
 756             }
 757           }
 758           metadataRoots = (objArrayOop)metadataRoots->obj_at(metadataRoots->length() - 1);
 759           assert(metadataRoots == NULL || metadataRoots->is_objArray(), "wrong type");
 760         }
 761       }
 762     }
 763   }
 764 }
 765 
 766 // private static void CompilerToVM.registerNatives()
 767 JVM_ENTRY(void, JVM_RegisterJVMCINatives(JNIEnv *env, jclass c2vmClass))
 768   if (!EnableJVMCI) {
 769     THROW_MSG(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled");
 770   }
 771 
 772 #ifdef _LP64
 773 #ifndef TARGET_ARCH_sparc
 774   uintptr_t heap_end = (uintptr_t) Universe::heap()->reserved_region().end();
 775   uintptr_t allocation_end = heap_end + ((uintptr_t)16) * 1024 * 1024 * 1024;
 776   guarantee(heap_end < allocation_end, "heap end too close to end of address space (might lead to erroneous TLAB allocations)");
 777 #endif // TARGET_ARCH_sparc
 778 #else
 779   fatal("check TLAB allocation code for address space conflicts");
 780 #endif
 781 
 782   JVMCIRuntime::initialize_well_known_classes(CHECK);
 783 
 784   {
 785     ThreadToNativeFromVM trans(thread);
 786     env->RegisterNatives(c2vmClass, CompilerToVM::methods, CompilerToVM::methods_count());
 787   }
 788 JVM_END
 789 
 790 #define CHECK_WARN_ABORT_(message) THREAD); \
 791   if (HAS_PENDING_EXCEPTION) { \
 792     warning(message); \
 793     char buf[512]; \
 794     jio_snprintf(buf, 512, "Uncaught exception at %s:%d", __FILE__, __LINE__); \
 795     JVMCIRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \
 796     return; \
 797   } \
 798   (void)(0
 799 
 800 void JVMCIRuntime::shutdown(TRAPS) {




  27 #include "code/codeCache.hpp"
  28 #include "compiler/compileBroker.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "jvmci/jvmciRuntime.hpp"
  31 #include "jvmci/jvmciCompilerToVM.hpp"
  32 #include "jvmci/jvmciCompiler.hpp"
  33 #include "jvmci/jvmciJavaClasses.hpp"
  34 #include "jvmci/jvmciEnv.hpp"
  35 #include "logging/log.hpp"
  36 #include "memory/oopFactory.hpp"
  37 #include "memory/resourceArea.hpp"
  38 #include "oops/oop.inline.hpp"
  39 #include "oops/objArrayOop.inline.hpp"
  40 #include "prims/jvm.h"
  41 #include "runtime/biasedLocking.hpp"
  42 #include "runtime/interfaceSupport.hpp"
  43 #include "runtime/reflection.hpp"
  44 #include "runtime/sharedRuntime.hpp"
  45 #include "utilities/debug.hpp"
  46 #include "utilities/defaultStream.hpp"
  47 #include "utilities/macros.hpp"
  48 
  49 #if defined(_MSC_VER)
  50 #define strtoll _strtoi64
  51 #endif
  52 
  53 jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL;
  54 bool JVMCIRuntime::_HotSpotJVMCIRuntime_initialized = false;
  55 bool JVMCIRuntime::_well_known_classes_initialized = false;
  56 int JVMCIRuntime::_trivial_prefixes_count = 0;
  57 char** JVMCIRuntime::_trivial_prefixes = NULL;
  58 JVMCIRuntime::CompLevelAdjustment JVMCIRuntime::_comp_level_adjustment = JVMCIRuntime::none;
  59 bool JVMCIRuntime::_shutdown_called = false;
  60 
  61 BasicType JVMCIRuntime::kindToBasicType(Handle kind, TRAPS) {
  62   if (kind.is_null()) {
  63     THROW_(vmSymbols::java_lang_NullPointerException(), T_ILLEGAL);
  64   }
  65   jchar ch = JavaKind::typeChar(kind);
  66   switch(ch) {
  67     case 'Z': return T_BOOLEAN;


 754             } else {
 755               metadataRoot->print();
 756               ShouldNotReachHere();
 757             }
 758           }
 759           metadataRoots = (objArrayOop)metadataRoots->obj_at(metadataRoots->length() - 1);
 760           assert(metadataRoots == NULL || metadataRoots->is_objArray(), "wrong type");
 761         }
 762       }
 763     }
 764   }
 765 }
 766 
 767 // private static void CompilerToVM.registerNatives()
 768 JVM_ENTRY(void, JVM_RegisterJVMCINatives(JNIEnv *env, jclass c2vmClass))
 769   if (!EnableJVMCI) {
 770     THROW_MSG(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled");
 771   }
 772 
 773 #ifdef _LP64
 774 #ifndef SPARC
 775   uintptr_t heap_end = (uintptr_t) Universe::heap()->reserved_region().end();
 776   uintptr_t allocation_end = heap_end + ((uintptr_t)16) * 1024 * 1024 * 1024;
 777   guarantee(heap_end < allocation_end, "heap end too close to end of address space (might lead to erroneous TLAB allocations)");
 778 #endif // !SPARC
 779 #else
 780   fatal("check TLAB allocation code for address space conflicts");
 781 #endif // _LP64
 782 
 783   JVMCIRuntime::initialize_well_known_classes(CHECK);
 784 
 785   {
 786     ThreadToNativeFromVM trans(thread);
 787     env->RegisterNatives(c2vmClass, CompilerToVM::methods, CompilerToVM::methods_count());
 788   }
 789 JVM_END
 790 
 791 #define CHECK_WARN_ABORT_(message) THREAD); \
 792   if (HAS_PENDING_EXCEPTION) { \
 793     warning(message); \
 794     char buf[512]; \
 795     jio_snprintf(buf, 512, "Uncaught exception at %s:%d", __FILE__, __LINE__); \
 796     JVMCIRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \
 797     return; \
 798   } \
 799   (void)(0
 800 
 801 void JVMCIRuntime::shutdown(TRAPS) {


< prev index next >