hotspot/src/share/vm/gc/g1/g1EvacFailure.hpp
author ehelin
Fri, 05 Feb 2016 16:03:56 +0100
changeset 35943 e726308008c0
parent 34311 586e90e84d60
child 36202 219f8808c3bd
permissions -rw-r--r--
8148973: Rename g1/concurrentMark.{hpp,cpp,inline.hpp} to g1/g1ConcurrentMark.{hpp,cpp,inline.hpp} Reviewed-by: tschatzl, mgerdin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     1
/*
35943
e726308008c0 8148973: Rename g1/concurrentMark.{hpp,cpp,inline.hpp} to g1/g1ConcurrentMark.{hpp,cpp,inline.hpp}
ehelin
parents: 34311
diff changeset
     2
 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     4
 *
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     8
 *
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    13
 * accompanied this code).
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    14
 *
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    18
 *
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    21
 * questions.
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    22
 *
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    23
 */
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    25
#ifndef SHARE_VM_GC_G1_G1EVACFAILURE_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    26
#define SHARE_VM_GC_G1_G1EVACFAILURE_HPP
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    27
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    28
#include "gc/g1/g1OopClosures.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    29
#include "gc/g1/heapRegionManager.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    30
#include "gc/shared/workgroup.hpp"
29080
a16b0d9a08f5 8072910: Move the g1EvacFailure.hpp implementation to g1EvacFailure.cpp
stefank
parents: 27009
diff changeset
    31
#include "utilities/globalDefinitions.hpp"
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    32
29080
a16b0d9a08f5 8072910: Move the g1EvacFailure.hpp implementation to g1EvacFailure.cpp
stefank
parents: 27009
diff changeset
    33
class G1CollectedHeap;
11455
a6ab3d8b9a4c 6888336: G1: avoid explicitly marking and pushing objects in survivor spaces
tonyp
parents: 11451
diff changeset
    34
34311
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    35
class OopAndMarkOop {
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    36
  oop _o;
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    37
  markOop _m;
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    38
 public:
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    39
  OopAndMarkOop(oop obj, markOop m) : _o(obj), _m(m) {
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    40
  }
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    41
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    42
  void set_mark() {
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    43
    _o->set_mark(_m);
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    44
  }
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    45
};
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    46
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    47
typedef Stack<OopAndMarkOop,mtGC> OopAndMarkOopStack;
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    48
29080
a16b0d9a08f5 8072910: Move the g1EvacFailure.hpp implementation to g1EvacFailure.cpp
stefank
parents: 27009
diff changeset
    49
// Task to fixup self-forwarding pointers
a16b0d9a08f5 8072910: Move the g1EvacFailure.hpp implementation to g1EvacFailure.cpp
stefank
parents: 27009
diff changeset
    50
// installed as a result of an evacuation failure.
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    51
class G1ParRemoveSelfForwardPtrsTask: public AbstractGangTask {
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    52
protected:
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    53
  G1CollectedHeap* _g1h;
27009
e7e723732b6b 8058298: Separate heap region iterator claim values from the data structures iterated over
mlarsson
parents: 26846
diff changeset
    54
  HeapRegionClaimer _hrclaimer;
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    55
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    56
public:
31631
4536cf7bc89f 8129558: Coalesce dead objects during removal of self-forwarded pointers
tschatzl
parents: 30764
diff changeset
    57
  G1ParRemoveSelfForwardPtrsTask();
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    58
29080
a16b0d9a08f5 8072910: Move the g1EvacFailure.hpp implementation to g1EvacFailure.cpp
stefank
parents: 27009
diff changeset
    59
  void work(uint worker_id);
11451
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    60
};
9c9aa4d85660 7121496: G1: do the per-region evacuation failure handling work in parallel
johnc
parents:
diff changeset
    61
34311
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    62
class G1RestorePreservedMarksTask : public AbstractGangTask {
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    63
  OopAndMarkOopStack* _preserved_objs;
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    64
 public:
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    65
  G1RestorePreservedMarksTask(OopAndMarkOopStack* preserved_objs);
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    66
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    67
  void work(uint worker_id);
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    68
};
586e90e84d60 8142404: Parallelize the restoring of preserved marks
ehelin
parents: 31631
diff changeset
    69
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 29080
diff changeset
    70
#endif // SHARE_VM_GC_G1_G1EVACFAILURE_HPP