< prev index next >

src/share/vm/prims/jvm.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


  67 #include "runtime/reflection.hpp"
  68 #include "runtime/thread.inline.hpp"
  69 #include "runtime/vframe.hpp"
  70 #include "runtime/vm_operations.hpp"
  71 #include "runtime/vm_version.hpp"
  72 #include "services/attachListener.hpp"
  73 #include "services/management.hpp"
  74 #include "services/threadService.hpp"
  75 #include "trace/tracing.hpp"
  76 #include "utilities/copy.hpp"
  77 #include "utilities/defaultStream.hpp"
  78 #include "utilities/dtrace.hpp"
  79 #include "utilities/events.hpp"
  80 #include "utilities/histogram.hpp"
  81 #include "utilities/macros.hpp"
  82 #include "utilities/utf8.hpp"
  83 #if INCLUDE_CDS
  84 #include "classfile/sharedClassUtil.hpp"
  85 #include "classfile/systemDictionaryShared.hpp"
  86 #endif
  87 #ifdef TARGET_OS_FAMILY_linux
  88 # include "jvm_linux.h"
  89 #endif
  90 #ifdef TARGET_OS_FAMILY_solaris
  91 # include "jvm_solaris.h"
  92 #endif
  93 #ifdef TARGET_OS_FAMILY_windows
  94 # include "jvm_windows.h"
  95 #endif
  96 #ifdef TARGET_OS_FAMILY_aix
  97 # include "jvm_aix.h"
  98 #endif
  99 #ifdef TARGET_OS_FAMILY_bsd
 100 # include "jvm_bsd.h"
 101 #endif
 102 
 103 #include <errno.h>
 104 
 105 /*
 106   NOTE about use of any ctor or function call that can trigger a safepoint/GC:
 107   such ctors and calls MUST NOT come between an oop declaration/init and its
 108   usage because if objects are move this may cause various memory stomps, bus
 109   errors and segfaults. Here is a cookbook for causing so called "naked oop
 110   failures":
 111 
 112       JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredFields<etc> {
 113           JVMWrapper("JVM_GetClassDeclaredFields");
 114 
 115           // Object address to be held directly in mirror & not visible to GC
 116           oop mirror = JNIHandles::resolve_non_null(ofClass);
 117 
 118           // If this ctor can hit a safepoint, moving objects around, then
 119           ComplexConstructor foo;
 120 
 121           // Boom! mirror may point to JUNK instead of the intended object




  67 #include "runtime/reflection.hpp"
  68 #include "runtime/thread.inline.hpp"
  69 #include "runtime/vframe.hpp"
  70 #include "runtime/vm_operations.hpp"
  71 #include "runtime/vm_version.hpp"
  72 #include "services/attachListener.hpp"
  73 #include "services/management.hpp"
  74 #include "services/threadService.hpp"
  75 #include "trace/tracing.hpp"
  76 #include "utilities/copy.hpp"
  77 #include "utilities/defaultStream.hpp"
  78 #include "utilities/dtrace.hpp"
  79 #include "utilities/events.hpp"
  80 #include "utilities/histogram.hpp"
  81 #include "utilities/macros.hpp"
  82 #include "utilities/utf8.hpp"
  83 #if INCLUDE_CDS
  84 #include "classfile/sharedClassUtil.hpp"
  85 #include "classfile/systemDictionaryShared.hpp"
  86 #endif















  87 
  88 #include <errno.h>
  89 
  90 /*
  91   NOTE about use of any ctor or function call that can trigger a safepoint/GC:
  92   such ctors and calls MUST NOT come between an oop declaration/init and its
  93   usage because if objects are move this may cause various memory stomps, bus
  94   errors and segfaults. Here is a cookbook for causing so called "naked oop
  95   failures":
  96 
  97       JVM_ENTRY(jobjectArray, JVM_GetClassDeclaredFields<etc> {
  98           JVMWrapper("JVM_GetClassDeclaredFields");
  99 
 100           // Object address to be held directly in mirror & not visible to GC
 101           oop mirror = JNIHandles::resolve_non_null(ofClass);
 102 
 103           // If this ctor can hit a safepoint, moving objects around, then
 104           ComplexConstructor foo;
 105 
 106           // Boom! mirror may point to JUNK instead of the intended object


< prev index next >