8008966: NPG: Inefficient Metaspace counter functions cause large young GC regressions

Reviewed-by: mgerdin, coleenp
This commit is contained in:
Jon Masamitsu 2013-02-12 14:15:45 -08:00
parent eafc00bc25
commit d72b516201
12 changed files with 398 additions and 175 deletions

View file

@ -238,8 +238,8 @@ void FileMapInfo::write_header() {
void FileMapInfo::write_space(int i, Metaspace* space, bool read_only) {
align_file_position();
size_t used = space->used_words(Metaspace::NonClassType) * BytesPerWord;
size_t capacity = space->capacity_words(Metaspace::NonClassType) * BytesPerWord;
size_t used = space->used_bytes_slow(Metaspace::NonClassType);
size_t capacity = space->capacity_bytes_slow(Metaspace::NonClassType);
struct FileMapInfo::FileMapHeader::space_info* si = &_header._space[i];
write_region(i, (char*)space->bottom(), used, capacity, read_only, false);
}