annotate src/share/vm/runtime/handles.cpp @ 18096:ca6d25be853b jdk8u25-b13

8044269: Analysis of archive files. Summary: Add checksum verification. Reviewed-by: iklam, dholmes, mschoene
author jiangli
date Tue, 12 Aug 2014 17:46:16 -0400
parents 78bbf4d43a14
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 13010
diff changeset
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "memory/allocation.inline.hpp"
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
27 #include "oops/constantPool.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "oops/oop.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "runtime/handles.inline.hpp"
7180
f34d701e952e 8003935: Simplify the needed includes for using Thread::current()
stefank
parents: 6882
diff changeset
30 #include "runtime/thread.inline.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
31 #ifdef TARGET_OS_FAMILY_linux
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
32 # include "os_linux.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
33 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
34 #ifdef TARGET_OS_FAMILY_solaris
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
35 # include "os_solaris.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
36 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
37 #ifdef TARGET_OS_FAMILY_windows
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
38 # include "os_windows.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
39 #endif
3960
f08d439fab8c 7089790: integrate bsd-port changes
never
parents: 1972
diff changeset
40 #ifdef TARGET_OS_FAMILY_bsd
f08d439fab8c 7089790: integrate bsd-port changes
never
parents: 1972
diff changeset
41 # include "os_bsd.inline.hpp"
f08d439fab8c 7089790: integrate bsd-port changes
never
parents: 1972
diff changeset
42 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
43
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 13010
diff changeset
44 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 13010
diff changeset
45
0
a61af66fc99e Initial load
duke
parents:
diff changeset
46 #ifdef ASSERT
a61af66fc99e Initial load
duke
parents:
diff changeset
47 oop* HandleArea::allocate_handle(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
48 assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
a61af66fc99e Initial load
duke
parents:
diff changeset
49 assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
13010
bd3237e0e18d 8026328: Setting a breakpoint on invokedynamic crashes the JVM
twisti
parents: 12146
diff changeset
50 assert(obj->is_oop(), err_msg("not an oop: " INTPTR_FORMAT, (intptr_t*) obj));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 return real_allocate_handle(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
52 }
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 Handle::Handle(Thread* thread, oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
55 assert(thread == Thread::current(), "sanity check");
a61af66fc99e Initial load
duke
parents:
diff changeset
56 if (obj == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
57 _handle = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
58 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
59 _handle = thread->handle_area()->allocate_handle(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61 }
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 static uintx chunk_oops_do(OopClosure* f, Chunk* chunk, char* chunk_top) {
a61af66fc99e Initial load
duke
parents:
diff changeset
66 oop* bottom = (oop*) chunk->bottom();
a61af66fc99e Initial load
duke
parents:
diff changeset
67 oop* top = (oop*) chunk_top;
a61af66fc99e Initial load
duke
parents:
diff changeset
68 uintx handles_visited = top - bottom;
a61af66fc99e Initial load
duke
parents:
diff changeset
69 assert(top >= bottom && top <= (oop*) chunk->top(), "just checking");
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // during GC phase 3, a handle may be a forward pointer that
a61af66fc99e Initial load
duke
parents:
diff changeset
71 // is not yet valid, so loosen the assertion
a61af66fc99e Initial load
duke
parents:
diff changeset
72 while (bottom < top) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
73 // This test can be moved up but for now check every oop.
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
74
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
75 assert((*bottom)->is_oop(), "handle should point to oop");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
76
0
a61af66fc99e Initial load
duke
parents:
diff changeset
77 f->do_oop(bottom++);
a61af66fc99e Initial load
duke
parents:
diff changeset
78 }
a61af66fc99e Initial load
duke
parents:
diff changeset
79 return handles_visited;
a61af66fc99e Initial load
duke
parents:
diff changeset
80 }
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 // Used for debugging handle allocation.
a61af66fc99e Initial load
duke
parents:
diff changeset
83 NOT_PRODUCT(jint _nof_handlemarks = 0;)
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 void HandleArea::oops_do(OopClosure* f) {
a61af66fc99e Initial load
duke
parents:
diff changeset
86 uintx handles_visited = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
87 // First handle the current chunk. It is filled to the high water mark.
a61af66fc99e Initial load
duke
parents:
diff changeset
88 handles_visited += chunk_oops_do(f, _chunk, _hwm);
a61af66fc99e Initial load
duke
parents:
diff changeset
89 // Then handle all previous chunks. They are completely filled.
a61af66fc99e Initial load
duke
parents:
diff changeset
90 Chunk* k = _first;
a61af66fc99e Initial load
duke
parents:
diff changeset
91 while(k != _chunk) {
a61af66fc99e Initial load
duke
parents:
diff changeset
92 handles_visited += chunk_oops_do(f, k, k->top());
a61af66fc99e Initial load
duke
parents:
diff changeset
93 k = k->next();
a61af66fc99e Initial load
duke
parents:
diff changeset
94 }
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 // The thread local handle areas should not get very large
a61af66fc99e Initial load
duke
parents:
diff changeset
97 if (TraceHandleAllocation && handles_visited > TotalHandleAllocationLimit) {
a61af66fc99e Initial load
duke
parents:
diff changeset
98 #ifdef ASSERT
a61af66fc99e Initial load
duke
parents:
diff changeset
99 warning("%d: Visited in HandleMark : %d",
a61af66fc99e Initial load
duke
parents:
diff changeset
100 _nof_handlemarks, handles_visited);
a61af66fc99e Initial load
duke
parents:
diff changeset
101 #else
a61af66fc99e Initial load
duke
parents:
diff changeset
102 warning("Visited in HandleMark : %d", handles_visited);
a61af66fc99e Initial load
duke
parents:
diff changeset
103 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
104 }
a61af66fc99e Initial load
duke
parents:
diff changeset
105 if (_prev != NULL) _prev->oops_do(f);
a61af66fc99e Initial load
duke
parents:
diff changeset
106 }
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 void HandleMark::initialize(Thread* thread) {
a61af66fc99e Initial load
duke
parents:
diff changeset
109 _thread = thread;
a61af66fc99e Initial load
duke
parents:
diff changeset
110 // Save area
a61af66fc99e Initial load
duke
parents:
diff changeset
111 _area = thread->handle_area();
a61af66fc99e Initial load
duke
parents:
diff changeset
112 // Save current top
a61af66fc99e Initial load
duke
parents:
diff changeset
113 _chunk = _area->_chunk;
a61af66fc99e Initial load
duke
parents:
diff changeset
114 _hwm = _area->_hwm;
a61af66fc99e Initial load
duke
parents:
diff changeset
115 _max = _area->_max;
6197
d2a62e0f25eb 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 3960
diff changeset
116 _size_in_bytes = _area->_size_in_bytes;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
117 debug_only(_area->_handle_mark_nesting++);
a61af66fc99e Initial load
duke
parents:
diff changeset
118 assert(_area->_handle_mark_nesting > 0, "must stack allocate HandleMarks");
a61af66fc99e Initial load
duke
parents:
diff changeset
119 debug_only(Atomic::inc(&_nof_handlemarks);)
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // Link this in the thread
a61af66fc99e Initial load
duke
parents:
diff changeset
122 set_previous_handle_mark(thread->last_handle_mark());
a61af66fc99e Initial load
duke
parents:
diff changeset
123 thread->set_last_handle_mark(this);
a61af66fc99e Initial load
duke
parents:
diff changeset
124 }
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 HandleMark::~HandleMark() {
a61af66fc99e Initial load
duke
parents:
diff changeset
128 HandleArea* area = _area; // help compilers with poor alias analysis
a61af66fc99e Initial load
duke
parents:
diff changeset
129 assert(area == _thread->handle_area(), "sanity check");
a61af66fc99e Initial load
duke
parents:
diff changeset
130 assert(area->_handle_mark_nesting > 0, "must stack allocate HandleMarks" );
a61af66fc99e Initial load
duke
parents:
diff changeset
131 debug_only(area->_handle_mark_nesting--);
a61af66fc99e Initial load
duke
parents:
diff changeset
132
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // Debug code to trace the number of handles allocated per mark/
a61af66fc99e Initial load
duke
parents:
diff changeset
134 #ifdef ASSERT
a61af66fc99e Initial load
duke
parents:
diff changeset
135 if (TraceHandleAllocation) {
a61af66fc99e Initial load
duke
parents:
diff changeset
136 size_t handles = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
137 Chunk *c = _chunk->next();
a61af66fc99e Initial load
duke
parents:
diff changeset
138 if (c == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
139 handles = area->_hwm - _hwm; // no new chunk allocated
a61af66fc99e Initial load
duke
parents:
diff changeset
140 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 handles = _max - _hwm; // add rest in first chunk
a61af66fc99e Initial load
duke
parents:
diff changeset
142 while(c != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
143 handles += c->length();
a61af66fc99e Initial load
duke
parents:
diff changeset
144 c = c->next();
a61af66fc99e Initial load
duke
parents:
diff changeset
145 }
a61af66fc99e Initial load
duke
parents:
diff changeset
146 handles -= area->_max - area->_hwm; // adjust for last trunk not full
a61af66fc99e Initial load
duke
parents:
diff changeset
147 }
a61af66fc99e Initial load
duke
parents:
diff changeset
148 handles /= sizeof(void *); // Adjust for size of a handle
a61af66fc99e Initial load
duke
parents:
diff changeset
149 if (handles > HandleAllocationLimit) {
a61af66fc99e Initial load
duke
parents:
diff changeset
150 // Note: _nof_handlemarks is only set in debug mode
a61af66fc99e Initial load
duke
parents:
diff changeset
151 warning("%d: Allocated in HandleMark : %d", _nof_handlemarks, handles);
a61af66fc99e Initial load
duke
parents:
diff changeset
152 }
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
153
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 6197
diff changeset
154 tty->print_cr("Handles %d", handles);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
155 }
a61af66fc99e Initial load
duke
parents:
diff changeset
156 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
157
a61af66fc99e Initial load
duke
parents:
diff changeset
158 // Delete later chunks
a61af66fc99e Initial load
duke
parents:
diff changeset
159 if( _chunk->next() ) {
6882
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
160 // reset arena size before delete chunks. Otherwise, the total
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
161 // arena size could exceed total chunk size
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
162 assert(area->size_in_bytes() > size_in_bytes(), "Sanity check");
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
163 area->set_size_in_bytes(size_in_bytes());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
164 _chunk->next_chop();
6882
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
165 } else {
716c64bda5ba 7199092: NMT: NMT needs to deal overlapped virtual memory ranges
zgu
parents: 6867
diff changeset
166 assert(area->size_in_bytes() == size_in_bytes(), "Sanity check");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
167 }
a61af66fc99e Initial load
duke
parents:
diff changeset
168 // Roll back arena to saved top markers
a61af66fc99e Initial load
duke
parents:
diff changeset
169 area->_chunk = _chunk;
a61af66fc99e Initial load
duke
parents:
diff changeset
170 area->_hwm = _hwm;
a61af66fc99e Initial load
duke
parents:
diff changeset
171 area->_max = _max;
a61af66fc99e Initial load
duke
parents:
diff changeset
172 #ifdef ASSERT
a61af66fc99e Initial load
duke
parents:
diff changeset
173 // clear out first chunk (to detect allocation bugs)
a61af66fc99e Initial load
duke
parents:
diff changeset
174 if (ZapVMHandleArea) {
a61af66fc99e Initial load
duke
parents:
diff changeset
175 memset(_hwm, badHandleValue, _max - _hwm);
a61af66fc99e Initial load
duke
parents:
diff changeset
176 }
a61af66fc99e Initial load
duke
parents:
diff changeset
177 Atomic::dec(&_nof_handlemarks);
a61af66fc99e Initial load
duke
parents:
diff changeset
178 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 // Unlink this from the thread
a61af66fc99e Initial load
duke
parents:
diff changeset
181 _thread->set_last_handle_mark(previous_handle_mark());
a61af66fc99e Initial load
duke
parents:
diff changeset
182 }
a61af66fc99e Initial load
duke
parents:
diff changeset
183
12146
9758d9f36299 8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced
coleenp
parents: 10271
diff changeset
184 void* HandleMark::operator new(size_t size) throw() {
10271
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
185 return AllocateHeap(size, mtThread);
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
186 }
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
187
12146
9758d9f36299 8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced
coleenp
parents: 10271
diff changeset
188 void* HandleMark::operator new [] (size_t size) throw() {
10271
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
189 return AllocateHeap(size, mtThread);
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
190 }
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
191
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
192 void HandleMark::operator delete(void* p) {
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
193 FreeHeap(p, mtThread);
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
194 }
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
195
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
196 void HandleMark::operator delete[](void* p) {
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
197 FreeHeap(p, mtThread);
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
198 }
f9be75d21404 8012902: remove use of global operator new - take 2
minqi
parents: 7180
diff changeset
199
0
a61af66fc99e Initial load
duke
parents:
diff changeset
200 #ifdef ASSERT
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 NoHandleMark::NoHandleMark() {
a61af66fc99e Initial load
duke
parents:
diff changeset
203 HandleArea* area = Thread::current()->handle_area();
a61af66fc99e Initial load
duke
parents:
diff changeset
204 area->_no_handle_mark_nesting++;
a61af66fc99e Initial load
duke
parents:
diff changeset
205 assert(area->_no_handle_mark_nesting > 0, "must stack allocate NoHandleMark" );
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 NoHandleMark::~NoHandleMark() {
a61af66fc99e Initial load
duke
parents:
diff changeset
210 HandleArea* area = Thread::current()->handle_area();
a61af66fc99e Initial load
duke
parents:
diff changeset
211 assert(area->_no_handle_mark_nesting > 0, "must stack allocate NoHandleMark" );
a61af66fc99e Initial load
duke
parents:
diff changeset
212 area->_no_handle_mark_nesting--;
a61af66fc99e Initial load
duke
parents:
diff changeset
213 }
a61af66fc99e Initial load
duke
parents:
diff changeset
214
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216 ResetNoHandleMark::ResetNoHandleMark() {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 HandleArea* area = Thread::current()->handle_area();
a61af66fc99e Initial load
duke
parents:
diff changeset
218 _no_handle_mark_nesting = area->_no_handle_mark_nesting;
a61af66fc99e Initial load
duke
parents:
diff changeset
219 area->_no_handle_mark_nesting = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 ResetNoHandleMark::~ResetNoHandleMark() {
a61af66fc99e Initial load
duke
parents:
diff changeset
224 HandleArea* area = Thread::current()->handle_area();
a61af66fc99e Initial load
duke
parents:
diff changeset
225 area->_no_handle_mark_nesting = _no_handle_mark_nesting;
a61af66fc99e Initial load
duke
parents:
diff changeset
226 }
a61af66fc99e Initial load
duke
parents:
diff changeset
227
a61af66fc99e Initial load
duke
parents:
diff changeset
228 #endif