hotspot/src/share/vm/gc/g1/g1EvacStats.inline.hpp
author jprovino
Tue, 02 Aug 2016 16:39:33 -0400
changeset 40328 a2851f5f1cf6
parent 34230 b9c64b7c06c9
child 40655 9f644073d3a0
permissions -rw-r--r--
8071770: G1 does not implement millis_since_last_gc which is needed by RMI GC Summary: G1 does not return a correct value for the CollectedHeap::millis_since_last_gc Reviewed-by: jmasa, tschatzl
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
/*
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
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"
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    29
#include "runtime/atomic.inline.hpp"
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) {
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    32
  Atomic::add_ptr(value, &_direct_allocated);
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) {
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    36
  Atomic::add_ptr(value, &_region_end_waste);
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    37
  Atomic::add_ptr(1, &_regions_filled);
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) {
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    41
  Atomic::add_ptr(used, &_failure_used);
b9c64b7c06c9 8141570: Fix Zero interpreter build for --disable-precompiled-headers
coleenp
parents:
diff changeset
    42
  Atomic::add_ptr(waste, &_failure_waste);
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