< prev index next >

src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp

Print this page
rev 49680 : imported patch 6672778-partial-queue-trimming
   1 /*
   2  * Copyright (c) 2013, 2017, 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  *


 178   // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
 179   void debug_time_for_reference(const char* name, double value) const;
 180   void trace_time(const char* name, double value) const;
 181   void trace_count(const char* name, size_t value) const;
 182 
 183   double print_pre_evacuate_collection_set() const;
 184   double print_evacuate_collection_set() const;
 185   double print_post_evacuate_collection_set() const;
 186   void print_other(double accounted_ms) const;
 187 
 188  public:
 189   G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
 190   void note_gc_start();
 191   void print();
 192 
 193   // record the time a phase took in seconds
 194   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 195 
 196   // add a number of seconds to a phase
 197   void add_time_secs(GCParPhases phase, uint worker_i, double secs);



 198 
 199   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
 200 
 201   // return the average time for a phase in milliseconds
 202   double average_time_ms(GCParPhases phase);
 203 
 204   size_t sum_thread_work_items(GCParPhases phase, uint index = 0);
 205 
 206  public:
 207 
 208   void record_prepare_tlab_time_ms(double ms) {
 209     _cur_prepare_tlab_time_ms = ms;
 210   }
 211 
 212   void record_resize_tlab_time_ms(double ms) {
 213     _cur_resize_tlab_time_ms = ms;
 214   }
 215 
 216   void record_derived_pointer_table_update_time(double ms) {
 217     _cur_derived_pointer_table_update_time_ms = ms;


   1 /*
   2  * Copyright (c) 2013, 2018, 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  *


 178   // This will print logs for both 'gc+phases' and 'gc+phases+ref'.
 179   void debug_time_for_reference(const char* name, double value) const;
 180   void trace_time(const char* name, double value) const;
 181   void trace_count(const char* name, size_t value) const;
 182 
 183   double print_pre_evacuate_collection_set() const;
 184   double print_evacuate_collection_set() const;
 185   double print_post_evacuate_collection_set() const;
 186   void print_other(double accounted_ms) const;
 187 
 188  public:
 189   G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads);
 190   void note_gc_start();
 191   void print();
 192 
 193   // record the time a phase took in seconds
 194   void record_time_secs(GCParPhases phase, uint worker_i, double secs);
 195 
 196   // add a number of seconds to a phase
 197   void add_time_secs(GCParPhases phase, uint worker_i, double secs);
 198 
 199   // Move a number of seconds from one phase to another.
 200   void move_time_secs(GCParPhases from, GCParPhases to, uint worker_i, double secs);
 201 
 202   void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
 203 
 204   // return the average time for a phase in milliseconds
 205   double average_time_ms(GCParPhases phase);
 206 
 207   size_t sum_thread_work_items(GCParPhases phase, uint index = 0);
 208 
 209  public:
 210 
 211   void record_prepare_tlab_time_ms(double ms) {
 212     _cur_prepare_tlab_time_ms = ms;
 213   }
 214 
 215   void record_resize_tlab_time_ms(double ms) {
 216     _cur_resize_tlab_time_ms = ms;
 217   }
 218 
 219   void record_derived_pointer_table_update_time(double ms) {
 220     _cur_derived_pointer_table_update_time_ms = ms;


< prev index next >