71 #include "runtime/signature.hpp"
72 #include "runtime/thread.inline.hpp"
73 #include "runtime/vm_operations.hpp"
74 #include "services/memTracker.hpp"
75 #include "services/runtimeService.hpp"
76 #include "trace/tracing.hpp"
77 #include "utilities/defaultStream.hpp"
78 #include "utilities/dtrace.hpp"
79 #include "utilities/events.hpp"
80 #include "utilities/histogram.hpp"
81 #include "utilities/internalVMTests.hpp"
82 #include "utilities/macros.hpp"
83 #if INCLUDE_ALL_GCS
84 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
85 #endif // INCLUDE_ALL_GCS
86 #if INCLUDE_JVMCI
87 #include "jvmci/jvmciCompiler.hpp"
88 #include "jvmci/jvmciRuntime.hpp"
89 #endif
90
91 static jint CurrentVersion = JNI_VERSION_1_8;
92
93 #ifdef _WIN32
94 extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
95 #endif
96
97 // The DT_RETURN_MARK macros create a scoped object to fire the dtrace
98 // '-return' probe regardless of the return path is taken out of the function.
99 // Methods that have multiple return paths use this to avoid having to
100 // instrument each return path. Methods that use CHECK or THROW must use this
101 // since those macros can cause an immedate uninstrumented return.
102 //
103 // In order to get the return value, a reference to the variable containing
104 // the return value must be passed to the contructor of the object, and
105 // the return value must be set before return (since the mark object has
106 // a reference to it).
107 //
108 // Example:
109 // DT_RETURN_MARK_DECL(SomeFunc, int);
110 // JNI_ENTRY(int, SomeFunc, ...)
111 // int return_value = 0;
|
71 #include "runtime/signature.hpp"
72 #include "runtime/thread.inline.hpp"
73 #include "runtime/vm_operations.hpp"
74 #include "services/memTracker.hpp"
75 #include "services/runtimeService.hpp"
76 #include "trace/tracing.hpp"
77 #include "utilities/defaultStream.hpp"
78 #include "utilities/dtrace.hpp"
79 #include "utilities/events.hpp"
80 #include "utilities/histogram.hpp"
81 #include "utilities/internalVMTests.hpp"
82 #include "utilities/macros.hpp"
83 #if INCLUDE_ALL_GCS
84 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
85 #endif // INCLUDE_ALL_GCS
86 #if INCLUDE_JVMCI
87 #include "jvmci/jvmciCompiler.hpp"
88 #include "jvmci/jvmciRuntime.hpp"
89 #endif
90
91 static jint CurrentVersion = JNI_VERSION_9_0;
92
93 #ifdef _WIN32
94 extern LONG WINAPI topLevelExceptionFilter(_EXCEPTION_POINTERS* );
95 #endif
96
97 // The DT_RETURN_MARK macros create a scoped object to fire the dtrace
98 // '-return' probe regardless of the return path is taken out of the function.
99 // Methods that have multiple return paths use this to avoid having to
100 // instrument each return path. Methods that use CHECK or THROW must use this
101 // since those macros can cause an immedate uninstrumented return.
102 //
103 // In order to get the return value, a reference to the variable containing
104 // the return value must be passed to the contructor of the object, and
105 // the return value must be set before return (since the mark object has
106 // a reference to it).
107 //
108 // Example:
109 // DT_RETURN_MARK_DECL(SomeFunc, int);
110 // JNI_ENTRY(int, SomeFunc, ...)
111 // int return_value = 0;
|