hotspot/src/share/vm/gc/shared/cardGeneration.inline.hpp
author pliden
Wed, 13 May 2015 15:16:06 +0200
changeset 30764 fec48bf5a827
parent 28033 hotspot/src/share/vm/memory/cardGeneration.inline.hpp@ab63acbd99ec
permissions -rw-r--r--
8079792: GC directory structure cleanup Reviewed-by: brutisso, stefank, david
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28033
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     1
/*
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
     2
 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
28033
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     4
 *
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     7
 * published by the Free Software Foundation.
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     8
 *
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    13
 * accompanied this code).
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    14
 *
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    18
 *
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    21
 * questions.
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    22
 *
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    23
 */
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
    25
#ifndef SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
    26
#define SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP
28033
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    27
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
    28
#include "gc/shared/cardGeneration.hpp"
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
    29
#include "gc/shared/space.hpp"
28033
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    30
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    31
inline size_t CardGeneration::capacity() const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    32
  return space()->capacity();
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    33
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    34
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    35
inline size_t CardGeneration::used() const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    36
  return space()->used();
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    37
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    38
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    39
inline size_t CardGeneration::free() const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    40
  return space()->free();
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    41
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    42
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    43
inline MemRegion CardGeneration::used_region() const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    44
  return space()->used_region();
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    45
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    46
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    47
inline bool CardGeneration::is_in(const void* p) const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    48
  return space()->is_in(p);
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    49
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    50
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    51
inline CompactibleSpace* CardGeneration::first_compaction_space() const {
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    52
  return space();
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    53
}
ab63acbd99ec 8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff changeset
    54
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 28033
diff changeset
    55
#endif // SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP