void KlassInfoEntry::print_on(outputStream* st) const { ResourceMark rm; const char* name;; if (_klass->klass_part()->name() != NULL) { name = _klass->klass_part()->external_name(); } else { if (_klass == Universe::klassKlassObj()) name = "<klassKlass>"; else if (_klass == Universe::arrayKlassKlassObj()) name = "<arrayKlassKlass>"; else if (_klass == Universe::objArrayKlassKlassObj()) name = "<objArrayKlassKlass>"; else if (_klass == Universe::instanceKlassKlassObj()) name = "<instanceKlassKlass>"; else if (_klass == Universe::typeArrayKlassKlassObj()) name = "<typeArrayKlassKlass>"; else if (_klass == Universe::boolArrayKlassObj()) name = "<boolArrayKlass>"; else if (_klass == Universe::charArrayKlassObj()) name = "<charArrayKlass>"; else if (_klass == Universe::singleArrayKlassObj()) name = "<singleArrayKlass>"; else if (_klass == Universe::doubleArrayKlassObj()) name = "<doubleArrayKlass>"; else if (_klass == Universe::byteArrayKlassObj()) name = "<byteArrayKlass>"; else if (_klass == Universe::shortArrayKlassObj()) name = "<shortArrayKlass>"; else if (_klass == Universe::intArrayKlassObj()) name = "<intArrayKlass>"; else if (_klass == Universe::longArrayKlassObj()) name = "<longArrayKlass>"; else if (_klass == Universe::methodKlassObj()) name = "<methodKlass>"; else if (_klass == Universe::constMethodKlassObj()) name = "<constMethodKlass>"; else if (_klass == Universe::methodDataKlassObj()) name = "<methodDataKlass>"; else if (_klass == Universe::constantPoolKlassObj()) name = "<constantPoolKlass>"; else if (_klass == Universe::constantPoolCacheKlassObj()) name = "<constantPoolCacheKlass>"; else if (_klass == Universe::compiledICHolderKlassObj()) name = "<compiledICHolderKlass>"; else name = "<no name>"; } // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s", (jlong) _instance_count, (julong) _instance_words * HeapWordSize, name); }
void KlassInfoEntry::print_on(outputStream* st) const { ResourceMark rm; // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s", (jlong) _instance_count, (julong) _instance_words * HeapWordSize, name()); }
void KlassInfoEntry::print_on(outputStream* st) const { ResourceMark rm; // simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit ModuleEntry* module = _klass->module(); if (module->is_named()) { st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s (%s@%s)", (int64_t)_instance_count, (uint64_t)_instance_words * HeapWordSize, name(), module->name()->as_C_string(), module->version() != NULL ? module->version()->as_C_string() : ""); } else { st->print_cr(INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13) " %s", (int64_t)_instance_count, (uint64_t)_instance_words * HeapWordSize, name()); } }
void KlassInfoHisto::print_elements(outputStream* st) const { // simplify the formatting (ILP32 vs LP64) - store the sum in 64-bit jlong total = 0; julong totalw = 0; for(int i=0; i < elements()->length(); i++) { st->print("%4d: ", i+1); elements()->at(i)->print_on(st); total += elements()->at(i)->count(); totalw += elements()->at(i)->words(); } st->print_cr("Total " INT64_FORMAT_W(13) " " UINT64_FORMAT_W(13), total, totalw * HeapWordSize); }
void print(outputStream* st) { st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", _min, _max); }
void Flag::print_on(outputStream* st, bool withComments, bool printRanges) { // Don't print notproduct and develop flags in a product build. if (is_constant_in_binary()) { return; } if (!printRanges) { st->print("%9s %-40s %c= ", _type, _name, (!is_default() ? ':' : ' ')); if (is_bool()) { st->print("%-16s", get_bool() ? "true" : "false"); } else if (is_int()) { st->print("%-16d", get_int()); } else if (is_uint()) { st->print("%-16u", get_uint()); } else if (is_intx()) { st->print(INTX_FORMAT_W(-16), get_intx()); } else if (is_uintx()) { st->print(UINTX_FORMAT_W(-16), get_uintx()); } else if (is_uint64_t()) { st->print(UINT64_FORMAT_W(-16), get_uint64_t()); } else if (is_size_t()) { st->print(SIZE_FORMAT_W(-16), get_size_t()); } else if (is_double()) { st->print("%-16f", get_double()); } else if (is_ccstr()) { const char* cp = get_ccstr(); if (cp != NULL) { const char* eol; while ((eol = strchr(cp, '\n')) != NULL) { size_t llen = pointer_delta(eol, cp, sizeof(char)); st->print("%.*s", (int)llen, cp); st->cr(); cp = eol+1; st->print("%5s %-35s += ", "", _name); } st->print("%-16s", cp); } else st->print("%-16s", ""); } st->print("%-20s", " "); print_kind(st); #ifndef PRODUCT if (withComments) { st->print("%s", _doc); } #endif st->cr(); } else if (!is_bool() && !is_ccstr()) { if (printRanges) { st->print("%9s %-50s ", _type, _name); CommandLineFlagRangeList::print(_name, st, true); st->print(" %-20s", " "); print_kind(st); #ifndef PRODUCT if (withComments) { st->print("%s", _doc); } #endif st->cr(); } } }