|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -54,18 +54,18 @@ bool G1FullGCPrepareTask::G1CalculatePointersClosure::do_heap_region(HeapRegion*
|
54 | 54 | free_humongous_region(hr);
|
55 | 55 | }
|
56 | 56 | } else if (hr->is_open_archive()) {
|
57 |
| - bool is_empty = _bitmap->get_next_marked_addr(hr->bottom(), hr->top()) >= hr->top(); |
| 57 | + bool is_empty = _collector->live_words(hr->hrm_index()) == 0; |
58 | 58 | if (is_empty) {
|
59 | 59 | free_open_archive_region(hr);
|
60 | 60 | }
|
61 | 61 | } else if (hr->is_closed_archive()) {
|
62 | 62 | // nothing to do with closed archive region
|
63 | 63 | } else {
|
64 | 64 | assert(MarkSweepDeadRatio > 0,
|
65 |
| - "it should not trigger skipping compaction, when MarkSweepDeadRatio == 0"); |
| 65 | + "only skip compaction for other regions when MarkSweepDeadRatio > 0"); |
66 | 66 |
|
67 |
| - // Force the high live ration region pinned, |
68 |
| - // as we need skip these regions in the later compact step. |
| 67 | + // Force the high live ratio region as compacting to skip these regions in the |
| 68 | + // later compaction step. |
69 | 69 | force_not_compacted = true;
|
70 | 70 | log_debug(gc, phases)("Phase 2: skip compaction region index: %u, live words: " SIZE_FORMAT,
|
71 | 71 | hr->hrm_index(), _collector->live_words(hr->hrm_index()));
|
|
1 commit comments
openjdk-notifier[bot] commentedon Apr 15, 2021
Review
Issues