< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page

        

*** 55,64 **** --- 55,65 ---- f(java_lang_System) \ f(java_lang_ClassLoader) \ f(java_lang_Throwable) \ f(java_lang_Thread) \ f(java_lang_ThreadGroup) \ + f(java_lang_Fiber) \ f(java_lang_AssertionStatusDirectives) \ f(java_lang_ref_SoftReference) \ f(java_lang_invoke_MethodHandle) \ f(java_lang_invoke_DirectMethodHandle) \ f(java_lang_invoke_MemberName) \
*** 78,87 **** --- 79,90 ---- f(java_lang_reflect_Parameter) \ f(java_lang_Module) \ f(java_lang_StackTraceElement) \ f(java_lang_StackFrameInfo) \ f(java_lang_LiveStackFrameInfo) \ + f(java_lang_ContinuationScope) \ + f(java_lang_Continuation) \ f(java_util_concurrent_locks_AbstractOwnableSynchronizer) \ f(jdk_internal_misc_UnsafeConstants) \ //end #define BASIC_JAVA_CLASSES_DO(f) \
*** 367,376 **** --- 370,381 ---- static int _eetop_offset; static int _daemon_offset; static int _stillborn_offset; static int _stackSize_offset; static int _tid_offset; + static int _continuation_offset; + static int _fiber_offset; static int _thread_status_offset; static int _park_blocker_offset; static void compute_offsets();
*** 406,415 **** --- 411,425 ---- static oop inherited_access_control_context(oop java_thread); // Stack size hint static jlong stackSize(oop java_thread); // Thread ID static jlong thread_id(oop java_thread); + // Continuation + static oop continuation(oop java_thread); + static void set_continuation(oop java_thread, oop continuation); + // Fiber + static oop fiber(oop java_thread); // Blocker object responsible for thread parking static oop park_blocker(oop java_thread); // Java Thread Status for JVMTI and M&M use.
*** 495,504 **** --- 505,536 ---- // Debugging friend class JavaClasses; }; + // Interface to java.lang.Fiber objects + + class java_lang_Fiber : AllStatic { + private: + static int static_notify_jvmti_events_offset; + static int _carrierThread_offset; + static int _continuation_offset; + public: + static void compute_offsets(); + static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; + + // Testers + static bool is_subclass(Klass* klass) { + return klass->is_subclass_of(SystemDictionary::Fiber_klass()); + } + static bool is_instance(oop obj); + static oop carrier_thread(oop fiber); + static oop continuation(oop fiber); + static void set_notify_jvmti_events(jboolean enable); + static void init_static_notify_jvmti_events(); + }; + // Interface to java.lang.Throwable objects class java_lang_Throwable: AllStatic { friend class BacktraceBuilder;
*** 516,527 **** enum { trace_methods_offset = 0, trace_bcis_offset = 1, trace_mirrors_offset = 2, trace_names_offset = 3, ! trace_next_offset = 4, ! trace_size = 5, trace_chunk_size = 32 }; static int backtrace_offset; static int detailMessage_offset; --- 548,560 ---- enum { trace_methods_offset = 0, trace_bcis_offset = 1, trace_mirrors_offset = 2, trace_names_offset = 3, ! trace_conts_offset = 4, ! trace_next_offset = 5, ! trace_size = 6, trace_chunk_size = 32 }; static int backtrace_offset; static int detailMessage_offset;
*** 557,568 **** // Allocate space for backtrace (created but stack trace not filled in) static void allocate_backtrace(Handle throwable, TRAPS); // Fill in current stack trace for throwable with preallocated backtrace (no GC) static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable); // Fill in current stack trace, can cause GC ! static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS); ! static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle()); // Programmatic access to stack trace static void get_stack_trace_elements(Handle throwable, objArrayHandle stack_trace, TRAPS); // Printing static void print(oop throwable, outputStream* st); static void print_stack_trace(Handle throwable, outputStream* st); --- 590,602 ---- // Allocate space for backtrace (created but stack trace not filled in) static void allocate_backtrace(Handle throwable, TRAPS); // Fill in current stack trace for throwable with preallocated backtrace (no GC) static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable); // Fill in current stack trace, can cause GC ! static void fill_in_stack_trace(Handle throwable, Handle contScope, const methodHandle& method, TRAPS); ! static void fill_in_stack_trace(Handle throwable, Handle contScope, const methodHandle& method = methodHandle()); ! static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle()) { fill_in_stack_trace(throwable, Handle(), method); } // Programmatic access to stack trace static void get_stack_trace_elements(Handle throwable, objArrayHandle stack_trace, TRAPS); // Printing static void print(oop throwable, outputStream* st); static void print_stack_trace(Handle throwable, outputStream* st);
*** 942,951 **** --- 976,1077 ---- static void compute_offsets(); static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; }; + // Interface to java.lang.ContinuationScope objects + class java_lang_ContinuationScope: AllStatic { + friend class JavaClasses; + private: + static int _name_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; + + static inline oop name(oop ref); + }; + + // Interface to java.lang.Continuation objects + class java_lang_Continuation: AllStatic { + friend class JavaClasses; + private: + // enum { + // hc_fp_offset = 0, + // hc_sp_offset = 11, + // hc_entrySP_offset = 1, + // hc_entryFP_offset = 3, + // hc_target_offset = 13, + // hc_parent_offset = 14, + // hc_stack_offset = 15, + // }; + static int _scope_offset; + static int _target_offset; + static int _parent_offset; + static int _yieldInfo_offset; + static int _entrySP_offset; + static int _entryFP_offset; + static int _entryPC_offset; + static int _stack_offset; + static int _maxSize_offset; + static int _numFrames_offset; + static int _numInterpretedFrames_offset; + static int _refStack_offset; + static int _fp_offset; + static int _sp_offset; + static int _pc_offset; + static int _refSP_offset; + static int _cs_offset; + static int _flags_offset; + static int _reset_offset; + static int _mounted_offset; + + static void compute_offsets(); + public: + static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; + // Accessors + static inline oop scope(oop ref); + static inline oop target(oop ref); + static inline oop parent(oop ref); + static inline oop yieldInfo(oop ref); + static inline void set_yieldInfo(oop ref, oop value); + static inline typeArrayOop stack(oop ref); + static inline objArrayOop refStack(oop ref); + static inline void set_stack(oop obj, oop value); + static inline void set_refStack(oop obj, oop value); + static inline jlong fp(oop ref); + static inline void set_fp(oop ref, const jlong i); + static inline jint sp(oop ref); + static inline void set_sp(oop ref, const jint i); + static inline void* pc(oop ref); + static inline void set_pc(oop ref, const void* pc); + static inline jint refSP(oop ref); + static inline void set_refSP(oop ref, jint i); + static inline intptr_t* entrySP(oop ref); + static inline void set_entrySP(oop ref, intptr_t* sp); + static inline intptr_t* entryFP(oop ref); + static inline void set_entryFP(oop ref, intptr_t* fp); + static inline address entryPC(oop ref); + static inline void set_entryPC(oop ref, address pc); + static inline address* entryPC_addr(oop ref); + static inline jint maxSize(oop ref); + static inline void set_maxSize(oop ref, jint i); + static inline jshort numFrames(oop ref); + static inline void set_numFrames(oop ref, jshort i); + static inline jshort numInterpretedFrames(oop ref); + static inline void set_numInterpretedFrames(oop ref, jshort i); + static unsigned char flags(oop ref); + static void set_flags(oop ref, unsigned char flags); + static inline int stack_size(oop ref); + static inline void* stack_base(oop ref); + static inline HeapWord* refStack_base(oop ref); + static inline jshort critical_section(oop ref); + static bool on_local_stack(oop ref, address adr); + static bool is_reset(oop ref); + static bool is_mounted(oop ref); + }; + // Interface to java.lang.invoke.MethodHandle objects class MethodHandleEntry; class java_lang_invoke_MethodHandle: AllStatic {
*** 1345,1371 **** static int moduleVersion_offset; static int declaringClass_offset; static int methodName_offset; static int fileName_offset; static int lineNumber_offset; // Setters static void set_classLoaderName(oop element, oop value); static void set_moduleName(oop element, oop value); static void set_moduleVersion(oop element, oop value); static void set_declaringClass(oop element, oop value); static void set_methodName(oop element, oop value); static void set_fileName(oop element, oop value); static void set_lineNumber(oop element, int value); static void set_declaringClassObject(oop element, oop value); public: // Create an instance of StackTraceElement ! static oop create(const methodHandle& method, int bci, TRAPS); static void fill_in(Handle element, InstanceKlass* holder, const methodHandle& method, ! int version, int bci, Symbol* name, TRAPS); static void compute_offsets(); static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; #if INCLUDE_JVMCI --- 1471,1499 ---- static int moduleVersion_offset; static int declaringClass_offset; static int methodName_offset; static int fileName_offset; static int lineNumber_offset; + static int contScope_offset; // Setters static void set_classLoaderName(oop element, oop value); static void set_moduleName(oop element, oop value); static void set_moduleVersion(oop element, oop value); static void set_declaringClass(oop element, oop value); static void set_methodName(oop element, oop value); static void set_fileName(oop element, oop value); static void set_lineNumber(oop element, int value); static void set_declaringClassObject(oop element, oop value); + static void set_contScopeName(oop element, oop value); public: // Create an instance of StackTraceElement ! static oop create(const methodHandle& method, int bci, Handle contScope, TRAPS); static void fill_in(Handle element, InstanceKlass* holder, const methodHandle& method, ! int version, int bci, Symbol* name, Handle contScopeName, TRAPS); static void compute_offsets(); static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; #if INCLUDE_JVMCI
*** 1402,1420 **** class java_lang_StackFrameInfo: AllStatic { private: static int _memberName_offset; static int _bci_offset; static int _version_offset; static Method* get_method(Handle stackFrame, InstanceKlass* holder, TRAPS); public: // Setters ! static void set_method_and_bci(Handle stackFrame, const methodHandle& method, int bci, TRAPS); static void set_bci(oop info, int value); static void set_version(oop info, short value); static void compute_offsets(); static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; static void to_stack_trace_element(Handle stackFrame, Handle stack_trace_element, TRAPS); --- 1530,1550 ---- class java_lang_StackFrameInfo: AllStatic { private: static int _memberName_offset; static int _bci_offset; static int _version_offset; + static int _contScope_offset; static Method* get_method(Handle stackFrame, InstanceKlass* holder, TRAPS); public: // Setters ! static void set_method_and_bci(Handle stackFrame, const methodHandle& method, int bci, oop cont, TRAPS); static void set_bci(oop info, int value); static void set_version(oop info, short value); + static void set_contScope(oop info, oop value); static void compute_offsets(); static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN; static void to_stack_trace_element(Handle stackFrame, Handle stack_trace_element, TRAPS);
< prev index next >