src/hotspot/share/gc/g1/g1EvacStats.inline.hpp
author eosterlund
Mon, 26 Feb 2018 09:34:12 +0100
changeset 49164 7e958a8ebcd3
parent 47634 6a0c42c40cd1
child 53244 9807daeb47c4
permissions -rw-r--r--
8195142: Refactor out card table from CardTableModRefBS to flatten the BarrierSet hierarchy Reviewed-by: stefank, coleenp, kvn, ehelin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     1
/*
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     4
 *
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     8
 *
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    13
 * accompanied this code).
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    14
 *
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    18
 *
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    21
 * questions.
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    22
 *
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    23
 */
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    24
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    25
#ifndef SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    26
#define SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    27
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    28
#include "gc/g1/g1EvacStats.hpp"
40655
9f644073d3a0 8157907: Incorrect inclusion of atomic.hpp instead of atomic.inline.hpp
dholmes
parents: 34230
diff changeset
    29
#include "runtime/atomic.hpp"
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    30
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    31
inline void G1EvacStats::add_direct_allocated(size_t value) {
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
    32
  Atomic::add(value, &_direct_allocated);
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    33
}
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    34
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    35
inline void G1EvacStats::add_region_end_waste(size_t value) {
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
    36
  Atomic::add(value, &_region_end_waste);
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
    37
  Atomic::inc(&_regions_filled);
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    38
}
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    39
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    40
inline void G1EvacStats::add_failure_used_and_waste(size_t used, size_t waste) {
47634
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
    41
  Atomic::add(used, &_failure_used);
6a0c42c40cd1 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot
coleenp
parents: 47216
diff changeset
    42
  Atomic::add(waste, &_failure_waste);
34230
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    43
}
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    44
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    45
#endif // SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP