Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8063511 | 8u45 | Thomas Schatzl | P5 | Resolved | Fixed | b01 |
JDK-8049592 | 8u40 | Thomas Schatzl | P5 | Resolved | Fixed | b01 |
JDK-8070796 | emb-8u47 | Thomas Schatzl | P5 | Resolved | Fixed | team |
After JDK-8038930 the calculation of the static memory used by the code root chunk manager is wrong: instead of
86 size_t G1CodeRootChunkManager::static_mem_size() {
87 return sizeof(this);
88 }
Also in other places the code uses sizeof(this) instead of sizeof(class name), e.g.
$ grep -r "sizeof(this)" src/share/vm/gc_implementation/g1/
src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) +
src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) +_next->mem_size();
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this);
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this) + _list.count() * _list.size();
src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp: + (sizeof(this) - sizeof(OtherRegionsTable))
src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp: return sizeof(this) + _bm.size_in_words() * HeapWordSize;
All these terms are wrong, should use sizeof(*this) or sizeof(class name).
Fix this.
86 size_t G1CodeRootChunkManager::static_mem_size() {
87 return sizeof(this);
88 }
Also in other places the code uses sizeof(this) instead of sizeof(class name), e.g.
$ grep -r "sizeof(this)" src/share/vm/gc_implementation/g1/
src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) +
src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) +_next->mem_size();
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this);
src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this) + _list.count() * _list.size();
src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp: + (sizeof(this) - sizeof(OtherRegionsTable))
src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp: return sizeof(this) + _bm.size_in_words() * HeapWordSize;
All these terms are wrong, should use sizeof(*this) or sizeof(class name).
Fix this.
- backported by
-
JDK-8049592 G1: Memory usage calculation uses sizeof(this) instead of sizeof(classname)
-
- Resolved
-
-
JDK-8063511 G1: Memory usage calculation uses sizeof(this) instead of sizeof(classname)
-
- Resolved
-
-
JDK-8070796 G1: Memory usage calculation uses sizeof(this) instead of sizeof(classname)
-
- Resolved
-
- relates to
-
JDK-8038930 G1CodeRootSet::test fails with assert(_num_chunks_handed_out == 0) failed: No elements must have been handed out yet
-
- Resolved
-