54 // Determine which part of the tag is occupied by the level.
55 ErgoLevelShift = 8,
56 ErgoLevelMask = ~((1 << ErgoLevelShift) - 1),
57
58 // ErgoLow is 0 so that we don't have to explicitly or a heuristic
59 // id with ErgoLow to keep its use simpler.
60 ErgoLow = 0,
61 ErgoHigh = 1 << ErgoLevelShift
62 } ErgoLevel;
63
64 // The available heuristics.
65 typedef enum {
66 // Determines which part of the tag is occupied by the heuristic id.
67 ErgoHeuristicMask = ~ErgoLevelMask,
68
69 ErgoHeapSizing = 0,
70 ErgoCSetConstruction,
71 ErgoConcCycles,
72 ErgoMixedGCs,
73 ErgoTiming,
74
75 ErgoHeuristicNum
76 } ErgoHeuristic;
77
78 class G1ErgoVerbose : AllStatic {
79 private:
80 // Determines the minimum verboseness level at which records will be
81 // printed.
82 static ErgoLevel _level;
83 // Determines which heuristics are currently enabled.
84 static bool _enabled[ErgoHeuristicNum];
85
86 static ErgoLevel extract_level(int tag) {
87 return (ErgoLevel) (tag & ErgoLevelMask);
88 }
89
90 static ErgoHeuristic extract_heuristic(int tag) {
91 return (ErgoHeuristic) (tag & ErgoHeuristicMask);
92 }
93
|
54 // Determine which part of the tag is occupied by the level.
55 ErgoLevelShift = 8,
56 ErgoLevelMask = ~((1 << ErgoLevelShift) - 1),
57
58 // ErgoLow is 0 so that we don't have to explicitly or a heuristic
59 // id with ErgoLow to keep its use simpler.
60 ErgoLow = 0,
61 ErgoHigh = 1 << ErgoLevelShift
62 } ErgoLevel;
63
64 // The available heuristics.
65 typedef enum {
66 // Determines which part of the tag is occupied by the heuristic id.
67 ErgoHeuristicMask = ~ErgoLevelMask,
68
69 ErgoHeapSizing = 0,
70 ErgoCSetConstruction,
71 ErgoConcCycles,
72 ErgoMixedGCs,
73 ErgoTiming,
74 ErgoIHOP,
75
76 ErgoHeuristicNum
77 } ErgoHeuristic;
78
79 class G1ErgoVerbose : AllStatic {
80 private:
81 // Determines the minimum verboseness level at which records will be
82 // printed.
83 static ErgoLevel _level;
84 // Determines which heuristics are currently enabled.
85 static bool _enabled[ErgoHeuristicNum];
86
87 static ErgoLevel extract_level(int tag) {
88 return (ErgoLevel) (tag & ErgoLevelMask);
89 }
90
91 static ErgoHeuristic extract_heuristic(int tag) {
92 return (ErgoHeuristic) (tag & ErgoHeuristicMask);
93 }
94
|