equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, 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. |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "gc/parallel/objectStartArray.inline.hpp" |
26 #include "gc/parallel/objectStartArray.inline.hpp" |
27 #include "gc/parallel/parallelScavengeHeap.hpp" |
27 #include "gc/parallel/parallelScavengeHeap.hpp" |
28 #include "gc/parallel/psAdaptiveSizePolicy.hpp" |
28 #include "gc/parallel/psAdaptiveSizePolicy.hpp" |
|
29 #include "gc/parallel/psCardTable.hpp" |
29 #include "gc/parallel/psMarkSweepDecorator.hpp" |
30 #include "gc/parallel/psMarkSweepDecorator.hpp" |
30 #include "gc/parallel/psOldGen.hpp" |
31 #include "gc/parallel/psOldGen.hpp" |
31 #include "gc/shared/cardTableModRefBS.hpp" |
32 #include "gc/shared/cardTableModRefBS.hpp" |
32 #include "gc/shared/gcLocker.inline.hpp" |
33 #include "gc/shared/gcLocker.inline.hpp" |
33 #include "gc/shared/spaceDecorator.hpp" |
34 #include "gc/shared/spaceDecorator.hpp" |
109 // (bottom to end) needs to be done. |
110 // (bottom to end) needs to be done. |
110 SpaceMangler::mangle_region(cmr); |
111 SpaceMangler::mangle_region(cmr); |
111 } |
112 } |
112 |
113 |
113 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); |
114 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); |
114 BarrierSet* bs = heap->barrier_set(); |
115 PSCardTable* ct = heap->card_table(); |
115 |
116 ct->resize_covered_region(cmr); |
116 bs->resize_covered_region(cmr); |
|
117 |
|
118 CardTableModRefBS* ct = barrier_set_cast<CardTableModRefBS>(bs); |
|
119 |
117 |
120 // Verify that the start and end of this generation is the start of a card. |
118 // Verify that the start and end of this generation is the start of a card. |
121 // If this wasn't true, a single card could span more than one generation, |
119 // If this wasn't true, a single card could span more than one generation, |
122 // which would cause problems when we commit/uncommit memory, and when we |
120 // which would cause problems when we commit/uncommit memory, and when we |
123 // clear and dirty cards. |
121 // clear and dirty cards. |
384 MemRegion new_memregion((HeapWord*)virtual_space()->low(), |
382 MemRegion new_memregion((HeapWord*)virtual_space()->low(), |
385 (HeapWord*)virtual_space()->high()); |
383 (HeapWord*)virtual_space()->high()); |
386 size_t new_word_size = new_memregion.word_size(); |
384 size_t new_word_size = new_memregion.word_size(); |
387 |
385 |
388 start_array()->set_covered_region(new_memregion); |
386 start_array()->set_covered_region(new_memregion); |
389 ParallelScavengeHeap::heap()->barrier_set()->resize_covered_region(new_memregion); |
387 ParallelScavengeHeap::heap()->card_table()->resize_covered_region(new_memregion); |
390 |
388 |
391 // ALWAYS do this last!! |
389 // ALWAYS do this last!! |
392 object_space()->initialize(new_memregion, |
390 object_space()->initialize(new_memregion, |
393 SpaceDecorator::DontClear, |
391 SpaceDecorator::DontClear, |
394 SpaceDecorator::DontMangle); |
392 SpaceDecorator::DontMangle); |