65 case StartGC: return "StartGC"; 66 case EndGC: return "EndGC"; 67 case StartFullGC: return "StartFullGC"; 68 case EndFullGC: return "EndFullGC"; 69 default: ShouldNotReachHere(); 70 } 71 // trying to keep the Windows compiler happy 72 return NULL; 73 } 74 75 #define G1HR_PREFIX " G1HR" 76 77 void G1HRPrinter::print(ActionType action, RegionType type, 78 HeapRegion* hr, HeapWord* top) { 79 const char* action_str = action_name(action); 80 const char* type_str = region_type_name(type); 81 HeapWord* bottom = hr->bottom(); 82 83 if (type_str != NULL) { 84 if (top != NULL) { 85 gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT" "PTR_FORMAT, 86 action_str, type_str, p2i(bottom), p2i(top)); 87 } else { 88 gclog_or_tty->print_cr(G1HR_PREFIX" %s(%s) "PTR_FORMAT, 89 action_str, type_str, p2i(bottom)); 90 } 91 } else { 92 if (top != NULL) { 93 gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT" "PTR_FORMAT, 94 action_str, p2i(bottom), p2i(top)); 95 } else { 96 gclog_or_tty->print_cr(G1HR_PREFIX" %s "PTR_FORMAT, 97 action_str, p2i(bottom)); 98 } 99 } 100 } 101 102 void G1HRPrinter::print(ActionType action, HeapWord* bottom, HeapWord* end) { 103 const char* action_str = action_name(action); 104 105 gclog_or_tty->print_cr(G1HR_PREFIX" %s ["PTR_FORMAT","PTR_FORMAT"]", 106 action_str, p2i(bottom), p2i(end)); 107 } 108 109 void G1HRPrinter::print(PhaseType phase, size_t phase_num) { 110 const char* phase_str = phase_name(phase); 111 gclog_or_tty->print_cr(G1HR_PREFIX" #%s "SIZE_FORMAT, phase_str, phase_num); 112 } | 65 case StartGC: return "StartGC"; 66 case EndGC: return "EndGC"; 67 case StartFullGC: return "StartFullGC"; 68 case EndFullGC: return "EndFullGC"; 69 default: ShouldNotReachHere(); 70 } 71 // trying to keep the Windows compiler happy 72 return NULL; 73 } 74 75 #define G1HR_PREFIX " G1HR" 76 77 void G1HRPrinter::print(ActionType action, RegionType type, 78 HeapRegion* hr, HeapWord* top) { 79 const char* action_str = action_name(action); 80 const char* type_str = region_type_name(type); 81 HeapWord* bottom = hr->bottom(); 82 83 if (type_str != NULL) { 84 if (top != NULL) { 85 gclog_or_tty->print_cr(G1HR_PREFIX " %s(%s) " PTR_FORMAT " " PTR_FORMAT, 86 action_str, type_str, p2i(bottom), p2i(top)); 87 } else { 88 gclog_or_tty->print_cr(G1HR_PREFIX " %s(%s) " PTR_FORMAT, 89 action_str, type_str, p2i(bottom)); 90 } 91 } else { 92 if (top != NULL) { 93 gclog_or_tty->print_cr(G1HR_PREFIX " %s " PTR_FORMAT " " PTR_FORMAT, 94 action_str, p2i(bottom), p2i(top)); 95 } else { 96 gclog_or_tty->print_cr(G1HR_PREFIX " %s " PTR_FORMAT, 97 action_str, p2i(bottom)); 98 } 99 } 100 } 101 102 void G1HRPrinter::print(ActionType action, HeapWord* bottom, HeapWord* end) { 103 const char* action_str = action_name(action); 104 105 gclog_or_tty->print_cr(G1HR_PREFIX " %s [" PTR_FORMAT "," PTR_FORMAT "]", 106 action_str, p2i(bottom), p2i(end)); 107 } 108 109 void G1HRPrinter::print(PhaseType phase, size_t phase_num) { 110 const char* phase_str = phase_name(phase); 111 gclog_or_tty->print_cr(G1HR_PREFIX " #%s " SIZE_FORMAT, phase_str, phase_num); 112 } |