Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/genRemSet.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 63a4eb8bcd23 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2013, 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 accross generations. | 30 // A GenRemSet provides ways of iterating over pointers across 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 | |
61 GenRemSet(BarrierSet * bs) : _bs(bs) {} | 56 GenRemSet(BarrierSet * bs) : _bs(bs) {} |
62 GenRemSet() : _bs(NULL) {} | 57 GenRemSet() : _bs(NULL) {} |
63 | 58 |
64 virtual Name rs_kind() = 0; | |
65 | |
66 // These are for dynamic downcasts. Unfortunately that it names the | 59 // These are for dynamic downcasts. Unfortunately that it names the |
67 // possible subtypes (but not that they are subtypes!) Return NULL if | 60 // possible subtypes (but not that they are subtypes!) Return NULL if |
68 // the cast is invalide. | 61 // the cast is invalid. |
69 virtual CardTableRS* as_CardTableRS() { return NULL; } | 62 virtual CardTableRS* as_CardTableRS() { return NULL; } |
70 | 63 |
71 // Return the barrier set associated with "this." | 64 // Return the barrier set associated with "this." |
72 BarrierSet* bs() { return _bs; } | 65 BarrierSet* bs() { return _bs; } |
73 | 66 |
104 | 97 |
105 // If the rem set imposes any alignment restrictions on boundaries | 98 // If the rem set imposes any alignment restrictions on boundaries |
106 // within the heap, this function tells whether they are met. | 99 // within the heap, this function tells whether they are met. |
107 virtual bool is_aligned(HeapWord* addr) = 0; | 100 virtual bool is_aligned(HeapWord* addr) = 0; |
108 | 101 |
109 // If the RS (or BS) imposes an aligment constraint on maximum heap size. | 102 // Returns any alignment constraint that the remembered set imposes upon the |
110 // (This must be static, and dispatch on "nm", because it is called | 103 // heap. |
111 // before an RS is created.) | 104 static uintx max_alignment_constraint(); |
112 static uintx max_alignment_constraint(Name nm); | |
113 | 105 |
114 virtual void verify() = 0; | 106 virtual void verify() = 0; |
115 | 107 |
116 // Verify that the remembered set has no entries for | 108 // Verify that the remembered set has no entries for |
117 // the heap interval denoted by mr. If there are any | 109 // the heap interval denoted by mr. If there are any |