src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.hpp
branchJEP-349-branch
changeset 57870 00860d9caf4d
parent 53244 9807daeb47c4
child 57934 9c150f2b1fea
equal deleted inserted replaced
57862:84ef29ccac56 57870:00860d9caf4d
    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"
       
    30 
    29 
    31 class EdgeStore;
    30 class EdgeStore;
       
    31 class Klass;
       
    32 class JavaThread;
       
    33 class JfrCheckpointWriter;
       
    34 class JfrStackTrace;
    32 class JfrStackTraceRepository;
    35 class JfrStackTraceRepository;
    33 class JfrCheckpointWriter;
    36 class ObjectSample;
    34 class ObjectSampleMarker;
    37 class ObjectSampleMarker;
       
    38 class ObjectSampler;
       
    39 class Thread;
    35 
    40 
    36 class ObjectSampleCheckpoint : AllStatic {
    41 class ObjectSampleCheckpoint : AllStatic {
    37  public:
    42  public:
    38   static void install(JfrCheckpointWriter& writer, bool class_unload, bool resume);
    43   static void on_klass_unload(const Klass* k);
    39   static void write(const EdgeStore* edge_store, bool emit_all, Thread* thread);
    44   static void on_type_set_unload(JfrCheckpointWriter& writer);
    40   static int mark(ObjectSampleMarker& marker, bool emit_all);
    45   static void on_thread_exit(JavaThread* jt);
    41 };
    46   static void resolve_sampled_objects();
    42 
    47   static void rotate(const ObjectSampler* sampler, JfrStackTraceRepository& repo);
    43 class WriteObjectSampleStacktrace : public StackObj {
    48   static void tag(const ObjectSample* sample);
    44  private:
    49   static bool tag(const JfrStackTrace* trace, JfrCheckpointWriter* writer = NULL);
    45   JfrStackTraceRepository& _stack_trace_repo;
    50   static int save_mark_words(const ObjectSampler* sampler, ObjectSampleMarker& marker, bool emit_all);
    46  public:
    51   static void write(const ObjectSampler* sampler, EdgeStore* edge_store, bool emit_all, Thread* thread);
    47   WriteObjectSampleStacktrace(JfrStackTraceRepository& repo);
       
    48   bool process();
       
    49 };
    52 };
    50 
    53 
    51 #endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP
    54 #endif // SHARE_JFR_LEAKPROFILER_CHECKPOINT_OBJECTSAMPLECHECKPOINT_HPP