< prev index next >

src/hotspot/share/cds/dumpAllocStats.cpp

Print this page

 85   int all_bytes = all_ro_bytes + all_rw_bytes;
 86 
 87   double all_ro_perc = percent_of(all_ro_bytes, ro_all);
 88   double all_rw_perc = percent_of(all_rw_bytes, rw_all);
 89   double all_perc    = percent_of(all_bytes, ro_all + rw_all);
 90 
 91   msg.debug("%s", sep);
 92   msg.debug(fmt_stats, "Total",
 93                        all_ro_count, all_ro_bytes, all_ro_perc,
 94                        all_rw_count, all_rw_bytes, all_rw_perc,
 95                        all_count, all_bytes, all_perc);
 96 
 97   msg.flush();
 98 
 99   assert(all_ro_bytes == ro_all && all_rw_bytes == rw_all,
100          "everything should have been counted (used/counted: ro %d/%d, rw %d/%d",
101          ro_all, all_ro_bytes, rw_all, all_rw_bytes);
102 
103 #undef fmt_stats
104 }













 85   int all_bytes = all_ro_bytes + all_rw_bytes;
 86 
 87   double all_ro_perc = percent_of(all_ro_bytes, ro_all);
 88   double all_rw_perc = percent_of(all_rw_bytes, rw_all);
 89   double all_perc    = percent_of(all_bytes, ro_all + rw_all);
 90 
 91   msg.debug("%s", sep);
 92   msg.debug(fmt_stats, "Total",
 93                        all_ro_count, all_ro_bytes, all_ro_perc,
 94                        all_rw_count, all_rw_bytes, all_rw_perc,
 95                        all_count, all_bytes, all_perc);
 96 
 97   msg.flush();
 98 
 99   assert(all_ro_bytes == ro_all && all_rw_bytes == rw_all,
100          "everything should have been counted (used/counted: ro %d/%d, rw %d/%d",
101          ro_all, all_ro_bytes, rw_all, all_rw_bytes);
102 
103 #undef fmt_stats
104 }
105 
106 #ifdef ASSERT
107 void DumpAllocStats::verify(int expected_byte_size, bool read_only) const {
108   int bytes = 0;
109   const int what = (int)(read_only ? RO : RW);
110   for (int type = 0; type < int(_number_of_types); type ++) {
111     bytes += _bytes[what][type];
112   }
113   assert(bytes == expected_byte_size, "counter mismatch (%s: %d vs %d)",
114          (read_only ? "RO" : "RW"), bytes, expected_byte_size);
115 }
116 #endif // ASSERT
< prev index next >