author | stefank |
Thu, 09 May 2019 14:28:30 +0200 | |
changeset 54786 | ebf733a324d4 |
parent 54678 | 93f09ca4a7f8 |
child 54982 | b18c8301b8c2 |
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 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51042
diff
changeset
|
24 |
#ifndef SHARE_GC_EPSILON_EPSILONHEAP_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51042
diff
changeset
|
25 |
#define SHARE_GC_EPSILON_EPSILONHEAP_HPP |
50523
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/collectedHeap.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
28 |
#include "gc/shared/softRefPolicy.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
29 |
#include "gc/shared/space.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
30 |
#include "gc/epsilon/epsilonMonitoringSupport.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
31 |
#include "gc/epsilon/epsilonBarrierSet.hpp" |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
32 |
#include "gc/epsilon/epsilon_globals.hpp" |
54786 | 33 |
#include "services/memoryManager.hpp" |
50523
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 |
class EpsilonHeap : public CollectedHeap { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
36 |
friend class VMStructs; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
37 |
private: |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
38 |
SoftRefPolicy _soft_ref_policy; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
39 |
EpsilonMonitoringSupport* _monitoring_support; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
40 |
MemoryPool* _pool; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
41 |
GCMemoryManager _memory_manager; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
42 |
ContiguousSpace* _space; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
43 |
VirtualSpace _virtual_space; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
44 |
size_t _max_tlab_size; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
45 |
size_t _step_counter_update; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
46 |
size_t _step_heap_print; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
47 |
int64_t _decay_time_ns; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
48 |
volatile size_t _last_counter_update; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
49 |
volatile size_t _last_heap_print; |
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 |
public: |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
52 |
static EpsilonHeap* heap(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
53 |
|
54678
93f09ca4a7f8
8198505: Remove CollectorPolicy and its subclasses
stefank
parents:
54361
diff
changeset
|
54 |
EpsilonHeap() : |
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
55 |
_memory_manager("Epsilon Heap", "") {}; |
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 |
virtual Name kind() const { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
58 |
return CollectedHeap::Epsilon; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
59 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
60 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
61 |
virtual const char* name() const { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
62 |
return "Epsilon"; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
63 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
64 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
65 |
virtual SoftRefPolicy* soft_ref_policy() { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
66 |
return &_soft_ref_policy; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
67 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
68 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
69 |
virtual jint initialize(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
70 |
virtual void post_initialize(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
71 |
virtual void initialize_serviceability(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
72 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
73 |
virtual GrowableArray<GCMemoryManager*> memory_managers(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
74 |
virtual GrowableArray<MemoryPool*> memory_pools(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
75 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
76 |
virtual size_t max_capacity() const { return _virtual_space.reserved_size(); } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
77 |
virtual size_t capacity() const { return _virtual_space.committed_size(); } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
78 |
virtual size_t used() const { return _space->used(); } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
79 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
80 |
virtual bool is_in(const void* p) const { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
81 |
return _space->is_in(p); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
82 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
83 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
84 |
virtual bool is_maximal_no_gc() const { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
85 |
// No GC is going to happen. Return "we are at max", when we are about to fail. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
86 |
return used() == capacity(); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
87 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
88 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
89 |
// Allocation |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
90 |
HeapWord* allocate_work(size_t size); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
91 |
virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
92 |
virtual HeapWord* allocate_new_tlab(size_t min_size, |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
93 |
size_t requested_size, |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
94 |
size_t* actual_size); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
95 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
96 |
// TLAB allocation |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
97 |
virtual bool supports_tlab_allocation() const { return true; } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
98 |
virtual size_t tlab_capacity(Thread* thr) const { return capacity(); } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
99 |
virtual size_t tlab_used(Thread* thr) const { return used(); } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
100 |
virtual size_t max_tlab_size() const { return _max_tlab_size; } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
101 |
virtual size_t unsafe_max_tlab_alloc(Thread* thr) const; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
102 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
103 |
virtual void collect(GCCause::Cause cause); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
104 |
virtual void do_full_collection(bool clear_all_soft_refs); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
105 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
106 |
// Heap walking support |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
107 |
virtual void safe_object_iterate(ObjectClosure* cl); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
108 |
virtual void object_iterate(ObjectClosure* cl) { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
109 |
safe_object_iterate(cl); |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
110 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
111 |
|
51042 | 112 |
// Object pinning support: every object is implicitly pinned |
113 |
virtual bool supports_object_pinning() const { return true; } |
|
114 |
virtual oop pin_object(JavaThread* thread, oop obj) { return obj; } |
|
115 |
virtual void unpin_object(JavaThread* thread, oop obj) { } |
|
116 |
||
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
117 |
// No support for block parsing. |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
118 |
virtual HeapWord* block_start(const void* addr) const { return NULL; } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
119 |
virtual bool block_is_obj(const HeapWord* addr) const { return false; } |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
120 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
121 |
// No GC threads |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
122 |
virtual void print_gc_threads_on(outputStream* st) const {} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
123 |
virtual void gc_threads_do(ThreadClosure* tc) const {} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
124 |
|
54361
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
125 |
// No nmethod handling |
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
126 |
virtual void register_nmethod(nmethod* nm) {} |
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
127 |
virtual void unregister_nmethod(nmethod* nm) {} |
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
128 |
virtual void flush_nmethod(nmethod* nm) {} |
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
129 |
virtual void verify_nmethod(nmethod* nm) {} |
879051d3772a
8220610: Make CollectedHeap nmethod functions pure virtual
stefank
parents:
54122
diff
changeset
|
130 |
|
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
131 |
// No heap verification |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
132 |
virtual void prepare_for_verify() {} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
133 |
virtual void verify(VerifyOption option) {} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
134 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
135 |
virtual jlong millis_since_last_gc() { |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
136 |
// Report time since the VM start |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
137 |
return os::elapsed_counter() / NANOSECS_PER_MILLISEC; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
138 |
} |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
139 |
|
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
140 |
virtual void print_on(outputStream* st) const; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
141 |
virtual void print_tracing_info() const; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
142 |
|
53385
e8ed617dc2bc
8217014: Epsilon should not ignore Metadata GC causes
shade
parents:
53244
diff
changeset
|
143 |
private: |
e8ed617dc2bc
8217014: Epsilon should not ignore Metadata GC causes
shade
parents:
53244
diff
changeset
|
144 |
void print_heap_info(size_t used) const; |
e8ed617dc2bc
8217014: Epsilon should not ignore Metadata GC causes
shade
parents:
53244
diff
changeset
|
145 |
void print_metaspace_info() const; |
e8ed617dc2bc
8217014: Epsilon should not ignore Metadata GC causes
shade
parents:
53244
diff
changeset
|
146 |
|
50523
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
147 |
}; |
7b7c75d87f9b
8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff
changeset
|
148 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51042
diff
changeset
|
149 |
#endif // SHARE_GC_EPSILON_EPSILONHEAP_HPP |