8210492: PLAB object promotion events report object sizes in words
authortschatzl
Tue, 16 Oct 2018 11:27:21 +0200
changeset 52136 b52336cdb42d
parent 52135 6a297371a9b4
child 52137 fea91995e077
8210492: PLAB object promotion events report object sizes in words Summary: Properly scale values passed to the JFR event. Reviewed-by: phh, jcbeyler
src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
--- 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);
   }
 }