hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
changeset 3279 1af8fdb08664
parent 3278 652f923606a4
child 3583 805584e16d0f
equal deleted inserted replaced
3278:652f923606a4 3279:1af8fdb08664
  1653 
  1653 
  1654 
  1654 
  1655 // Computes the sum of the storage used by the various regions.
  1655 // Computes the sum of the storage used by the various regions.
  1656 
  1656 
  1657 size_t G1CollectedHeap::used() const {
  1657 size_t G1CollectedHeap::used() const {
  1658   // Temporarily, until 6859911 is fixed. XXX
  1658   assert(Heap_lock->owner() != NULL,
  1659   // assert(Heap_lock->owner() != NULL,
  1659          "Should be owned on this thread's behalf.");
  1660   //        "Should be owned on this thread's behalf.");
       
  1661   size_t result = _summary_bytes_used;
  1660   size_t result = _summary_bytes_used;
  1662   // Read only once in case it is set to NULL concurrently
  1661   // Read only once in case it is set to NULL concurrently
  1663   HeapRegion* hr = _cur_alloc_region;
  1662   HeapRegion* hr = _cur_alloc_region;
  1664   if (hr != NULL)
  1663   if (hr != NULL)
  1665     result += hr->used();
  1664     result += hr->used();