--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp Thu Oct 17 20:53:35 2019 +0100
@@ -26,26 +26,35 @@
#define SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP
#include "memory/allocation.hpp"
-#include "utilities/exceptions.hpp"
+#include "jfr/utilities/jfrTypes.hpp"
class EdgeStore;
-class JfrStackTraceRepository;
+class JavaThread;
class JfrCheckpointWriter;
+class JfrStackTrace;
+class JfrStackTraceRepository;
+class Klass;
+class Method;
+class ObjectSample;
class ObjectSampleMarker;
+class ObjectSampler;
+class Thread;
class ObjectSampleCheckpoint : AllStatic {
+ friend class EventEmitter;
+ friend class PathToGcRootsOperation;
+ friend class StackTraceBlobInstaller;
+ private:
+ static void add_to_leakp_set(const Method* method, traceid method_id);
+ static int save_mark_words(const ObjectSampler* sampler, ObjectSampleMarker& marker, bool emit_all);
+ static void write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer);
+ static void write(const ObjectSampler* sampler, EdgeStore* edge_store, bool emit_all, Thread* thread);
public:
- static void install(JfrCheckpointWriter& writer, bool class_unload, bool resume);
- static void write(const EdgeStore* edge_store, bool emit_all, Thread* thread);
- static int mark(ObjectSampleMarker& marker, bool emit_all);
-};
-
-class WriteObjectSampleStacktrace : public StackObj {
- private:
- JfrStackTraceRepository& _stack_trace_repo;
- public:
- WriteObjectSampleStacktrace(JfrStackTraceRepository& repo);
- bool process();
+ static void on_klass_unload(const Klass* k);
+ static void on_type_set(JfrCheckpointWriter& writer);
+ static void on_type_set_unload(JfrCheckpointWriter& writer);
+ static void on_thread_exit(JavaThread* jt);
+ static void on_rotation(const ObjectSampler* sampler, JfrStackTraceRepository& repo);
};
#endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP