hotspot/src/share/vm/gc_implementation/shared/coTracker.hpp
author ysr
Thu, 05 Jun 2008 15:57:56 -0700
changeset 1374 4c24294029a9
permissions -rw-r--r--
6711316: Open source the Garbage-First garbage collector Summary: First mercurial integration of the code for the Garbage-First garbage collector. Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     1
/*
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     2
 * Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     4
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     7
 * published by the Free Software Foundation.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     8
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    13
 * accompanied this code).
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    14
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    18
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    21
 * have any questions.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    22
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    23
 */
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    24
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    25
// COTracker keeps track of the concurrent overhead of a GC thread.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    26
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    27
// A thread that needs to be tracked must, itself, start up its
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    28
// tracker with the start() method and then call the update() method
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    29
// at regular intervals. What the tracker does is to calculate the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    30
// concurrent overhead of a process at a given update period. The
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    31
// tracker starts and when is detects that it has exceeded the given
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    32
// period, it calculates the duration of the period in wall-clock time
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    33
// and the duration of the period in vtime (i.e. how much time the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    34
// concurrent processes really took up during this period). The ratio
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    35
// of the latter over the former is the concurrent overhead of that
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    36
// process for that period over a single CPU. This overhead is stored
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    37
// on the tracker, "timestamped" with the wall-clock time of the end
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    38
// of the period. When the concurrent overhead of this process needs
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    39
// to be queried, this last "reading" provides a good approximation
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    40
// (we assume that the concurrent overhead of a particular thread
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    41
// stays largely constant over time). The timestamp is necessary to
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    42
// detect when the process has stopped working and the recorded
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    43
// reading hasn't been updated for some time.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    44
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    45
// Each concurrent GC thread is considered to be part of a "group"
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    46
// (i.e. any available concurrent marking threads are part of the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    47
// "concurrent marking thread group"). A COTracker is associated with
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    48
// a single group at construction-time. It's up to each collector to
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    49
// decide how groups will be mapped to such an id (ids should start
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    50
// from 0 and be consecutive; there's a hardcoded max group num
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    51
// defined on the GCOverheadTracker class). The notion of a group has
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    52
// been introduced to be able to identify how much overhead was
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    53
// imposed by each group, instead of getting a single value that
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    54
// covers all concurrent overhead.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    55
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    56
class COTracker {
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    57
private:
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    58
  // It indicates whether this tracker is enabled or not. When the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    59
  // tracker is disabled, then it returns 0.0 as the latest concurrent
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    60
  // overhead and several methods (reset, start, and update) are not
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    61
  // supposed to be called on it. This enabling / disabling facility
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    62
  // is really provided to make a bit more explicit in the code when a
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    63
  // particulary tracker of a processes that doesn't run all the time
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    64
  // (e.g. concurrent marking) is supposed to be used and not it's not.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    65
  bool               _enabled;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    66
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    67
  // The ID of the group associated with this tracker.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    68
  int                _group;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    69
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    70
  // The update period of the tracker. A new value for the concurrent
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    71
  // overhead of the associated process will be made at intervals no
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    72
  // smaller than this.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    73
  double             _update_period_sec;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    74
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    75
  // The start times (both wall-block time and vtime) of the current
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    76
  // interval.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    77
  double             _period_start_time_sec;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    78
  double             _period_start_vtime_sec;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    79
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    80
  // Number seq of the concurrent overhead readings within a period
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    81
  NumberSeq          _conc_overhead_seq;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    82
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    83
  // The latest reading of the concurrent overhead (over a single CPU)
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    84
  // imposed by the associated concurrent thread, made available at
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    85
  // the indicated wall-clock time.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    86
  double             _conc_overhead;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    87
  double             _time_stamp_sec;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    88
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    89
  // The number of CPUs that the host machine has (for convenience
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    90
  // really, as we'd have to keep translating it into a double)
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    91
  static double      _cpu_number;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    92
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    93
  // Fields that keep a list of all trackers created. This is useful,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    94
  // since it allows us to sum up the concurrent overhead without
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    95
  // having to write code for a specific collector to broadcast a
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    96
  // request to all its concurrent processes.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    97
  COTracker*         _next;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    98
  static COTracker*  _head;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    99
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   100
  // It indicates that a new period is starting by updating the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   101
  // _period_start_time_sec and _period_start_vtime_sec fields.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   102
  void resetPeriod(double now_sec, double vnow_sec);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   103
  // It updates the latest concurrent overhead reading, taken at a
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   104
  // given wall-clock time.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   105
  void setConcOverhead(double time_stamp_sec, double conc_overhead);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   106
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   107
  // It determines whether the time stamp of the latest concurrent
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   108
  // overhead reading is out of date or not.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   109
  bool outOfDate(double now_sec) {
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   110
    // The latest reading is considered out of date, if it was taken
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   111
    // 1.2x the update period.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   112
    return (now_sec - _time_stamp_sec) > 1.2 * _update_period_sec;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   113
  }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   114
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   115
public:
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   116
  // The constructor which associates the tracker with a group ID.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   117
  COTracker(int group);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   118
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   119
  // Methods to enable / disable the tracker and query whether it is enabled.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   120
  void enable()  { _enabled = true;  }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   121
  void disable() { _enabled = false; }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   122
  bool enabled() { return _enabled;  }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   123
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   124
  // It resets the tracker and sets concurrent overhead reading to be
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   125
  // the given parameter and the associated time stamp to be now.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   126
  void reset(double starting_conc_overhead = 0.0);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   127
  // The tracker starts tracking. IT should only be called from the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   128
  // concurrent thread that is tracked by this tracker.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   129
  void start();
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   130
  // It updates the tracker and, if the current period is longer than
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   131
  // the update period, the concurrent overhead reading will be
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   132
  // updated. force_end being true indicates that it's the last call
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   133
  // to update() by this process before the tracker is disabled (the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   134
  // tracker can be re-enabled later if necessary).  It should only be
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   135
  // called from the concurrent thread that is tracked by this tracker
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   136
  // and while the thread has joined the STS.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   137
  void update(bool force_end = false);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   138
  // It adjusts the contents of the tracker to take into account a STW
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   139
  // pause.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   140
  void updateForSTW(double start_sec, double end_sec);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   141
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   142
  // It returns the last concurrent overhead reading over a single
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   143
  // CPU. If the reading is out of date, or the tracker is disabled,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   144
  // it returns 0.0.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   145
  double concCPUOverhead(double now_sec) {
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   146
    if (!_enabled || outOfDate(now_sec))
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   147
      return 0.0;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   148
    else
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   149
      return _conc_overhead;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   150
  }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   151
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   152
  // It returns the last concurrent overhead reading over all CPUs
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   153
  // that the host machine has. If the reading is out of date, or the
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   154
  // tracker is disabled, it returns 0.0.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   155
  double concOverhead(double now_sec) {
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   156
    return concCPUOverhead(now_sec) / _cpu_number;
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   157
  }
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   158
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   159
  double predConcOverhead();
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   160
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   161
  void resetPred();
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   162
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   163
  // statics
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   164
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   165
  // It notifies all trackers about a STW pause.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   166
  static void updateAllForSTW(double start_sec, double end_sec);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   167
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   168
  // It returns the sum of the concurrent overhead readings of all
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   169
  // available (and enabled) trackers for the given time stamp. The
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   170
  // overhead is over all the CPUs of the host machine.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   171
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   172
  static double totalConcOverhead(double now_sec);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   173
  // Like the previous method, but it also sums up the overheads per
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   174
  // group number. The length of the co_per_group array must be at
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   175
  // least as large group_num
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   176
  static double totalConcOverhead(double now_sec,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   177
                                  size_t group_num,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   178
                                  double* co_per_group);
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   179
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   180
  static double totalPredConcOverhead();
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   181
};