diff src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @ 2225:c798c277ddd1

7015169: GC Cause not always set Summary: Sometimes the gc cause was not always set. This caused JStat to print the wrong information. Reviewed-by: tonyp, ysr Contributed-by: suenaga.yasumasa@oss.ntt.co.jp
author brutisso
date Thu, 03 Feb 2011 20:49:09 -0800
parents 631f79e71e90
children db89aa49298f
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Thu Feb 03 16:06:01 2011 -0500
+++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp	Thu Feb 03 20:49:09 2011 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, 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
@@ -44,7 +44,7 @@
 public:
   VM_G1OperationWithAllocRequest(unsigned int gc_count_before,
                                  size_t       word_size)
-    : VM_GC_Operation(gc_count_before),
+    : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure),
       _word_size(word_size), _result(NULL), _pause_succeeded(false) { }
   HeapWord* result() { return _result; }
   bool pause_succeeded() { return _pause_succeeded; }
@@ -55,9 +55,7 @@
   VM_G1CollectFull(unsigned int gc_count_before,
                    unsigned int full_gc_count_before,
                    GCCause::Cause cause)
-    : VM_GC_Operation(gc_count_before, full_gc_count_before) {
-    _gc_cause = cause;
-  }
+    : VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { }
   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
   virtual void doit();
   virtual const char* name() const {