File tree 6 files changed +12
-7
lines changed
6 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 39
39
#include " gc/serial/serialGcRefProcProxyTask.hpp"
40
40
#include " gc/serial/serialHeap.hpp"
41
41
#include " gc/serial/serialStringDedup.hpp"
42
+ #include " gc/serial/tenuredGeneration.inline.hpp"
42
43
#include " gc/shared/classUnloadingContext.hpp"
43
44
#include " gc/shared/collectedHeap.inline.hpp"
44
45
#include " gc/shared/continuationGCSupport.inline.hpp"
@@ -171,6 +172,9 @@ class Compacter {
171
172
172
173
uint _index;
173
174
175
+ // Used for BOT update
176
+ TenuredGeneration* _old_gen;
177
+
174
178
HeapWord* get_compaction_top (uint index) const {
175
179
return _spaces[index ]._compaction_top ;
176
180
}
@@ -196,7 +200,7 @@ class Compacter {
196
200
_spaces[_index]._compaction_top += words;
197
201
if (_index == 0 ) {
198
202
// old-gen requires BOT update
199
- static_cast <TenuredSpace*>(_spaces[ 0 ]. _space ) ->update_for_block (result, result + words);
203
+ _old_gen ->update_for_block (result, result + words);
200
204
}
201
205
return result;
202
206
}
@@ -280,6 +284,7 @@ class Compacter {
280
284
_num_spaces = 3 ;
281
285
}
282
286
_index = 0 ;
287
+ _old_gen = heap->old_gen ();
283
288
}
284
289
285
290
void phase2_calculate_new_addr () {
Original file line number Diff line number Diff line change @@ -499,7 +499,7 @@ void TenuredGeneration::complete_loaded_archive_space(MemRegion archive_space) {
499
499
HeapWord* start = archive_space.start ();
500
500
while (start < archive_space.end ()) {
501
501
size_t word_size = cast_to_oop (start)->size ();;
502
- space ->update_for_block (start, start + word_size);
502
+ _bts ->update_for_block (start, start + word_size);
503
503
start += word_size;
504
504
}
505
505
}
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ class TenuredGeneration: public Generation {
134
134
void object_iterate (ObjectClosure* blk);
135
135
136
136
void complete_loaded_archive_space (MemRegion archive_space);
137
+ inline void update_for_block (HeapWord* start, HeapWord* end);
137
138
138
139
virtual inline HeapWord* allocate (size_t word_size, bool is_tlab);
139
140
virtual inline HeapWord* par_allocate (size_t word_size, bool is_tlab);
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ inline bool TenuredGeneration::is_in(const void* p) const {
45
45
return space ()->is_in (p);
46
46
}
47
47
48
+ inline void TenuredGeneration::update_for_block (HeapWord* start, HeapWord* end) {
49
+ _bts->update_for_block (start, end);
50
+ }
51
+
48
52
HeapWord* TenuredGeneration::allocate (size_t word_size,
49
53
bool is_tlab) {
50
54
assert (!is_tlab, " TenuredGeneration does not support TLAB allocation" );
Original file line number Diff line number Diff line change @@ -179,8 +179,6 @@ class TenuredSpace: public ContiguousSpace {
179
179
// Add offset table update.
180
180
inline HeapWord* allocate (size_t word_size) override ;
181
181
inline HeapWord* par_allocate (size_t word_size) override ;
182
-
183
- inline void update_for_block (HeapWord* start, HeapWord* end);
184
182
};
185
183
#endif // INCLUDE_SERIALGC
186
184
Original file line number Diff line number Diff line change @@ -51,9 +51,6 @@ inline HeapWord* TenuredSpace::par_allocate(size_t size) {
51
51
return res;
52
52
}
53
53
54
- inline void TenuredSpace::update_for_block (HeapWord* start, HeapWord* end) {
55
- _offsets->update_for_block (start, end);
56
- }
57
54
#endif // INCLUDE_SERIALGC
58
55
59
56
#endif // SHARE_GC_SHARED_SPACE_INLINE_HPP
You can’t perform that action at this time.
0 commit comments