< prev index next > src/hotspot/share/cds/dumpAllocStats.cpp
Print this page
msg.debug("Class CP entries = %d, archived = %d (%3.1f%%)",
_num_klass_cp_entries, _num_klass_cp_entries_archived,
percent_of(_num_klass_cp_entries_archived, _num_klass_cp_entries));
}
+
+ #ifdef ASSERT
+ void DumpAllocStats::verify(int expected_byte_size, bool read_only) const {
+ int bytes = 0;
+ const int what = (int)(read_only ? RO : RW);
+ for (int type = 0; type < int(_number_of_types); type ++) {
+ bytes += _bytes[what][type];
+ }
+ assert(bytes == expected_byte_size, "counter mismatch (%s: %d vs %d)",
+ (read_only ? "RO" : "RW"), bytes, expected_byte_size);
+ }
+ #endif // ASSERT
+
< prev index next >