< prev index next >

src/share/vm/gc_implementation/shared/gcTrace.cpp

Print this page
rev 8910 : full patch for jfr
   1 /*
   2  * Copyright (c) 2012, 2013, Oracle and/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  *


 155 void YoungGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 156   assert_set_gc_id();
 157   assert(_tenuring_threshold != UNSET_TENURING_THRESHOLD, "Tenuring threshold has not been reported");
 158 
 159   GCTracer::report_gc_end_impl(timestamp, time_partitions);
 160   send_young_gc_event();
 161 
 162   _tenuring_threshold = UNSET_TENURING_THRESHOLD;
 163 }
 164 
 165 void YoungGCTracer::report_promotion_failed(const PromotionFailedInfo& pf_info) {
 166   assert_set_gc_id();
 167 
 168   send_promotion_failed_event(pf_info);
 169 }
 170 
 171 void YoungGCTracer::report_tenuring_threshold(const uint tenuring_threshold) {
 172   _tenuring_threshold = tenuring_threshold;
 173 }
 174 
























 175 void OldGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 176   assert_set_gc_id();
 177 
 178   GCTracer::report_gc_end_impl(timestamp, time_partitions);
 179   send_old_gc_event();
 180 }
 181 
 182 void ParallelOldTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 183   assert_set_gc_id();
 184 
 185   OldGCTracer::report_gc_end_impl(timestamp, time_partitions);
 186   send_parallel_old_event();
 187 }
 188 
 189 void ParallelOldTracer::report_dense_prefix(void* dense_prefix) {
 190   assert_set_gc_id();
 191 
 192   _parallel_old_gc_info.report_dense_prefix(dense_prefix);
 193 }
 194 
 195 void OldGCTracer::report_concurrent_mode_failure() {
 196   assert_set_gc_id();
 197 
 198   send_concurrent_mode_failure_event();
 199 }
 200 
 201 #if INCLUDE_ALL_GCS







 202 void G1NewTracer::report_yc_type(G1YCType type) {
 203   assert_set_gc_id();
 204 
 205   _g1_young_gc_info.set_type(type);
 206 }
 207 
 208 void G1NewTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 209   assert_set_gc_id();
 210 
 211   YoungGCTracer::report_gc_end_impl(timestamp, time_partitions);
 212   send_g1_young_gc_event();
 213 }
 214 
 215 void G1NewTracer::report_evacuation_info(EvacuationInfo* info) {
 216   assert_set_gc_id();
 217 
 218   send_evacuation_info_event(info);
 219 }
 220 
 221 void G1NewTracer::report_evacuation_failed(EvacuationFailedInfo& ef_info) {
 222   assert_set_gc_id();
 223 
 224   send_evacuation_failed_event(ef_info);
 225   ef_info.reset();
 226 }















 227 #endif
   1 /*
   2  * Copyright (c) 2012, 2019, Oracle and/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  *


 155 void YoungGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 156   assert_set_gc_id();
 157   assert(_tenuring_threshold != UNSET_TENURING_THRESHOLD, "Tenuring threshold has not been reported");
 158 
 159   GCTracer::report_gc_end_impl(timestamp, time_partitions);
 160   send_young_gc_event();
 161 
 162   _tenuring_threshold = UNSET_TENURING_THRESHOLD;
 163 }
 164 
 165 void YoungGCTracer::report_promotion_failed(const PromotionFailedInfo& pf_info) {
 166   assert_set_gc_id();
 167 
 168   send_promotion_failed_event(pf_info);
 169 }
 170 
 171 void YoungGCTracer::report_tenuring_threshold(const uint tenuring_threshold) {
 172   _tenuring_threshold = tenuring_threshold;
 173 }
 174 
 175 bool YoungGCTracer::should_report_promotion_events() const {
 176   return should_report_promotion_in_new_plab_event() ||
 177           should_report_promotion_outside_plab_event();
 178 }
 179 
 180 bool YoungGCTracer::should_report_promotion_in_new_plab_event() const {
 181   return should_send_promotion_in_new_plab_event();
 182 }
 183 
 184 bool YoungGCTracer::should_report_promotion_outside_plab_event() const {
 185   return should_send_promotion_outside_plab_event();
 186 }
 187 
 188 void YoungGCTracer::report_promotion_in_new_plab_event(Klass* klass, size_t obj_size,
 189                                                        uint age, bool tenured,
 190                                                        size_t plab_size) const {
 191   send_promotion_in_new_plab_event(klass, obj_size, age, tenured, plab_size);
 192 }
 193 
 194 void YoungGCTracer::report_promotion_outside_plab_event(Klass* klass, size_t obj_size,
 195                                                         uint age, bool tenured) const {
 196   send_promotion_outside_plab_event(klass, obj_size, age, tenured);
 197 }
 198 
 199 void OldGCTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 200   assert_set_gc_id();
 201 
 202   GCTracer::report_gc_end_impl(timestamp, time_partitions);
 203   send_old_gc_event();
 204 }
 205 
 206 void ParallelOldTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 207   assert_set_gc_id();
 208 
 209   OldGCTracer::report_gc_end_impl(timestamp, time_partitions);
 210   send_parallel_old_event();
 211 }
 212 
 213 void ParallelOldTracer::report_dense_prefix(void* dense_prefix) {
 214   assert_set_gc_id();
 215 
 216   _parallel_old_gc_info.report_dense_prefix(dense_prefix);
 217 }
 218 
 219 void OldGCTracer::report_concurrent_mode_failure() {
 220   assert_set_gc_id();
 221 
 222   send_concurrent_mode_failure_event();
 223 }
 224 
 225 #if INCLUDE_ALL_GCS
 226 void G1MMUTracer::report_mmu(double time_slice_sec, double gc_time_sec, double max_time_sec, bool gc_thread) {
 227   send_g1_mmu_event(time_slice_sec * MILLIUNITS,
 228                     gc_time_sec * MILLIUNITS,
 229                     max_time_sec * MILLIUNITS,
 230                     gc_thread);
 231 }
 232 
 233 void G1NewTracer::report_yc_type(G1YCType type) {
 234   assert_set_gc_id();
 235 
 236   _g1_young_gc_info.set_type(type);
 237 }
 238 
 239 void G1NewTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions) {
 240   assert_set_gc_id();
 241 
 242   YoungGCTracer::report_gc_end_impl(timestamp, time_partitions);
 243   send_g1_young_gc_event();
 244 }
 245 
 246 void G1NewTracer::report_evacuation_info(EvacuationInfo* info) {
 247   assert_set_gc_id();
 248 
 249   send_evacuation_info_event(info);
 250 }
 251 
 252 void G1NewTracer::report_evacuation_failed(EvacuationFailedInfo& ef_info) {
 253   assert_set_gc_id();
 254 
 255   send_evacuation_failed_event(ef_info);
 256   ef_info.reset();
 257 }
 258 
 259 void G1NewTracer::report_basic_ihop_statistics(size_t threshold,
 260                                                size_t target_ccupancy,
 261                                                size_t current_occupancy,
 262                                                size_t last_allocation_size,
 263                                                double last_allocation_duration,
 264                                                double last_marking_length) {
 265   send_basic_ihop_statistics(threshold,
 266                              target_ccupancy,
 267                              current_occupancy,
 268                              last_allocation_size,
 269                              last_allocation_duration,
 270                              last_marking_length);
 271 }
 272 
 273 #endif
< prev index next >