157 }
158 msg.info("Shared %s table stats -------- base: " PTR_FORMAT,
159 table_name, (intptr_t)base_address);
160 msg.info("Number of entries : %9d", _num_entries);
161 msg.info("Total bytes used : %9d", table_bytes);
162 msg.info("Average bytes per entry : %9.3f", avg_cost);
163 msg.info("Average bucket size : %9.3f", summary.avg());
164 msg.info("Variance of bucket size : %9.3f", summary.variance());
165 msg.info("Std. dev. of bucket size: %9.3f", summary.sd());
166 msg.info("Empty buckets : %9d", _num_empty_buckets);
167 msg.info("Value_Only buckets : %9d", _num_value_only_buckets);
168 msg.info("Other buckets : %9d", _num_other_buckets);
169 }
170 }
171
172 /////////////////////////////////////////////////////////////
173 //
174 // The CompactHashtable implementation
175 //
176
177 void SimpleCompactHashtable::serialize(SerializeClosure* soc) {
178 soc->do_ptr((void**)&_base_address);
179 soc->do_u4(&_entry_count);
180 soc->do_u4(&_bucket_count);
181 soc->do_ptr((void**)&_buckets);
182 soc->do_ptr((void**)&_entries);
183 }
184 #endif // INCLUDE_CDS
185
186 #ifndef O_BINARY // if defined (Win32) use binary files.
187 #define O_BINARY 0 // otherwise do nothing.
188 #endif
189
190 ////////////////////////////////////////////////////////
191 //
192 // HashtableTextDump
193 //
194 HashtableTextDump::HashtableTextDump(const char* filename) : _fd(-1) {
195 struct stat st;
196 if (os::stat(filename, &st) != 0) {
197 quit("Unable to get hashtable dump file size", filename);
|
157 }
158 msg.info("Shared %s table stats -------- base: " PTR_FORMAT,
159 table_name, (intptr_t)base_address);
160 msg.info("Number of entries : %9d", _num_entries);
161 msg.info("Total bytes used : %9d", table_bytes);
162 msg.info("Average bytes per entry : %9.3f", avg_cost);
163 msg.info("Average bucket size : %9.3f", summary.avg());
164 msg.info("Variance of bucket size : %9.3f", summary.variance());
165 msg.info("Std. dev. of bucket size: %9.3f", summary.sd());
166 msg.info("Empty buckets : %9d", _num_empty_buckets);
167 msg.info("Value_Only buckets : %9d", _num_value_only_buckets);
168 msg.info("Other buckets : %9d", _num_other_buckets);
169 }
170 }
171
172 /////////////////////////////////////////////////////////////
173 //
174 // The CompactHashtable implementation
175 //
176
177 void SimpleCompactHashtable::serialize_header(SerializeClosure* soc) {
178 soc->do_ptr((void**)&_base_address);
179 soc->do_u4(&_entry_count);
180 soc->do_u4(&_bucket_count);
181 soc->do_ptr((void**)&_buckets);
182 soc->do_ptr((void**)&_entries);
183 }
184 #endif // INCLUDE_CDS
185
186 #ifndef O_BINARY // if defined (Win32) use binary files.
187 #define O_BINARY 0 // otherwise do nothing.
188 #endif
189
190 ////////////////////////////////////////////////////////
191 //
192 // HashtableTextDump
193 //
194 HashtableTextDump::HashtableTextDump(const char* filename) : _fd(-1) {
195 struct stat st;
196 if (os::stat(filename, &st) != 0) {
197 quit("Unable to get hashtable dump file size", filename);
|