author | tschatzl |
Wed, 08 Aug 2018 15:31:06 +0200 | |
changeset 51332 | c25572739e7c |
parent 50523 | 7b7c75d87f9b |
child 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
1 |
/* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
3 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
4 |
* This code is free software; you can redistribute it and/or modify it |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
5 |
* under the terms of the GNU General Public License version 2 only, as |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
6 |
* published by the Free Software Foundation. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
7 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
8 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
9 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
10 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
11 |
* version 2 for more details (a copy is included in the LICENSE file that |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
12 |
* accompanied this code). |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
13 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License version |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
15 |
* 2 along with this work; if not, write to the Free Software Foundation, |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
16 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
17 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
18 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
19 |
* or visit www.oracle.com if you need additional information or have any |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
20 |
* questions. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
21 |
* |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
22 |
*/ |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
23 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
24 |
#ifndef SHARE_VM_GC_EPSILON_BARRIERSET_HPP |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
25 |
#define SHARE_VM_GC_EPSILON_BARRIERSET_HPP |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
26 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
27 |
#include "gc/shared/barrierSetAssembler.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
28 |
#include "gc/shared/barrierSet.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
29 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
30 |
// No interaction with application is required for Epsilon, and therefore |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
31 |
// the barrier set is empty. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
32 |
class EpsilonBarrierSet: public BarrierSet { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
33 |
friend class VMStructs; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
34 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
35 |
public: |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
36 |
EpsilonBarrierSet(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
37 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
38 |
virtual void print_on(outputStream *st) const {} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
39 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
40 |
virtual void on_thread_create(Thread* thread); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
41 |
virtual void on_thread_destroy(Thread* thread); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
42 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
43 |
template <DecoratorSet decorators, typename BarrierSetT = EpsilonBarrierSet> |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
44 |
class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {}; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
45 |
}; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
46 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
47 |
template<> |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
48 |
struct BarrierSet::GetName<EpsilonBarrierSet> { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
49 |
static const BarrierSet::Name value = BarrierSet::EpsilonBarrierSet; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
50 |
}; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
51 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
52 |
template<> |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
53 |
struct BarrierSet::GetType<BarrierSet::EpsilonBarrierSet> { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
54 |
typedef ::EpsilonBarrierSet type; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
55 |
}; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
56 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
57 |
#endif // SHARE_VM_GC_EPSILON_BARRIERSET_HPP |