src/hotspot/share/jfr/jni/jfrJavaSupport.hpp
changeset 58863 c16ac7a2eba4
parent 53244 9807daeb47c4
child 59259 127ca611f19b
equal deleted inserted replaced
58861:2c3cc4b01880 58863:c16ac7a2eba4
    27 
    27 
    28 #include "jfr/jni/jfrJavaCall.hpp"
    28 #include "jfr/jni/jfrJavaCall.hpp"
    29 #include "utilities/exceptions.hpp"
    29 #include "utilities/exceptions.hpp"
    30 
    30 
    31 class Klass;
    31 class Klass;
    32 class JavaThread;
       
    33 class outputStream;
    32 class outputStream;
    34 
    33 
    35 class JfrJavaSupport : public AllStatic {
    34 class JfrJavaSupport : public AllStatic {
    36  public:
    35  public:
    37   static jobject local_jni_handle(const oop obj, Thread* t);
    36   static jobject local_jni_handle(const oop obj, Thread* t);
    38   static jobject local_jni_handle(const jobject handle, Thread* t);
    37   static jobject local_jni_handle(const jobject handle, Thread* t);
    39   static void destroy_local_jni_handle(const jobject handle);
    38   static void destroy_local_jni_handle(jobject handle);
    40 
    39 
    41   static jobject global_jni_handle(const oop obj, Thread* t);
    40   static jobject global_jni_handle(const oop obj, Thread* t);
    42   static jobject global_jni_handle(const jobject handle, Thread* t);
    41   static jobject global_jni_handle(const jobject handle, Thread* t);
    43   static void destroy_global_jni_handle(const jobject handle);
    42   static void destroy_global_jni_handle(jobject handle);
       
    43 
       
    44   static jweak global_weak_jni_handle(const oop obj, Thread* t);
       
    45   static jweak global_weak_jni_handle(const jobject handle, Thread* t);
       
    46   static void destroy_global_weak_jni_handle(jweak handle);
    44 
    47 
    45   static oop resolve_non_null(jobject obj);
    48   static oop resolve_non_null(jobject obj);
    46   static void notify_all(jobject obj, TRAPS);
    49   static void notify_all(jobject obj, TRAPS);
    47   static void set_array_element(jobjectArray arr, jobject element, int index, Thread* t);
    50   static void set_array_element(jobjectArray arr, jobject element, int index, Thread* t);
    48 
    51 
    83   static void throw_class_format_error(const char* message, TRAPS);
    86   static void throw_class_format_error(const char* message, TRAPS);
    84 
    87 
    85   static bool is_jdk_jfr_module_available();
    88   static bool is_jdk_jfr_module_available();
    86   static bool is_jdk_jfr_module_available(outputStream* stream, TRAPS);
    89   static bool is_jdk_jfr_module_available(outputStream* stream, TRAPS);
    87 
    90 
    88   static jlong jfr_thread_id(jobject target_thread);
    91   static jlong jfr_thread_id(jobject thread);
       
    92   static void exclude(jobject thread);
       
    93   static void include(jobject thread);
       
    94   static bool is_excluded(jobject thread);
       
    95   static void on_thread_start(Thread* t);
    89 
    96 
    90   // critical
    97   // critical
    91   static void abort(jstring errorMsg, TRAPS);
    98   static void abort(jstring errorMsg, TRAPS);
    92   static void uncaught_exception(jthrowable throwable, Thread* t);
    99   static void uncaught_exception(jthrowable throwable, Thread* t);
    93 
   100