8210492: PLAB object promotion events report object sizes in words
Summary: Properly scale values passed to the JFR event.
Reviewed-by: phh, jcbeyler
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp Tue Oct 16 10:16:04 2018 +0800
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp Tue Oct 16 11:27:21 2018 +0200
@@ -201,11 +201,11 @@
HeapWord * const obj_ptr) const {
PLAB* alloc_buf = _plab_allocator->alloc_buffer(dest_state);
if (alloc_buf->contains(obj_ptr)) {
- _g1h->_gc_tracer_stw->report_promotion_in_new_plab_event(old->klass(), word_sz, age,
+ _g1h->_gc_tracer_stw->report_promotion_in_new_plab_event(old->klass(), word_sz * HeapWordSize, age,
dest_state.value() == InCSetState::Old,
alloc_buf->word_sz());
} else {
- _g1h->_gc_tracer_stw->report_promotion_outside_plab_event(old->klass(), word_sz, age,
+ _g1h->_gc_tracer_stw->report_promotion_outside_plab_event(old->klass(), word_sz * HeapWordSize, age,
dest_state.value() == InCSetState::Old);
}
}