< prev index next >

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

Print this page
rev 57464 : [mq]: fix
   1 /*
   2  * Copyright (c) 2001, 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  *


  35 //   - VM_G1CollectFull
  36 
  37 class VM_G1CollectFull : public VM_GC_Operation {
  38   bool _gc_succeeded;
  39 
  40 public:
  41   VM_G1CollectFull(uint gc_count_before,
  42                    uint full_gc_count_before,
  43                    GCCause::Cause cause) :
  44     VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true),
  45     _gc_succeeded(false) { }
  46   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  47   virtual void doit();
  48   bool gc_succeeded() const { return _gc_succeeded; }
  49 };
  50 
  51 class VM_G1TryInitiateConcMark : public VM_GC_Operation {
  52   double _target_pause_time_ms;
  53   bool _transient_failure;
  54   bool _cycle_already_in_progress;

  55   bool _gc_succeeded;
  56 
  57 public:
  58   VM_G1TryInitiateConcMark(uint gc_count_before,
  59                            GCCause::Cause gc_cause,
  60                            double target_pause_time_ms);
  61   virtual VMOp_Type type() const { return VMOp_G1TryInitiateConcMark; }
  62   virtual bool doit_prologue();
  63   virtual void doit();
  64   bool transient_failure() const { return _transient_failure; }
  65   bool cycle_already_in_progress() const { return _cycle_already_in_progress; }

  66   bool gc_succeeded() const { return _gc_succeeded; }
  67 };
  68 
  69 class VM_G1CollectForAllocation : public VM_CollectForAllocation {
  70   bool _gc_succeeded;
  71   double _target_pause_time_ms;
  72 
  73 public:
  74   VM_G1CollectForAllocation(size_t         word_size,
  75                             uint           gc_count_before,
  76                             GCCause::Cause gc_cause,
  77                             double         target_pause_time_ms);
  78   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  79   virtual void doit();
  80   bool gc_succeeded() const { return _gc_succeeded; }
  81 };
  82 
  83 // Concurrent G1 stop-the-world operations such as remark and cleanup.
  84 class VM_G1Concurrent : public VM_Operation {
  85   VoidClosure* _cl;
   1 /*
   2  * Copyright (c) 2001, 2020, 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  *


  35 //   - VM_G1CollectFull
  36 
  37 class VM_G1CollectFull : public VM_GC_Operation {
  38   bool _gc_succeeded;
  39 
  40 public:
  41   VM_G1CollectFull(uint gc_count_before,
  42                    uint full_gc_count_before,
  43                    GCCause::Cause cause) :
  44     VM_GC_Operation(gc_count_before, cause, full_gc_count_before, true),
  45     _gc_succeeded(false) { }
  46   virtual VMOp_Type type() const { return VMOp_G1CollectFull; }
  47   virtual void doit();
  48   bool gc_succeeded() const { return _gc_succeeded; }
  49 };
  50 
  51 class VM_G1TryInitiateConcMark : public VM_GC_Operation {
  52   double _target_pause_time_ms;
  53   bool _transient_failure;
  54   bool _cycle_already_in_progress;
  55   bool _terminating;
  56   bool _gc_succeeded;
  57 
  58 public:
  59   VM_G1TryInitiateConcMark(uint gc_count_before,
  60                            GCCause::Cause gc_cause,
  61                            double target_pause_time_ms);
  62   virtual VMOp_Type type() const { return VMOp_G1TryInitiateConcMark; }
  63   virtual bool doit_prologue();
  64   virtual void doit();
  65   bool transient_failure() const { return _transient_failure; }
  66   bool cycle_already_in_progress() const { return _cycle_already_in_progress; }
  67   bool terminating() const { return _terminating; }
  68   bool gc_succeeded() const { return _gc_succeeded; }
  69 };
  70 
  71 class VM_G1CollectForAllocation : public VM_CollectForAllocation {
  72   bool _gc_succeeded;
  73   double _target_pause_time_ms;
  74 
  75 public:
  76   VM_G1CollectForAllocation(size_t         word_size,
  77                             uint           gc_count_before,
  78                             GCCause::Cause gc_cause,
  79                             double         target_pause_time_ms);
  80   virtual VMOp_Type type() const { return VMOp_G1CollectForAllocation; }
  81   virtual void doit();
  82   bool gc_succeeded() const { return _gc_succeeded; }
  83 };
  84 
  85 // Concurrent G1 stop-the-world operations such as remark and cleanup.
  86 class VM_G1Concurrent : public VM_Operation {
  87   VoidClosure* _cl;
< prev index next >