26 #define SHARE_GC_SHARED_WEAKPROCESSORPHASES_HPP
27
28 #include "gc/shared/oopStorageSet.hpp"
29 #include "memory/allocation.hpp"
30 #include "utilities/globalDefinitions.hpp"
31 #include "utilities/macros.hpp"
32
33 class BoolObjectClosure;
34 class OopClosure;
35 class OopStorage;
36
37 class WeakProcessorPhases : AllStatic {
38 public:
39 class Iterator;
40
41 typedef void (*Processor)(BoolObjectClosure*, OopClosure*);
42
43 enum Phase {
44 // Serial phases.
45 JVMTI_ONLY(jvmti JFR_ONLY(COMMA))
46 JFR_ONLY(jfr)
47
48 // Additional implicit phase values follow for oopstorages.
49 };
50
51 static const uint serial_phase_start = 0;
52 static const uint serial_phase_count = 0 JVMTI_ONLY(+ 1) JFR_ONLY(+ 1);
53 static const uint oopstorage_phase_start = serial_phase_count;
54 static const uint oopstorage_phase_count = OopStorageSet::weak_count;
55 static const uint phase_count = serial_phase_count + oopstorage_phase_count;
56
57 // Precondition: value < serial_phase_count
58 static Phase serial_phase(uint value);
59
60 // Precondition: value < oopstorage_phase_count
61 static Phase oopstorage_phase(uint value);
62
63 // Indexes relative to the corresponding phase_start constant.
64 // Precondition: is_serial(phase) or is_oopstorage(phase) accordingly
65 static uint serial_index(Phase phase);
66 static uint oopstorage_index(Phase phase);
67
68 static bool is_serial(Phase phase);
69 static bool is_oopstorage(Phase phase);
70
71 static Iterator serial_iterator();
72 static Iterator oopstorage_iterator();
|
26 #define SHARE_GC_SHARED_WEAKPROCESSORPHASES_HPP
27
28 #include "gc/shared/oopStorageSet.hpp"
29 #include "memory/allocation.hpp"
30 #include "utilities/globalDefinitions.hpp"
31 #include "utilities/macros.hpp"
32
33 class BoolObjectClosure;
34 class OopClosure;
35 class OopStorage;
36
37 class WeakProcessorPhases : AllStatic {
38 public:
39 class Iterator;
40
41 typedef void (*Processor)(BoolObjectClosure*, OopClosure*);
42
43 enum Phase {
44 // Serial phases.
45 JVMTI_ONLY(jvmti JFR_ONLY(COMMA))
46 JFR_ONLY(jfr TSAN_ONLY(COMMA))
47 TSAN_ONLY(tsan)
48
49 // Additional implicit phase values follow for oopstorages.
50 };
51
52 static const uint serial_phase_start = 0;
53 static const uint serial_phase_count = 0 JVMTI_ONLY(+ 1) JFR_ONLY(+ 1) TSAN_ONLY(+ 1);
54 static const uint oopstorage_phase_start = serial_phase_count;
55 static const uint oopstorage_phase_count = OopStorageSet::weak_count;
56 static const uint phase_count = serial_phase_count + oopstorage_phase_count;
57
58 // Precondition: value < serial_phase_count
59 static Phase serial_phase(uint value);
60
61 // Precondition: value < oopstorage_phase_count
62 static Phase oopstorage_phase(uint value);
63
64 // Indexes relative to the corresponding phase_start constant.
65 // Precondition: is_serial(phase) or is_oopstorage(phase) accordingly
66 static uint serial_index(Phase phase);
67 static uint oopstorage_index(Phase phase);
68
69 static bool is_serial(Phase phase);
70 static bool is_oopstorage(Phase phase);
71
72 static Iterator serial_iterator();
73 static Iterator oopstorage_iterator();
|