24 |
24 |
25 #ifndef SHARE_VM_JFR_LEAKPROFILER_CHAINS_DFSCLOSURE_HPP |
25 #ifndef SHARE_VM_JFR_LEAKPROFILER_CHAINS_DFSCLOSURE_HPP |
26 #define SHARE_VM_JFR_LEAKPROFILER_CHAINS_DFSCLOSURE_HPP |
26 #define SHARE_VM_JFR_LEAKPROFILER_CHAINS_DFSCLOSURE_HPP |
27 |
27 |
28 #include "memory/iterator.hpp" |
28 #include "memory/iterator.hpp" |
29 #include "oops/oop.hpp" |
|
30 |
29 |
31 class BitSet; |
30 class BitSet; |
32 class Edge; |
31 class Edge; |
33 class EdgeStore; |
32 class EdgeStore; |
34 class EdgeQueue; |
33 class EdgeQueue; |
35 |
34 |
36 // Class responsible for iterating the heap depth-first |
35 // Class responsible for iterating the heap depth-first |
37 class DFSClosure: public ExtendedOopClosure { // XXX BasicOopIterateClosure |
36 class DFSClosure : public ExtendedOopClosure { // XXX BasicOopIterateClosure |
38 private: |
37 private: |
39 static EdgeStore* _edge_store; |
38 static EdgeStore* _edge_store; |
40 static BitSet* _mark_bits; |
39 static BitSet* _mark_bits; |
41 static const Edge*_start_edge; |
40 static const Edge*_start_edge; |
42 static size_t _max_depth; |
41 static size_t _max_depth; |
55 DFSClosure(); |
54 DFSClosure(); |
56 |
55 |
57 public: |
56 public: |
58 static void find_leaks_from_edge(EdgeStore* edge_store, BitSet* mark_bits, const Edge* start_edge); |
57 static void find_leaks_from_edge(EdgeStore* edge_store, BitSet* mark_bits, const Edge* start_edge); |
59 static void find_leaks_from_root_set(EdgeStore* edge_store, BitSet* mark_bits); |
58 static void find_leaks_from_root_set(EdgeStore* edge_store, BitSet* mark_bits); |
|
59 void do_root(const oop* ref); |
60 |
60 |
61 virtual void do_oop(oop* ref); |
61 virtual void do_oop(oop* ref); |
62 virtual void do_oop(narrowOop* ref); |
62 virtual void do_oop(narrowOop* ref); |
63 }; |
63 }; |
64 |
64 |