src/share/vm/gc_implementation/g1/heapRegion.cpp

changeset 6404
96b1c2e06e25
parent 6402
191174b49bec
child 6422
8ee855b4e667
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Mar 24 15:30:30 2014 +0100
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Mon Mar 24 15:30:36 2014 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -205,7 +205,7 @@
    1.11    init_top_at_mark_start();
    1.12  }
    1.13  
    1.14 -void HeapRegion::hr_clear(bool par, bool clear_space) {
    1.15 +void HeapRegion::hr_clear(bool par, bool clear_space, bool locked) {
    1.16    assert(_humongous_type == NotHumongous,
    1.17           "we should have already filtered out humongous regions");
    1.18    assert(_humongous_start_region == NULL,
    1.19 @@ -223,7 +223,11 @@
    1.20    if (!par) {
    1.21      // If this is parallel, this will be done later.
    1.22      HeapRegionRemSet* hrrs = rem_set();
    1.23 -    hrrs->clear();
    1.24 +    if (locked) {
    1.25 +      hrrs->clear_locked();
    1.26 +    } else {
    1.27 +      hrrs->clear();
    1.28 +    }
    1.29      _claimed = InitialClaimValue;
    1.30    }
    1.31    zero_marked_bytes();

mercurial