equal
deleted
inserted
replaced
25 #ifndef SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |
25 #ifndef SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |
26 #define SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |
26 #define SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |
27 |
27 |
28 #include "jfr/recorder/checkpoint/jfrCheckpointBlob.hpp" |
28 #include "jfr/recorder/checkpoint/jfrCheckpointBlob.hpp" |
29 #include "jfr/utilities/jfrTypes.hpp" |
29 #include "jfr/utilities/jfrTypes.hpp" |
30 #include "utilities/sizes.hpp" |
|
31 |
30 |
32 class JavaThread; |
31 class JavaThread; |
33 class JfrBuffer; |
32 class JfrBuffer; |
34 class JfrStackFrame; |
33 class JfrStackFrame; |
|
34 class Thread; |
35 |
35 |
36 class JfrThreadLocal { |
36 class JfrThreadLocal { |
37 private: |
37 private: |
38 jobject _java_event_writer; |
38 jobject _java_event_writer; |
39 mutable JfrBuffer* _java_buffer; |
39 mutable JfrBuffer* _java_buffer; |
54 |
54 |
55 JfrBuffer* install_native_buffer() const; |
55 JfrBuffer* install_native_buffer() const; |
56 JfrBuffer* install_java_buffer() const; |
56 JfrBuffer* install_java_buffer() const; |
57 JfrStackFrame* install_stackframes() const; |
57 JfrStackFrame* install_stackframes() const; |
58 |
58 |
59 void set_dead(); |
59 static void release(JfrThreadLocal* tl, Thread* t); |
60 |
60 |
61 public: |
61 public: |
62 JfrThreadLocal(); |
62 JfrThreadLocal(); |
63 |
63 |
64 JfrBuffer* native_buffer() const { |
64 JfrBuffer* native_buffer() const { |
211 |
211 |
212 bool has_thread_checkpoint() const; |
212 bool has_thread_checkpoint() const; |
213 void set_thread_checkpoint(const JfrCheckpointBlobHandle& handle); |
213 void set_thread_checkpoint(const JfrCheckpointBlobHandle& handle); |
214 const JfrCheckpointBlobHandle& thread_checkpoint() const; |
214 const JfrCheckpointBlobHandle& thread_checkpoint() const; |
215 |
215 |
216 static JfrBuffer* acquire(Thread* t, size_t size = 0); |
216 static void on_start(Thread* t); |
217 static void release(JfrBuffer* buffer, Thread* t); |
217 static void on_exit(Thread* t); |
218 static void destroy_stackframes(Thread* t); |
|
219 static void on_exit(JavaThread* t); |
|
220 static void on_destruct(Thread* t); |
|
221 |
218 |
222 // Code generation |
219 // Code generation |
223 static ByteSize trace_id_offset() { |
220 static ByteSize trace_id_offset(); |
224 return in_ByteSize(offset_of(JfrThreadLocal, _trace_id)); |
221 static ByteSize java_event_writer_offset(); |
225 } |
|
226 |
|
227 static ByteSize java_event_writer_offset() { |
|
228 return in_ByteSize(offset_of(JfrThreadLocal, _java_event_writer)); |
|
229 } |
|
230 }; |
222 }; |
231 |
223 |
232 #endif // SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |
224 #endif // SHARE_VM_JFR_SUPPORT_JFRTHREADLOCAL_HPP |