equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2019, 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. |
64 // DefNewGeneration functions. |
64 // DefNewGeneration functions. |
65 |
65 |
66 // Methods of protected closure types. |
66 // Methods of protected closure types. |
67 |
67 |
68 DefNewGeneration::IsAliveClosure::IsAliveClosure(Generation* young_gen) : _young_gen(young_gen) { |
68 DefNewGeneration::IsAliveClosure::IsAliveClosure(Generation* young_gen) : _young_gen(young_gen) { |
69 assert(_young_gen->kind() == Generation::ParNew || |
69 assert(_young_gen->kind() == Generation::DefNew, "Expected the young generation here"); |
70 _young_gen->kind() == Generation::DefNew, "Expected the young generation here"); |
|
71 } |
70 } |
72 |
71 |
73 bool DefNewGeneration::IsAliveClosure::do_object_b(oop p) { |
72 bool DefNewGeneration::IsAliveClosure::do_object_b(oop p) { |
74 return (HeapWord*)p >= _young_gen->reserved().end() || p->is_forwarded(); |
73 return (HeapWord*)p >= _young_gen->reserved().end() || p->is_forwarded(); |
75 } |
74 } |
882 seen_incremental_collection_failed = true; |
881 seen_incremental_collection_failed = true; |
883 } else if (seen_incremental_collection_failed) { |
882 } else if (seen_incremental_collection_failed) { |
884 log_trace(gc)("DefNewEpilogue: cause(%s), not full, seen_failed, will_clear_seen_failed", |
883 log_trace(gc)("DefNewEpilogue: cause(%s), not full, seen_failed, will_clear_seen_failed", |
885 GCCause::to_string(gch->gc_cause())); |
884 GCCause::to_string(gch->gc_cause())); |
886 assert(gch->gc_cause() == GCCause::_scavenge_alot || |
885 assert(gch->gc_cause() == GCCause::_scavenge_alot || |
887 (GCCause::is_user_requested_gc(gch->gc_cause()) && UseConcMarkSweepGC && ExplicitGCInvokesConcurrent) || |
|
888 !gch->incremental_collection_failed(), |
886 !gch->incremental_collection_failed(), |
889 "Twice in a row"); |
887 "Twice in a row"); |
890 seen_incremental_collection_failed = false; |
888 seen_incremental_collection_failed = false; |
891 } |
889 } |
892 #endif // ASSERT |
890 #endif // ASSERT |