--- old/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp 2018-10-24 15:56:33.401057165 +0200 +++ new/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp 2018-10-24 15:56:32.977043964 +0200 @@ -203,7 +203,7 @@ if (alloc_buf->contains(obj_ptr)) { _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()); + alloc_buf->word_sz() * HeapWordSize); } else { _g1h->_gc_tracer_stw->report_promotion_outside_plab_event(old->klass(), word_sz * HeapWordSize, age, dest_state.value() == InCSetState::Old); --- old/test/jdk/jdk/jfr/event/gc/detailed/TestPromotionEventWithG1.java 2018-10-24 15:56:35.061108852 +0200 +++ new/test/jdk/jdk/jfr/event/gc/detailed/TestPromotionEventWithG1.java 2018-10-24 15:56:34.599094467 +0200 @@ -26,6 +26,7 @@ /** * @test + * @bug 8212766 * @key jfr * @summary Test that events are created when an object is aged or promoted during a GC and the copying of the object requires a new PLAB or direct heap allocation * @requires vm.hasJFR @@ -33,8 +34,8 @@ * @requires (vm.gc == "G1" | vm.gc == null) * & vm.opt.ExplicitGCInvokesConcurrent != true * @library /test/lib /test/jdk - * @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:+UseG1GC -XX:-UseStringDeduplication -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 - * jdk.jfr.event.gc.detailed.TestPromotionEventWithG1 + * @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:+UseG1GC -XX:-UseStringDeduplication -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 jdk.jfr.event.gc.detailed.TestPromotionEventWithG1 + * @run main/othervm -Xmx32m -Xms32m -Xmn12m -XX:+UseG1GC -XX:-UseStringDeduplication -XX:MaxTenuringThreshold=5 -XX:InitialTenuringThreshold=5 -XX:MinTLABSize=576 -XX:TLABSize=576 jdk.jfr.event.gc.detailed.TestPromotionEventWithG1 */ public class TestPromotionEventWithG1 {