diff src/share/vm/memory/filemap.cpp @ 10183:868d87ed63c8

8008966: NPG: Inefficient Metaspace counter functions cause large young GC regressions Reviewed-by: mgerdin, coleenp
author jmasa
date Tue, 12 Feb 2013 14:15:45 -0800
parents 91bf0bdae37b
children 221df7e37535
line wrap: on
line diff
--- a/src/share/vm/memory/filemap.cpp	Thu Apr 18 10:09:23 2013 -0700
+++ b/src/share/vm/memory/filemap.cpp	Tue Feb 12 14:15:45 2013 -0800
@@ -238,8 +238,8 @@
 
 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);
 }