21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_SHARED_GCNAME_HPP
26 #define SHARE_GC_SHARED_GCNAME_HPP
27
28 #include "utilities/debug.hpp"
29
30 enum GCName {
31 ParallelOld,
32 SerialOld,
33 ParallelScavenge,
34 DefNew,
35 G1New,
36 G1Old,
37 G1Full,
38 ZMinor,
39 ZMajor,
40 Shenandoah,
41 NA,
42 GCNameEndSentinel
43 };
44
45 class GCNameHelper {
46 public:
47 static const char* to_string(GCName name) {
48 switch(name) {
49 case ParallelOld: return "ParallelOld";
50 case SerialOld: return "SerialOld";
51 case ParallelScavenge: return "ParallelScavenge";
52 case DefNew: return "DefNew";
53 case G1New: return "G1New";
54 case G1Old: return "G1Old";
55 case G1Full: return "G1Full";
56 case ZMinor: return "ZGC Minor";
57 case ZMajor: return "ZGC Major";
58 case Shenandoah: return "Shenandoah";
59 case NA: return "N/A";
60 default: ShouldNotReachHere(); return nullptr;
61 }
62 }
63 };
64
65 #endif // SHARE_GC_SHARED_GCNAME_HPP
|
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_SHARED_GCNAME_HPP
26 #define SHARE_GC_SHARED_GCNAME_HPP
27
28 #include "utilities/debug.hpp"
29
30 enum GCName {
31 ParallelOld,
32 SerialOld,
33 ParallelScavenge,
34 DefNew,
35 G1New,
36 G1Old,
37 G1Full,
38 ZMinor,
39 ZMajor,
40 Shenandoah,
41 ShenandoahYoung,
42 ShenandoahOld,
43 NA,
44 GCNameEndSentinel
45 };
46
47 class GCNameHelper {
48 public:
49 static const char* to_string(GCName name) {
50 switch(name) {
51 case ParallelOld: return "ParallelOld";
52 case SerialOld: return "SerialOld";
53 case ParallelScavenge: return "ParallelScavenge";
54 case DefNew: return "DefNew";
55 case G1New: return "G1New";
56 case G1Old: return "G1Old";
57 case G1Full: return "G1Full";
58 case ZMinor: return "ZGC Minor";
59 case ZMajor: return "ZGC Major";
60 case Shenandoah: return "Shenandoah";
61 case ShenandoahYoung: return "Shenandoah Young";
62 case ShenandoahOld: return "Shenandoah Old";
63 case NA: return "N/A";
64 default: ShouldNotReachHere(); return nullptr;
65 }
66 }
67 };
68
69 #endif // SHARE_GC_SHARED_GCNAME_HPP
|