author | zgu |
Wed, 27 Nov 2019 11:52:57 -0500 | |
changeset 59296 | 9186be5c78ba |
permissions | -rw-r--r-- |
59296
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
1 |
/* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Red Hat, Inc. All rights reserved. |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
3 |
* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
4 |
* This code is free software; you can redistribute it and/or modify it |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
5 |
* under the terms of the GNU General Public License version 2 only, as |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
6 |
* published by the Free Software Foundation. |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
7 |
* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
8 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
9 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
10 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
11 |
* version 2 for more details (a copy is included in the LICENSE file that |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
12 |
* accompanied this code). |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
13 |
* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License version |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
15 |
* 2 along with this work; if not, write to the Free Software Foundation, |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
16 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
17 |
* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
18 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
19 |
* or visit www.oracle.com if you need additional information or have any |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
20 |
* questions. |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
21 |
* |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
22 |
*/ |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
23 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
24 |
#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHBARRIERSETNMETHOD_HPP |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
25 |
#define SHARE_GC_SHENANDOAH_SHENANDOAHBARRIERSETNMETHOD_HPP |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
26 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
27 |
#include "gc/shared/barrierSetNMethod.hpp" |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
28 |
#include "memory/allocation.hpp" |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
29 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
30 |
class nmethod; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
31 |
class ShenandoahHeap; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
32 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
33 |
class ShenandoahBarrierSetNMethod : public BarrierSetNMethod { |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
34 |
private: |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
35 |
ShenandoahHeap* _heap; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
36 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
37 |
protected: |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
38 |
virtual int disarmed_value() const; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
39 |
virtual bool nmethod_entry_barrier(nmethod* nm); |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
40 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
41 |
public: |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
42 |
ShenandoahBarrierSetNMethod(ShenandoahHeap* heap) : _heap(heap) { |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
43 |
} |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
44 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
45 |
virtual ByteSize thread_disarmed_offset() const; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
46 |
virtual int* disarmed_value_address() const; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
47 |
}; |
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
48 |
|
9186be5c78ba
8228720: Shenandoah: Implementation of concurrent class unloading
zgu
parents:
diff
changeset
|
49 |
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHBARRIERSETNMETHOD_HPP |