Mercurial > hg > truffle
comparison src/share/vm/oops/oop.pcgc.inline.hpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
110:a49a647afe9a | 113:ba764ed4b6f2 |
---|---|
65 | 65 |
66 // Needs to be boundary aware for the 64 bit case | 66 // Needs to be boundary aware for the 64 bit case |
67 // update_header(); | 67 // update_header(); |
68 // The klass has moved. Is the location of the klass | 68 // The klass has moved. Is the location of the klass |
69 // within the limits? | 69 // within the limits? |
70 if ((((HeapWord*)&_klass) >= begin_limit) && | 70 if ((((HeapWord*)&_metadata._klass) >= begin_limit) && |
71 (((HeapWord*)&_klass) < end_limit)) { | 71 (((HeapWord*)&_metadata._klass) < end_limit)) { |
72 set_klass(updated_klass); | 72 set_klass(updated_klass); |
73 } | 73 } |
74 | 74 |
75 Klass* klass = updated_klass->klass_part(); | 75 Klass* klass = updated_klass->klass_part(); |
76 if (!klass->oop_is_typeArray()) { | 76 if (!klass->oop_is_typeArray()) { |
87 } | 87 } |
88 | 88 |
89 // Used by parallel old GC. | 89 // Used by parallel old GC. |
90 | 90 |
91 inline void oopDesc::follow_header(ParCompactionManager* cm) { | 91 inline void oopDesc::follow_header(ParCompactionManager* cm) { |
92 PSParallelCompact::mark_and_push(cm, (oop*)&_klass); | 92 if (UseCompressedOops) { |
93 PSParallelCompact::mark_and_push(cm, compressed_klass_addr()); | |
94 } else { | |
95 PSParallelCompact::mark_and_push(cm, klass_addr()); | |
96 } | |
93 } | 97 } |
94 | 98 |
95 inline oop oopDesc::forward_to_atomic(oop p) { | 99 inline oop oopDesc::forward_to_atomic(oop p) { |
96 assert(ParNewGeneration::is_legal_forward_ptr(p), | 100 assert(ParNewGeneration::is_legal_forward_ptr(p), |
97 "illegal forwarding pointer value."); | 101 "illegal forwarding pointer value."); |
112 } | 116 } |
113 return forwardee(); | 117 return forwardee(); |
114 } | 118 } |
115 | 119 |
116 inline void oopDesc::update_header() { | 120 inline void oopDesc::update_header() { |
117 PSParallelCompact::adjust_pointer((oop*)&_klass); | 121 if (UseCompressedOops) { |
122 PSParallelCompact::adjust_pointer(compressed_klass_addr()); | |
123 } else { | |
124 PSParallelCompact::adjust_pointer(klass_addr()); | |
125 } | |
118 } | 126 } |
119 | 127 |
120 inline void oopDesc::update_header(HeapWord* beg_addr, HeapWord* end_addr) { | 128 inline void oopDesc::update_header(HeapWord* beg_addr, HeapWord* end_addr) { |
121 PSParallelCompact::adjust_pointer((oop*)&_klass, beg_addr, end_addr); | 129 if (UseCompressedOops) { |
130 PSParallelCompact::adjust_pointer(compressed_klass_addr(), | |
131 beg_addr, end_addr); | |
132 } else { | |
133 PSParallelCompact::adjust_pointer(klass_addr(), beg_addr, end_addr); | |
134 } | |
122 } | 135 } |