src/hotspot/share/gc/cms/compactibleFreeListSpace.inline.hpp
author stefank
Mon, 07 May 2018 14:42:08 +0200
changeset 50034 01a88f825a84
permissions -rw-r--r--
8202641: Replace OOP_SINCE_SAVE_MARKS with templates Reviewed-by: eosterlund, sjohanss
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50034
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     1
/*
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     2
 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     4
 *
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     8
 *
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    13
 * accompanied this code).
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    14
 *
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    18
 *
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    21
 * questions.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    22
 *
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    23
 */
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    24
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    25
#ifndef SHARE_GC_CMS_COMPACTIBLEFREELISTSPACE_INLINE_HPP
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    26
#define SHARE_GC_CMS_COMPACTIBLEFREELISTSPACE_INLINE_HPP
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    27
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    28
#include "gc/cms/compactibleFreeListSpace.hpp"
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    29
#include "gc/cms/promotionInfo.inline.hpp"
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    30
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    31
template <typename OopClosureType>
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    32
void CompactibleFreeListSpace::oop_since_save_marks_iterate(OopClosureType* blk) {
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    33
  _promoInfo.promoted_oops_iterate(blk);
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    34
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    35
  // This also restores any displaced headers and removes the elements from
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    36
  // the iteration set as they are processed, so that we have a clean slate
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    37
  // at the end of the iteration. Note, thus, that if new objects are
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    38
  // promoted as a result of the iteration they are iterated over as well.
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    39
  assert(_promoInfo.noPromotions(), "_promoInfo inconsistency");
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    40
}
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    41
01a88f825a84 8202641: Replace OOP_SINCE_SAVE_MARKS with templates
stefank
parents:
diff changeset
    42
#endif // SHARE_GC_CMS_COMPACTIBLEFREELISTSPACE_INLINE_HPP