src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp
author shade
Fri, 04 May 2018 19:16:56 +0200
branchepsilon-gc-branch
changeset 56533 28a4f284ad83
parent 56516 ad37b6a5cd76
child 56578 e8414c8ead61
permissions -rw-r--r--
Merge
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"
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    31
#ifdef COMPILER1
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    32
#include "gc/shared/c1/barrierSetC1.hpp"
ad37b6a5cd76 Fix Zero build failures
shade
parents: 56510
diff changeset
    33
#endif
55767
8e22715afabc Initial import of Epsilon sources from jdk10/sandbox
shade
parents:
diff changeset
    34
56508
shade
parents: 56492
diff changeset
    35
EpsilonBarrierSet::EpsilonBarrierSet() : BarrierSet(
shade
parents: 56492
diff changeset
    36
          make_barrier_set_assembler<BarrierSetAssembler>(),
shade
parents: 56492
diff changeset
    37
          make_barrier_set_c1<BarrierSetC1>(),
56533
shade
parents: 56516
diff changeset
    38
          BarrierSet::FakeRtti(BarrierSet::EpsilonBarrierSet)) {};
56510
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    39
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    40
void EpsilonBarrierSet::on_thread_create(Thread *thread) {
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    41
  EpsilonThreadLocalData::create(thread);
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    42
}
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    43
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    44
void EpsilonBarrierSet::on_thread_destroy(Thread *thread) {
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    45
  EpsilonThreadLocalData::destroy(thread);
54c1aa06c1d8 Epsilon should use Elastic TLABs facility to control sizes
shade
parents: 56508
diff changeset
    46
}