--- old/src/share/vm/gc_implementation/shared/ageTable.cpp 2019-01-28 17:43:45.000000000 +0800 +++ new/src/share/vm/gc_implementation/shared/ageTable.cpp 2019-01-28 17:43:45.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "gc_implementation/shared/ageTable.hpp" #include "gc_implementation/shared/gcPolicyCounters.hpp" +#include "gc_implementation/shared/ageTableTracer.hpp" #include "memory/collectorPolicy.hpp" #include "memory/resourceArea.hpp" #include "memory/sharedHeap.hpp" @@ -92,7 +93,7 @@ } uint result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold; - if (PrintTenuringDistribution || UsePerfData) { + if (PrintTenuringDistribution || UsePerfData || (EnableJFR && AgeTableTracer::is_tenuring_distribution_event_enabled())) { if (PrintTenuringDistribution) { gclog_or_tty->cr(); @@ -110,6 +111,11 @@ age, sizes[age]*oopSize, total*oopSize); } } + + if (EnableJFR) { + AgeTableTracer::send_tenuring_distribution_event(age, sizes[age] * oopSize); + } + if (UsePerfData) { _perf_sizes[age]->set_value(sizes[age]*oopSize); }