comparison src/share/vm/memory/genRemSet.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 63a4eb8bcd23
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
25 #ifndef SHARE_VM_MEMORY_GENREMSET_HPP 25 #ifndef SHARE_VM_MEMORY_GENREMSET_HPP
26 #define SHARE_VM_MEMORY_GENREMSET_HPP 26 #define SHARE_VM_MEMORY_GENREMSET_HPP
27 27
28 #include "oops/oop.hpp" 28 #include "oops/oop.hpp"
29 29
30 // A GenRemSet provides ways of iterating over pointers across generations. 30 // A GenRemSet provides ways of iterating over pointers accross generations.
31 // (This is especially useful for older-to-younger.) 31 // (This is especially useful for older-to-younger.)
32 32
33 class Generation; 33 class Generation;
34 class BarrierSet; 34 class BarrierSet;
35 class OopsInGenClosure; 35 class OopsInGenClosure;
51 51
52 BarrierSet* _bs; 52 BarrierSet* _bs;
53 KlassRemSet _klass_rem_set; 53 KlassRemSet _klass_rem_set;
54 54
55 public: 55 public:
56 enum Name {
57 CardTable,
58 Other
59 };
60
56 GenRemSet(BarrierSet * bs) : _bs(bs) {} 61 GenRemSet(BarrierSet * bs) : _bs(bs) {}
57 GenRemSet() : _bs(NULL) {} 62 GenRemSet() : _bs(NULL) {}
58 63
64 virtual Name rs_kind() = 0;
65
59 // These are for dynamic downcasts. Unfortunately that it names the 66 // These are for dynamic downcasts. Unfortunately that it names the
60 // possible subtypes (but not that they are subtypes!) Return NULL if 67 // possible subtypes (but not that they are subtypes!) Return NULL if
61 // the cast is invalid. 68 // the cast is invalide.
62 virtual CardTableRS* as_CardTableRS() { return NULL; } 69 virtual CardTableRS* as_CardTableRS() { return NULL; }
63 70
64 // Return the barrier set associated with "this." 71 // Return the barrier set associated with "this."
65 BarrierSet* bs() { return _bs; } 72 BarrierSet* bs() { return _bs; }
66 73
97 104
98 // If the rem set imposes any alignment restrictions on boundaries 105 // If the rem set imposes any alignment restrictions on boundaries
99 // within the heap, this function tells whether they are met. 106 // within the heap, this function tells whether they are met.
100 virtual bool is_aligned(HeapWord* addr) = 0; 107 virtual bool is_aligned(HeapWord* addr) = 0;
101 108
102 // Returns any alignment constraint that the remembered set imposes upon the 109 // If the RS (or BS) imposes an aligment constraint on maximum heap size.
103 // heap. 110 // (This must be static, and dispatch on "nm", because it is called
104 static uintx max_alignment_constraint(); 111 // before an RS is created.)
112 static uintx max_alignment_constraint(Name nm);
105 113
106 virtual void verify() = 0; 114 virtual void verify() = 0;
107 115
108 // Verify that the remembered set has no entries for 116 // Verify that the remembered set has no entries for
109 // the heap interval denoted by mr. If there are any 117 // the heap interval denoted by mr. If there are any