--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp Mon Apr 08 21:01:17 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp Mon Apr 08 12:15:40 2019 -0700
@@ -205,7 +205,7 @@
// Outside of GC pauses, the number of bytes used in all regions other
// than the current allocation region(s).
- size_t _summary_bytes_used;
+ volatile size_t _summary_bytes_used;
void increase_used(size_t bytes);
void decrease_used(size_t bytes);
@@ -1258,6 +1258,8 @@
uint eden_regions_count() const { return _eden.length(); }
uint survivor_regions_count() const { return _survivor.length(); }
+ size_t eden_regions_used_bytes() const { return _eden.used_bytes(); }
+ size_t survivor_regions_used_bytes() const { return _survivor.used_bytes(); }
uint young_regions_count() const { return _eden.length() + _survivor.length(); }
uint old_regions_count() const { return _old_set.length(); }
uint archive_regions_count() const { return _archive_set.length(); }