24 |
24 |
25 #ifndef SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |
25 #ifndef SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |
26 #define SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |
26 #define SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |
27 |
27 |
28 #include "memory/allocation.hpp" |
28 #include "memory/allocation.hpp" |
29 #include "utilities/exceptions.hpp" |
29 #include "jfr/utilities/jfrTypes.hpp" |
30 |
30 |
31 class EdgeStore; |
31 class EdgeStore; |
|
32 class JavaThread; |
|
33 class JfrCheckpointWriter; |
|
34 class JfrStackTrace; |
32 class JfrStackTraceRepository; |
35 class JfrStackTraceRepository; |
33 class JfrCheckpointWriter; |
36 class Klass; |
|
37 class Method; |
|
38 class ObjectSample; |
34 class ObjectSampleMarker; |
39 class ObjectSampleMarker; |
|
40 class ObjectSampler; |
|
41 class Thread; |
35 |
42 |
36 class ObjectSampleCheckpoint : AllStatic { |
43 class ObjectSampleCheckpoint : AllStatic { |
|
44 friend class EventEmitter; |
|
45 friend class PathToGcRootsOperation; |
|
46 friend class StackTraceBlobInstaller; |
|
47 private: |
|
48 static void add_to_leakp_set(const Method* method, traceid method_id); |
|
49 static int save_mark_words(const ObjectSampler* sampler, ObjectSampleMarker& marker, bool emit_all); |
|
50 static void write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer); |
|
51 static void write(const ObjectSampler* sampler, EdgeStore* edge_store, bool emit_all, Thread* thread); |
37 public: |
52 public: |
38 static void install(JfrCheckpointWriter& writer, bool class_unload, bool resume); |
53 static void on_klass_unload(const Klass* k); |
39 static void write(const EdgeStore* edge_store, bool emit_all, Thread* thread); |
54 static void on_type_set(JfrCheckpointWriter& writer); |
40 static int mark(ObjectSampleMarker& marker, bool emit_all); |
55 static void on_type_set_unload(JfrCheckpointWriter& writer); |
41 }; |
56 static void on_thread_exit(JavaThread* jt); |
42 |
57 static void on_rotation(const ObjectSampler* sampler, JfrStackTraceRepository& repo); |
43 class WriteObjectSampleStacktrace : public StackObj { |
|
44 private: |
|
45 JfrStackTraceRepository& _stack_trace_repo; |
|
46 public: |
|
47 WriteObjectSampleStacktrace(JfrStackTraceRepository& repo); |
|
48 bool process(); |
|
49 }; |
58 }; |
50 |
59 |
51 #endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |
60 #endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP |