src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp
author shade
Wed, 30 May 2018 14:02:58 +0200
branchepsilon-gc-branch
changeset 56634 293ba598ee68
parent 56578 e8414c8ead61
permissions -rw-r--r--
Fix COMPILER2 handling: include macros.hpp before use
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
/*
56350
56014b46de69 Update copyrights
shade
parents: 56349
diff changeset
     2
 * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
55767
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
56508
shade
parents: 56492
diff changeset
    24
#include "precompiled.hpp"
56516
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    25
#include "runtime/thread.hpp"
56508
shade
parents: 56492
diff changeset
    26
#include "gc/epsilon/epsilonBarrierSet.hpp"
56510
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    27
#include "gc/epsilon/epsilonThreadLocalData.hpp"
56516
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    28
#include "gc/shared/collectorPolicy.hpp"
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    29
#include "gc/shared/barrierSet.hpp"
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    30
#include "gc/shared/barrierSetAssembler.hpp"
56634
293ba598ee68 Fix COMPILER2 handling: include macros.hpp before use
shade
parents: 56578
diff changeset
    31
#include "utilities/macros.hpp"
56516
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    32
#ifdef COMPILER1
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    33
#include "gc/shared/c1/barrierSetC1.hpp"
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    34
#endif
56578
shade
parents: 56533
diff changeset
    35
#ifdef COMPILER2
shade
parents: 56533
diff changeset
    36
#include "gc/shared/c2/barrierSetC2.hpp"
shade
parents: 56533
diff changeset
    37
#endif
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    38
56508
shade
parents: 56492
diff changeset
    39
EpsilonBarrierSet::EpsilonBarrierSet() : BarrierSet(
shade
parents: 56492
diff changeset
    40
          make_barrier_set_assembler<BarrierSetAssembler>(),
shade
parents: 56492
diff changeset
    41
          make_barrier_set_c1<BarrierSetC1>(),
56578
shade
parents: 56533
diff changeset
    42
          make_barrier_set_c2<BarrierSetC2>(),
56533
shade
parents: 56516
diff changeset
    43
          BarrierSet::FakeRtti(BarrierSet::EpsilonBarrierSet)) {};
56510
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    44
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    45
void EpsilonBarrierSet::on_thread_create(Thread *thread) {
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    46
  EpsilonThreadLocalData::create(thread);
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    47
}
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    48
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    49
void EpsilonBarrierSet::on_thread_destroy(Thread *thread) {
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    50
  EpsilonThreadLocalData::destroy(thread);
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    51
}