src/hotspot/share/gc/epsilon/epsilonBarrierSet.hpp
author shade
Thu, 07 Dec 2017 13:19:22 +0100
branchepsilon-gc-branch
changeset 55975 26d15be1c920
parent 55935 f4e069848424
child 56277 6f96c46be4e6
permissions -rw-r--r--
Fixup serviceability for Epsilon.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     1
/*
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     2
 * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates.
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     3
 *
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     6
 * published by the Free Software Foundation.
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     7
 *
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    12
 * accompanied this code).
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    13
 *
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    17
 *
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    20
 * questions.
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    21
 *
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    22
 */
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    23
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    24
#ifndef SHARE_VM_GC_EPSILON_BARRIERSET_HPP
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    25
#define SHARE_VM_GC_EPSILON_BARRIERSET_HPP
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    26
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    27
#include "gc/shared/collectorPolicy.hpp"
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    28
#include "gc/shared/barrierSet.hpp"
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    29
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    30
// Most are no-ops.
55802
b2b4df384c83 Simplify Epsilon barrier set after BS cleanup
shade
parents: 55767
diff changeset
    31
class EpsilonBarrierSet: public BarrierSet {
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    32
  friend class VMStructs;
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    33
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    34
public:
55802
b2b4df384c83 Simplify Epsilon barrier set after BS cleanup
shade
parents: 55767
diff changeset
    35
  EpsilonBarrierSet() : BarrierSet(BarrierSet::FakeRtti(BarrierSet::Epsilon)) {};
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    36
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    37
  virtual bool is_aligned(HeapWord *addr)  { Unimplemented(); return true; } // no calls for it?
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    38
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    39
  virtual void resize_covered_region(MemRegion new_region) {}
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    40
  virtual void print_on(outputStream *st) const {}
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    41
55935
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    42
  template <DecoratorSet decorators, typename BarrierSetT = EpsilonBarrierSet>
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    43
  class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {};
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    44
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    45
protected:
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    46
  virtual void write_ref_array_work(MemRegion mr) {}
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    47
  virtual void write_region_work(MemRegion mr) {}
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    48
};
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    49
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    50
template<>
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    51
struct BarrierSet::GetName<EpsilonBarrierSet> {
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    52
  static const BarrierSet::Name value = BarrierSet::Epsilon;
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    53
};
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    54
55935
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    55
template<>
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    56
struct BarrierSet::GetType<BarrierSet::Epsilon> {
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    57
  typedef EpsilonBarrierSet type;
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    58
};
f4e069848424 Fixup Epsilon for GC interface updates
shade
parents: 55802
diff changeset
    59
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    60
#endif // SHARE_VM_GC_EPSILON_BARRIERSET_HPP