< prev index next >

src/hotspot/share/gc/z/zStat.cpp

Print this page




1111   _ncontinue = ncontinue;
1112 }
1113 
1114 void ZStatMark::print() {
1115   log_info(gc, marking)("Mark: "
1116                         SIZE_FORMAT " stripe(s), "
1117                         SIZE_FORMAT " proactive flush(es), "
1118                         SIZE_FORMAT " terminate flush(es), "
1119                         SIZE_FORMAT " completion(s), "
1120                         SIZE_FORMAT " continuation(s) ",
1121                         _nstripes,
1122                         _nproactiveflush,
1123                         _nterminateflush,
1124                         _ntrycomplete,
1125                         _ncontinue);
1126 }
1127 
1128 //
1129 // Stat relocation
1130 //
1131 ZStatRelocation::Group ZStatRelocation::_small;
1132 ZStatRelocation::Group ZStatRelocation::_medium;
1133 ZStatRelocation::Group ZStatRelocation::_large;
1134 bool                   ZStatRelocation::_success;
1135 
1136 void ZStatRelocation::set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small,
1137                                                    const ZRelocationSetSelectorGroupStats& medium,
1138                                                    const ZRelocationSetSelectorGroupStats& large) {
1139   _small._npages = small.npages();
1140   _small._total = small.total();
1141   _small._empty = small.empty();
1142   _small._compacting_from = small.compacting_from();
1143   _small._compacting_to = small.compacting_to();
1144 
1145   _medium._npages = medium.npages();
1146   _medium._total = medium.total();
1147   _medium._empty = medium.empty();
1148   _medium._compacting_from = medium.compacting_from();
1149   _medium._compacting_to = medium.compacting_to();
1150 
1151   _large._npages = large.npages();
1152   _large._total = large.total();
1153   _large._empty = large.empty();
1154   _large._compacting_from = large.compacting_from();
1155   _large._compacting_to = large.compacting_to();
1156 }
1157 
1158 void ZStatRelocation::set_at_relocate_end(bool success) {
1159   _success = success;
1160 }
1161 
1162 void ZStatRelocation::print(const char* name, const ZStatRelocation::Group& group) {
1163   const size_t total = _small._total + _medium._total + _large._total;
1164 
1165   log_info(gc, reloc)("%s Pages: " SIZE_FORMAT " / " ZSIZE_FMT ", Empty: " ZSIZE_FMT ", Compacting: " ZSIZE_FMT "->" ZSIZE_FMT,
1166                       name,
1167                       group._npages,
1168                       ZSIZE_ARGS_WITH_MAX(group._total, total),
1169                       ZSIZE_ARGS_WITH_MAX(group._empty, total),
1170                       ZSIZE_ARGS_WITH_MAX(group._compacting_from, total),
1171                       ZSIZE_ARGS_WITH_MAX(group._compacting_to, total));
1172 }
1173 
1174 void ZStatRelocation::print() {
1175   print("Small", _small);
1176   print("Medium", _medium);
1177   print("Large", _large);
1178 
1179   log_info(gc, reloc)("Relocation: %s", _success ? "Successful" : "Incomplete");
1180 }
1181 
1182 //
1183 // Stat nmethods
1184 //
1185 void ZStatNMethods::print() {
1186   log_info(gc, nmethod)("NMethods: " SIZE_FORMAT " registered, " SIZE_FORMAT " unregistered",
1187                         ZNMethodTable::registered_nmethods(),
1188                         ZNMethodTable::unregistered_nmethods());
1189 }
1190 
1191 //
1192 // Stat metaspace
1193 //
1194 void ZStatMetaspace::print() {
1195   log_info(gc, metaspace)("Metaspace: "
1196                           SIZE_FORMAT "M used, " SIZE_FORMAT "M capacity, "
1197                           SIZE_FORMAT "M committed, " SIZE_FORMAT "M reserved",


1295 void ZStatHeap::set_at_mark_start(size_t soft_max_capacity,
1296                                   size_t capacity,
1297                                   size_t used) {
1298   _at_mark_start.soft_max_capacity = soft_max_capacity;
1299   _at_mark_start.capacity = capacity;
1300   _at_mark_start.reserve = reserve(used);
1301   _at_mark_start.used = used;
1302   _at_mark_start.free = free(used);
1303 }
1304 
1305 void ZStatHeap::set_at_mark_end(size_t capacity,
1306                                 size_t allocated,
1307                                 size_t used) {
1308   _at_mark_end.capacity = capacity;
1309   _at_mark_end.reserve = reserve(used);
1310   _at_mark_end.allocated = allocated;
1311   _at_mark_end.used = used;
1312   _at_mark_end.free = free(used);
1313 }
1314 
1315 void ZStatHeap::set_at_select_relocation_set(const ZRelocationSetSelectorGroupStats& small,
1316                                              const ZRelocationSetSelectorGroupStats& medium,
1317                                              const ZRelocationSetSelectorGroupStats& large,
1318                                              size_t reclaimed) {
1319   const size_t live = small.live() + medium.live() + large.live();
1320   const size_t garbage = small.garbage() + medium.garbage() + large.garbage();
1321 
1322   _at_mark_end.live = live;
1323   _at_mark_end.garbage = garbage;
1324 
1325   _at_relocate_start.garbage = garbage - reclaimed;
1326   _at_relocate_start.reclaimed = reclaimed;
1327 }
1328 
1329 void ZStatHeap::set_at_relocate_start(size_t capacity,
1330                                       size_t allocated,
1331                                       size_t used) {
1332   _at_relocate_start.capacity = capacity;
1333   _at_relocate_start.reserve = reserve(used);
1334   _at_relocate_start.allocated = allocated;
1335   _at_relocate_start.used = used;
1336   _at_relocate_start.free = free(used);
1337 }
1338 
1339 void ZStatHeap::set_at_relocate_end(size_t capacity,
1340                                     size_t allocated,




1111   _ncontinue = ncontinue;
1112 }
1113 
1114 void ZStatMark::print() {
1115   log_info(gc, marking)("Mark: "
1116                         SIZE_FORMAT " stripe(s), "
1117                         SIZE_FORMAT " proactive flush(es), "
1118                         SIZE_FORMAT " terminate flush(es), "
1119                         SIZE_FORMAT " completion(s), "
1120                         SIZE_FORMAT " continuation(s) ",
1121                         _nstripes,
1122                         _nproactiveflush,
1123                         _nterminateflush,
1124                         _ntrycomplete,
1125                         _ncontinue);
1126 }
1127 
1128 //
1129 // Stat relocation
1130 //
1131 ZRelocationSetSelectorStats ZStatRelocation::_stats;
1132 bool                        ZStatRelocation::_success;
1133 
1134 void ZStatRelocation::set_at_select_relocation_set(const ZRelocationSetSelectorStats& stats) {
1135   _stats = stats;




















1136 }
1137 
1138 void ZStatRelocation::set_at_relocate_end(bool success) {
1139   _success = success;
1140 }
1141 
1142 void ZStatRelocation::print(const char* name, const ZRelocationSetSelectorGroupStats& group) {
1143   const size_t total = _stats.small().total() + _stats.medium().total() + _stats.large().total();
1144 
1145   log_info(gc, reloc)("%s Pages: " SIZE_FORMAT " / " ZSIZE_FMT ", Empty: " ZSIZE_FMT ", Compacting: " ZSIZE_FMT "->" ZSIZE_FMT,
1146                       name,
1147                       group.npages(),
1148                       ZSIZE_ARGS_WITH_MAX(group.total(), total),
1149                       ZSIZE_ARGS_WITH_MAX(group.empty(), total),
1150                       ZSIZE_ARGS_WITH_MAX(group.compacting_from(), total),
1151                       ZSIZE_ARGS_WITH_MAX(group.compacting_to(), total));
1152 }
1153 
1154 void ZStatRelocation::print() {
1155   print("Small", _stats.small());
1156   print("Medium", _stats.medium());
1157   print("Large", _stats.large());
1158 
1159   log_info(gc, reloc)("Relocation: %s", _success ? "Successful" : "Incomplete");
1160 }
1161 
1162 //
1163 // Stat nmethods
1164 //
1165 void ZStatNMethods::print() {
1166   log_info(gc, nmethod)("NMethods: " SIZE_FORMAT " registered, " SIZE_FORMAT " unregistered",
1167                         ZNMethodTable::registered_nmethods(),
1168                         ZNMethodTable::unregistered_nmethods());
1169 }
1170 
1171 //
1172 // Stat metaspace
1173 //
1174 void ZStatMetaspace::print() {
1175   log_info(gc, metaspace)("Metaspace: "
1176                           SIZE_FORMAT "M used, " SIZE_FORMAT "M capacity, "
1177                           SIZE_FORMAT "M committed, " SIZE_FORMAT "M reserved",


1275 void ZStatHeap::set_at_mark_start(size_t soft_max_capacity,
1276                                   size_t capacity,
1277                                   size_t used) {
1278   _at_mark_start.soft_max_capacity = soft_max_capacity;
1279   _at_mark_start.capacity = capacity;
1280   _at_mark_start.reserve = reserve(used);
1281   _at_mark_start.used = used;
1282   _at_mark_start.free = free(used);
1283 }
1284 
1285 void ZStatHeap::set_at_mark_end(size_t capacity,
1286                                 size_t allocated,
1287                                 size_t used) {
1288   _at_mark_end.capacity = capacity;
1289   _at_mark_end.reserve = reserve(used);
1290   _at_mark_end.allocated = allocated;
1291   _at_mark_end.used = used;
1292   _at_mark_end.free = free(used);
1293 }
1294 
1295 void ZStatHeap::set_at_select_relocation_set(const ZRelocationSetSelectorStats& stats, size_t reclaimed) {
1296   const size_t live = stats.small().live() + stats.medium().live() + stats.large().live();
1297   const size_t garbage = stats.small().garbage() + stats.medium().garbage() + stats.large().garbage();



1298 
1299   _at_mark_end.live = live;
1300   _at_mark_end.garbage = garbage;
1301 
1302   _at_relocate_start.garbage = garbage - reclaimed;
1303   _at_relocate_start.reclaimed = reclaimed;
1304 }
1305 
1306 void ZStatHeap::set_at_relocate_start(size_t capacity,
1307                                       size_t allocated,
1308                                       size_t used) {
1309   _at_relocate_start.capacity = capacity;
1310   _at_relocate_start.reserve = reserve(used);
1311   _at_relocate_start.allocated = allocated;
1312   _at_relocate_start.used = used;
1313   _at_relocate_start.free = free(used);
1314 }
1315 
1316 void ZStatHeap::set_at_relocate_end(size_t capacity,
1317                                     size_t allocated,


< prev index next >