Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8276842 G1: Only calculate size in bytes from words when needed #6305

Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -41,7 +41,7 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
G1CollectedHeap* _g1h;
G1ConcurrentMark* _cm;
HeapRegion* _hr;
size_t _marked_bytes;
size_t _marked_words;
bool _during_concurrent_start;
uint _worker_id;
HeapWord* _last_forwarded_object_end;
@@ -53,12 +53,12 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
_last_forwarded_object_end(hr->bottom()) { }

size_t marked_bytes() { return _marked_bytes; }
size_t marked_bytes() { return _marked_words * HeapWordSize; }

// Iterate over the live objects in the region to find self-forwarded objects
// that need to be kept live. We need to update the remembered sets of these
@@ -96,7 +96,7 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
size_t obj_size = obj->size();

_marked_bytes += (obj_size * HeapWordSize);
_marked_words += obj_size;

HeapWord* obj_end = obj_addr + obj_size;