1 /* 2 * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "gc/shenandoah/shenandoahEvacInfo.hpp" 27 #include "gc/shenandoah/shenandoahTrace.hpp" 28 #include "jfr/jfrEvents.hpp" 29 30 void ShenandoahTracer::report_evacuation_info(ShenandoahEvacuationInformation* info) { 31 send_evacuation_info_event(info); 32 } 33 34 void ShenandoahTracer::send_evacuation_info_event(ShenandoahEvacuationInformation* info) { 35 EventShenandoahEvacuationInformation e; 36 if (e.should_commit()) { 37 e.set_gcId(GCId::current()); 38 e.set_cSetRegions(info->collection_set_regions()); 39 e.set_cSetUsedBefore(info->collection_set_used_before()); 40 e.set_cSetUsedAfter(info->collection_set_used_after()); 41 e.set_collectedOld(info->collected_old()); 42 e.set_collectedPromoted(info->collected_promoted()); 43 e.set_collectedYoung(info->collected_young()); 44 e.set_regionsPromotedHumongous(info->regions_promoted_humongous()); 45 e.set_regionsPromotedRegular(info->regions_promoted_regular()); 46 e.set_regularPromotedGarbage(info->regular_promoted_garbage()); 47 e.set_regularPromotedFree(info->regular_promoted_free()); 48 e.set_regionsFreed(info->regions_freed()); 49 e.set_regionsImmediate(info->regions_immediate()); 50 e.set_immediateBytes(info->immediate_size()); 51 52 e.commit(); 53 } 54 }