--- a/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp Mon Apr 08 21:01:17 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp Mon Apr 08 12:15:40 2019 -0700
@@ -34,6 +34,7 @@
class G1SurvivorRegions {
private:
GrowableArray<HeapRegion*>* _regions;
+ volatile size_t _used_bytes;
public:
G1SurvivorRegions();
@@ -49,6 +50,11 @@
const GrowableArray<HeapRegion*>* regions() const {
return _regions;
}
+
+ // Used bytes of all survivor regions.
+ size_t used_bytes() const { return _used_bytes; }
+
+ void add_used_bytes(size_t used_bytes);
};
#endif // SHARE_GC_G1_G1SURVIVORREGIONS_HPP