src/hotspot/share/gc/parallel/psMarkSweepProxy.hpp
author stefank
Fri, 04 May 2018 11:41:35 +0200
changeset 49982 9042ffe5b7fe
permissions -rw-r--r--
8200729: Conditional compilation of GCs Reviewed-by: ehelin, coleenp, kvn, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49982
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     1
/*
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     2
 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     4
 *
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     8
 *
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    13
 * accompanied this code).
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    14
 *
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    18
 *
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    21
 * questions.
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    22
 *
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    23
 */
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    24
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    25
#ifndef SHARE_GC_PARALLEL_PSMARKSWEEPPROXY_HPP
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    26
#define SHARE_GC_PARALLEL_PSMARKSWEEPPROXY_HPP
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    27
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    28
#include "utilities/macros.hpp"
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    29
#if INCLUDE_SERIALGC
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    30
#include "gc/parallel/psMarkSweep.hpp"
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    31
#endif
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    32
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    33
#if INCLUDE_SERIALGC
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    34
namespace PSMarkSweepProxy {
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    35
  inline void initialize()                              { PSMarkSweep::initialize(); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    36
  inline void invoke(bool maximum_heap_compaction)      { PSMarkSweep::invoke(maximum_heap_compaction); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    37
  inline bool invoke_no_policy(bool clear_all_softrefs) { return PSMarkSweep::invoke_no_policy(clear_all_softrefs); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    38
  inline jlong millis_since_last_gc()                   { return PSMarkSweep::millis_since_last_gc(); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    39
  inline elapsedTimer* accumulated_time()               { return PSMarkSweep::accumulated_time(); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    40
  inline uint total_invocations()                       { return PSMarkSweep::total_invocations(); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    41
};
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    42
#else
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    43
namespace PSMarkSweepProxy {
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    44
  inline void initialize()                { fatal("Serial GC excluded from build"); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    45
  inline void invoke(bool)                { fatal("Serial GC excluded from build"); }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    46
  inline bool invoke_no_policy(bool)      { fatal("Serial GC excluded from build"); return false;}
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    47
  inline jlong millis_since_last_gc()     { fatal("Serial GC excluded from build"); return 0L; }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    48
  inline elapsedTimer* accumulated_time() { fatal("Serial GC excluded from build"); return NULL; }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    49
  inline uint total_invocations()         { fatal("Serial GC excluded from build"); return 0u; }
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    50
};
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    51
#endif
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    52
9042ffe5b7fe 8200729: Conditional compilation of GCs
stefank
parents:
diff changeset
    53
#endif // SHARE_GC_PARALLEL_PSMARKSWEEPPROXY_HPP