src/hotspot/share/gc/parallel/parMarkBitMap.cpp
changeset 47552 8a3599d60996
parent 47216 71c04702a3d5
child 47634 6a0c42c40cd1
equal deleted inserted replaced
47551:4d034d861e13 47552:8a3599d60996
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2017, 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.
    87   const idx_t beg_bit = addr_to_bit(addr);
    87   const idx_t beg_bit = addr_to_bit(addr);
    88   if (_beg_bits.par_set_bit(beg_bit)) {
    88   if (_beg_bits.par_set_bit(beg_bit)) {
    89     const idx_t end_bit = addr_to_bit(addr + size - 1);
    89     const idx_t end_bit = addr_to_bit(addr + size - 1);
    90     bool end_bit_ok = _end_bits.par_set_bit(end_bit);
    90     bool end_bit_ok = _end_bits.par_set_bit(end_bit);
    91     assert(end_bit_ok, "concurrency problem");
    91     assert(end_bit_ok, "concurrency problem");
    92     DEBUG_ONLY(Atomic::inc_ptr(&mark_bitmap_count));
    92     DEBUG_ONLY(Atomic::inc(&mark_bitmap_count));
    93     DEBUG_ONLY(Atomic::add_ptr(size, &mark_bitmap_size));
    93     DEBUG_ONLY(Atomic::add_ptr(size, &mark_bitmap_size));
    94     return true;
    94     return true;
    95   }
    95   }
    96   return false;
    96   return false;
    97 }
    97 }