< prev index next >

src/share/vm/gc_implementation/g1/g1GCPhaseTimes.hpp

Print this page
rev 7903 : imported patch 8073013-add-detailed-information-about-plab-memory-usage


  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 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "gc_interface/gcCause.hpp"

  30 
  31 template <class T>
  32 class WorkerDataArray  : public CHeapObj<mtGC> {
  33   T*          _data;
  34   uint        _length;
  35   const char* _print_format;
  36   bool        _print_sum;
  37 
  38   NOT_PRODUCT(static const T _uninitialized;)
  39 
  40   // We are caching the sum and average to only have to calculate them once.
  41   // This is not done in an MT-safe way. It is intended to allow single
  42   // threaded code to call sum() and average() multiple times in any order
  43   // without having to worry about the cost.
  44   bool   _has_new_data;
  45   T      _sum;
  46   double _average;
  47 
  48  public:
  49   WorkerDataArray(uint length, const char* print_format, bool print_sum = true) :




  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 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1GCPHASETIMESLOG_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "gc_interface/gcCause.hpp"
  30 #include "g1InCSetState.hpp"
  31 
  32 template <class T>
  33 class WorkerDataArray  : public CHeapObj<mtGC> {
  34   T*          _data;
  35   uint        _length;
  36   const char* _print_format;
  37   bool        _print_sum;
  38 
  39   NOT_PRODUCT(static const T _uninitialized;)
  40 
  41   // We are caching the sum and average to only have to calculate them once.
  42   // This is not done in an MT-safe way. It is intended to allow single
  43   // threaded code to call sum() and average() multiple times in any order
  44   // without having to worry about the cost.
  45   bool   _has_new_data;
  46   T      _sum;
  47   double _average;
  48 
  49  public:
  50   WorkerDataArray(uint length, const char* print_format, bool print_sum = true) :


< prev index next >