author | never |
Thu, 18 Jan 2018 09:01:00 -0800 | |
changeset 48792 | d2920683b2ea |
parent 47216 | 71c04702a3d5 |
child 49480 | d7df2dd501ce |
permissions | -rw-r--r-- |
1 | 1 |
/* |
46271
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
42650
diff
changeset
|
2 |
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3603
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3603
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3603
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
29081
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
13728
diff
changeset
|
26 |
#include "classfile/javaClasses.inline.hpp" |
7397 | 27 |
#include "code/codeCache.hpp" |
28 |
#include "code/debugInfoRec.hpp" |
|
29 |
#include "code/nmethod.hpp" |
|
30 |
#include "code/pcDesc.hpp" |
|
31 |
#include "code/scopeDesc.hpp" |
|
32 |
#include "interpreter/interpreter.hpp" |
|
33 |
#include "interpreter/oopMapCache.hpp" |
|
34 |
#include "oops/instanceKlass.hpp" |
|
35 |
#include "oops/oop.inline.hpp" |
|
36 |
#include "runtime/basicLock.hpp" |
|
37 |
#include "runtime/handles.inline.hpp" |
|
38 |
#include "runtime/monitorChunk.hpp" |
|
39 |
#include "runtime/signature.hpp" |
|
40 |
#include "runtime/stubRoutines.hpp" |
|
41 |
#include "runtime/vframeArray.hpp" |
|
42 |
#include "runtime/vframe_hp.hpp" |
|
43 |
#ifdef COMPILER2 |
|
44 |
#include "opto/matcher.hpp" |
|
45 |
#endif |
|
1 | 46 |
|
47 |
||
48 |
// ------------- compiledVFrame -------------- |
|
49 |
||
50 |
StackValueCollection* compiledVFrame::locals() const { |
|
51 |
// Natives has no scope |
|
52 |
if (scope() == NULL) return new StackValueCollection(0); |
|
53 |
GrowableArray<ScopeValue*>* scv_list = scope()->locals(); |
|
54 |
if (scv_list == NULL) return new StackValueCollection(0); |
|
55 |
||
56 |
// scv_list is the list of ScopeValues describing the JVM stack state. |
|
57 |
// There is one scv_list entry for every JVM stack state in use. |
|
58 |
int length = scv_list->length(); |
|
59 |
StackValueCollection* result = new StackValueCollection(length); |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
60 |
for (int i = 0; i < length; i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
61 |
result->add(create_stack_value(scv_list->at(i))); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
62 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
63 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
64 |
// Replace the original values with any stores that have been |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
65 |
// performed through compiledVFrame::update_locals. |
1 | 66 |
GrowableArray<jvmtiDeferredLocalVariableSet*>* list = thread()->deferred_locals(); |
67 |
if (list != NULL ) { |
|
68 |
// In real life this never happens or is typically a single element search |
|
69 |
for (int i = 0; i < list->length(); i++) { |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
70 |
if (list->at(i)->matches(this)) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
71 |
list->at(i)->update_locals(result); |
1 | 72 |
break; |
73 |
} |
|
74 |
} |
|
75 |
} |
|
76 |
||
77 |
return result; |
|
78 |
} |
|
79 |
||
80 |
||
81 |
void compiledVFrame::set_locals(StackValueCollection* values) const { |
|
82 |
||
83 |
fatal("Should use update_local for each local update"); |
|
84 |
} |
|
85 |
||
86 |
void compiledVFrame::update_local(BasicType type, int index, jvalue value) { |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
87 |
assert(index >= 0 && index < method()->max_locals(), "out of bounds"); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
88 |
update_deferred_value(type, index, value); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
89 |
} |
1 | 90 |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
91 |
void compiledVFrame::update_stack(BasicType type, int index, jvalue value) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
92 |
assert(index >= 0 && index < method()->max_stack(), "out of bounds"); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
93 |
update_deferred_value(type, index + method()->max_locals(), value); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
94 |
} |
1 | 95 |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
96 |
void compiledVFrame::update_monitor(int index, MonitorInfo* val) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
97 |
assert(index >= 0, "out of bounds"); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
98 |
jvalue value; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
99 |
value.l = (jobject) val->owner(); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
100 |
update_deferred_value(T_OBJECT, index + method()->max_locals() + method()->max_stack(), value); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
101 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
102 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
103 |
void compiledVFrame::update_deferred_value(BasicType type, int index, jvalue value) { |
1 | 104 |
assert(fr().is_deoptimized_frame(), "frame must be scheduled for deoptimization"); |
105 |
GrowableArray<jvmtiDeferredLocalVariableSet*>* deferred = thread()->deferred_locals(); |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
106 |
jvmtiDeferredLocalVariableSet* locals = NULL; |
1 | 107 |
if (deferred != NULL ) { |
108 |
// See if this vframe has already had locals with deferred writes |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
109 |
for (int f = 0; f < deferred->length(); f++ ) { |
1 | 110 |
if (deferred->at(f)->matches(this)) { |
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
111 |
locals = deferred->at(f); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
112 |
break; |
1 | 113 |
} |
114 |
} |
|
115 |
// No matching vframe must push a new vframe |
|
116 |
} else { |
|
117 |
// No deferred updates pending for this thread. |
|
118 |
// allocate in C heap |
|
13195 | 119 |
deferred = new(ResourceObj::C_HEAP, mtCompiler) GrowableArray<jvmtiDeferredLocalVariableSet*> (1, true); |
1 | 120 |
thread()->set_deferred_locals(deferred); |
121 |
} |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
122 |
if (locals == NULL) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
123 |
locals = new jvmtiDeferredLocalVariableSet(method(), bci(), fr().id(), vframe_id()); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
124 |
deferred->push(locals); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
125 |
assert(locals->id() == fr().id(), "Huh? Must match"); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
126 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
127 |
locals->set_value_at(index, type, value); |
1 | 128 |
} |
129 |
||
130 |
StackValueCollection* compiledVFrame::expressions() const { |
|
131 |
// Natives has no scope |
|
132 |
if (scope() == NULL) return new StackValueCollection(0); |
|
133 |
GrowableArray<ScopeValue*>* scv_list = scope()->expressions(); |
|
134 |
if (scv_list == NULL) return new StackValueCollection(0); |
|
135 |
||
136 |
// scv_list is the list of ScopeValues describing the JVM stack state. |
|
137 |
// There is one scv_list entry for every JVM stack state in use. |
|
138 |
int length = scv_list->length(); |
|
139 |
StackValueCollection* result = new StackValueCollection(length); |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
140 |
for (int i = 0; i < length; i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
141 |
result->add(create_stack_value(scv_list->at(i))); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
142 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
143 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
144 |
// Replace the original values with any stores that have been |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
145 |
// performed through compiledVFrame::update_stack. |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
146 |
GrowableArray<jvmtiDeferredLocalVariableSet*>* list = thread()->deferred_locals(); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
147 |
if (list != NULL ) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
148 |
// In real life this never happens or is typically a single element search |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
149 |
for (int i = 0; i < list->length(); i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
150 |
if (list->at(i)->matches(this)) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
151 |
list->at(i)->update_stack(result); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
152 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
153 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
154 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
155 |
} |
1 | 156 |
|
157 |
return result; |
|
158 |
} |
|
159 |
||
160 |
||
161 |
// The implementation of the following two methods was factorized into the |
|
162 |
// class StackValue because it is also used from within deoptimization.cpp for |
|
163 |
// rematerialization and relocking of non-escaping objects. |
|
164 |
||
165 |
StackValue *compiledVFrame::create_stack_value(ScopeValue *sv) const { |
|
166 |
return StackValue::create_stack_value(&_fr, register_map(), sv); |
|
167 |
} |
|
168 |
||
169 |
BasicLock* compiledVFrame::resolve_monitor_lock(Location location) const { |
|
170 |
return StackValue::resolve_monitor_lock(&_fr, location); |
|
171 |
} |
|
172 |
||
173 |
||
174 |
GrowableArray<MonitorInfo*>* compiledVFrame::monitors() const { |
|
175 |
// Natives has no scope |
|
176 |
if (scope() == NULL) { |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
177 |
CompiledMethod* nm = code(); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
178 |
Method* method = nm->method(); |
42650 | 179 |
assert(method->is_native() || nm->is_aot(), "Expect a native method or precompiled method"); |
1 | 180 |
if (!method->is_synchronized()) { |
181 |
return new GrowableArray<MonitorInfo*>(0); |
|
182 |
} |
|
183 |
// This monitor is really only needed for UseBiasedLocking, but |
|
184 |
// return it in all cases for now as it might be useful for stack |
|
185 |
// traces and tools as well |
|
186 |
GrowableArray<MonitorInfo*> *monitors = new GrowableArray<MonitorInfo*>(1); |
|
187 |
// Casting away const |
|
188 |
frame& fr = (frame&) _fr; |
|
7444 | 189 |
MonitorInfo* info = new MonitorInfo( |
190 |
fr.get_native_receiver(), fr.get_native_monitor(), false, false); |
|
1 | 191 |
monitors->push(info); |
192 |
return monitors; |
|
193 |
} |
|
194 |
GrowableArray<MonitorValue*>* monitors = scope()->monitors(); |
|
195 |
if (monitors == NULL) { |
|
196 |
return new GrowableArray<MonitorInfo*>(0); |
|
197 |
} |
|
198 |
GrowableArray<MonitorInfo*>* result = new GrowableArray<MonitorInfo*>(monitors->length()); |
|
199 |
for (int index = 0; index < monitors->length(); index++) { |
|
200 |
MonitorValue* mv = monitors->at(index); |
|
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
201 |
ScopeValue* ov = mv->owner(); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
202 |
StackValue *owner_sv = create_stack_value(ov); // it is an oop |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
203 |
if (ov->is_object() && owner_sv->obj_is_scalar_replaced()) { // The owner object was scalar replaced |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
204 |
assert(mv->eliminated(), "monitor should be eliminated for scalar replaced object"); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
205 |
// Put klass for scalar replaced object. |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
206 |
ScopeValue* kv = ((ObjectValue *)ov)->klass(); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
207 |
assert(kv->is_constant_oop(), "klass should be oop constant for scalar replaced object"); |
46271
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
42650
diff
changeset
|
208 |
Handle k(Thread::current(), ((ConstantOopReadValue*)kv)->value()()); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
209 |
assert(java_lang_Class::is_instance(k()), "must be"); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
210 |
result->push(new MonitorInfo(k(), resolve_monitor_lock(mv->basic_lock()), |
3171
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
211 |
mv->eliminated(), true)); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
212 |
} else { |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
213 |
result->push(new MonitorInfo(owner_sv->get_obj()(), resolve_monitor_lock(mv->basic_lock()), |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
214 |
mv->eliminated(), false)); |
aa289b22b577
6837472: com/sun/jdi/MonitorFrameInfo.java fails with AggressiveOpts in 6u14
kvn
parents:
670
diff
changeset
|
215 |
} |
1 | 216 |
} |
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
217 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
218 |
// Replace the original values with any stores that have been |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
219 |
// performed through compiledVFrame::update_monitors. |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
220 |
GrowableArray<jvmtiDeferredLocalVariableSet*>* list = thread()->deferred_locals(); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
221 |
if (list != NULL ) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
222 |
// In real life this never happens or is typically a single element search |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
223 |
for (int i = 0; i < list->length(); i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
224 |
if (list->at(i)->matches(this)) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
225 |
list->at(i)->update_monitors(result); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
226 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
227 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
228 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
229 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
230 |
|
1 | 231 |
return result; |
232 |
} |
|
233 |
||
234 |
||
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
235 |
compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, CompiledMethod* nm) |
1 | 236 |
: javaVFrame(fr, reg_map, thread) { |
237 |
_scope = NULL; |
|
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
238 |
_vframe_id = 0; |
1 | 239 |
// Compiled method (native stub or Java code) |
240 |
// native wrappers have no scope data, it is implied |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
241 |
if (!nm->is_compiled() || !nm->as_compiled_method()->is_native_method()) { |
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
242 |
_scope = nm->scope_desc_at(_fr.pc()); |
1 | 243 |
} |
244 |
} |
|
245 |
||
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
246 |
compiledVFrame::compiledVFrame(const frame* fr, const RegisterMap* reg_map, JavaThread* thread, ScopeDesc* scope, int vframe_id) |
1 | 247 |
: javaVFrame(fr, reg_map, thread) { |
248 |
_scope = scope; |
|
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
249 |
_vframe_id = vframe_id; |
1 | 250 |
guarantee(_scope != NULL, "scope must be present"); |
251 |
} |
|
252 |
||
253 |
||
254 |
bool compiledVFrame::is_top() const { |
|
255 |
// FIX IT: Remove this when new native stubs are in place |
|
256 |
if (scope() == NULL) return true; |
|
257 |
return scope()->is_top(); |
|
258 |
} |
|
259 |
||
260 |
||
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
261 |
CompiledMethod* compiledVFrame::code() const { |
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
262 |
return CodeCache::find_compiled(_fr.pc()); |
1 | 263 |
} |
264 |
||
265 |
||
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
266 |
Method* compiledVFrame::method() const { |
1 | 267 |
if (scope() == NULL) { |
268 |
// native nmethods have no scope the method is implied |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
269 |
nmethod* nm = code()->as_nmethod(); |
1 | 270 |
assert(nm->is_native_method(), "must be native"); |
271 |
return nm->method(); |
|
272 |
} |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
273 |
return scope()->method(); |
1 | 274 |
} |
275 |
||
276 |
||
277 |
int compiledVFrame::bci() const { |
|
278 |
int raw = raw_bci(); |
|
279 |
return raw == SynchronizationEntryBCI ? 0 : raw; |
|
280 |
} |
|
281 |
||
282 |
||
283 |
int compiledVFrame::raw_bci() const { |
|
284 |
if (scope() == NULL) { |
|
285 |
// native nmethods have no scope the method/bci is implied |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
286 |
nmethod* nm = code()->as_nmethod(); |
1 | 287 |
assert(nm->is_native_method(), "must be native"); |
288 |
return 0; |
|
289 |
} |
|
290 |
return scope()->bci(); |
|
291 |
} |
|
292 |
||
3600
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
293 |
bool compiledVFrame::should_reexecute() const { |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
294 |
if (scope() == NULL) { |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
295 |
// native nmethods have no scope the method/bci is implied |
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
296 |
nmethod* nm = code()->as_nmethod(); |
3600
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
297 |
assert(nm->is_native_method(), "must be native"); |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
298 |
return false; |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
299 |
} |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
300 |
return scope()->should_reexecute(); |
27aa4477d039
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
cfang
parents:
3171
diff
changeset
|
301 |
} |
1 | 302 |
|
303 |
vframe* compiledVFrame::sender() const { |
|
304 |
const frame f = fr(); |
|
305 |
if (scope() == NULL) { |
|
306 |
// native nmethods have no scope the method/bci is implied |
|
38133
78b95467b9f1
8151956: Support non-continuous CodeBlobs in HotSpot
rbackman
parents:
29081
diff
changeset
|
307 |
nmethod* nm = code()->as_nmethod(); |
1 | 308 |
assert(nm->is_native_method(), "must be native"); |
309 |
return vframe::sender(); |
|
310 |
} else { |
|
311 |
return scope()->is_top() |
|
312 |
? vframe::sender() |
|
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
313 |
: new compiledVFrame(&f, register_map(), thread(), scope()->sender(), vframe_id() + 1); |
1 | 314 |
} |
315 |
} |
|
316 |
||
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
317 |
jvmtiDeferredLocalVariableSet::jvmtiDeferredLocalVariableSet(Method* method, int bci, intptr_t* id, int vframe_id) { |
1 | 318 |
_method = method; |
319 |
_bci = bci; |
|
320 |
_id = id; |
|
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
321 |
_vframe_id = vframe_id; |
1 | 322 |
// Alway will need at least one, must be on C heap |
13195 | 323 |
_locals = new(ResourceObj::C_HEAP, mtCompiler) GrowableArray<jvmtiDeferredLocalVariable*> (1, true); |
1 | 324 |
} |
325 |
||
326 |
jvmtiDeferredLocalVariableSet::~jvmtiDeferredLocalVariableSet() { |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
327 |
for (int i = 0; i < _locals->length(); i++ ) { |
1 | 328 |
delete _locals->at(i); |
329 |
} |
|
330 |
// Free growableArray and c heap for elements |
|
331 |
delete _locals; |
|
332 |
} |
|
333 |
||
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
334 |
bool jvmtiDeferredLocalVariableSet::matches(const vframe* vf) { |
1 | 335 |
if (!vf->is_compiled_frame()) return false; |
336 |
compiledVFrame* cvf = (compiledVFrame*)vf; |
|
43484
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
337 |
if (cvf->fr().id() == id() && cvf->vframe_id() == vframe_id()) { |
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
338 |
assert(cvf->method() == method() && cvf->bci() == bci(), "must agree"); |
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
339 |
return true; |
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
340 |
} |
9c95dd31d0da
8173309: jvmtiDeferredLocalVariableSet may update the wrong frame
never
parents:
42650
diff
changeset
|
341 |
return false; |
1 | 342 |
} |
343 |
||
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
344 |
void jvmtiDeferredLocalVariableSet::set_value_at(int idx, BasicType type, jvalue val) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
345 |
for (int i = 0; i < _locals->length(); i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
346 |
if (_locals->at(i)->index() == idx) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
347 |
assert(_locals->at(i)->type() == type, "Wrong type"); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
348 |
_locals->at(i)->set_value(val); |
1 | 349 |
return; |
350 |
} |
|
351 |
} |
|
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
352 |
_locals->push(new jvmtiDeferredLocalVariable(idx, type, val)); |
1 | 353 |
} |
354 |
||
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
355 |
void jvmtiDeferredLocalVariableSet::update_value(StackValueCollection* locals, BasicType type, int index, jvalue value) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
356 |
switch (type) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
357 |
case T_BOOLEAN: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
358 |
locals->set_int_at(index, value.z); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
359 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
360 |
case T_CHAR: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
361 |
locals->set_int_at(index, value.c); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
362 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
363 |
case T_FLOAT: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
364 |
locals->set_float_at(index, value.f); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
365 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
366 |
case T_DOUBLE: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
367 |
locals->set_double_at(index, value.d); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
368 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
369 |
case T_BYTE: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
370 |
locals->set_int_at(index, value.b); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
371 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
372 |
case T_SHORT: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
373 |
locals->set_int_at(index, value.s); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
374 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
375 |
case T_INT: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
376 |
locals->set_int_at(index, value.i); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
377 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
378 |
case T_LONG: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
379 |
locals->set_long_at(index, value.j); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
380 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
381 |
case T_OBJECT: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
382 |
{ |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
383 |
Handle obj(Thread::current(), (oop)value.l); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
384 |
locals->set_obj_at(index, obj); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
385 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
386 |
break; |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
387 |
default: |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
388 |
ShouldNotReachHere(); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
389 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
390 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
391 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
392 |
void jvmtiDeferredLocalVariableSet::update_locals(StackValueCollection* locals) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
393 |
for (int l = 0; l < _locals->length(); l ++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
394 |
jvmtiDeferredLocalVariable* val = _locals->at(l); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
395 |
if (val->index() >= 0 && val->index() < method()->max_locals()) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
396 |
update_value(locals, val->type(), val->index(), val->value()); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
397 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
398 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
399 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
400 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
401 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
402 |
void jvmtiDeferredLocalVariableSet::update_stack(StackValueCollection* expressions) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
403 |
for (int l = 0; l < _locals->length(); l ++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
404 |
jvmtiDeferredLocalVariable* val = _locals->at(l); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
405 |
if (val->index() >= method()->max_locals() && val->index() < method()->max_locals() + method()->max_stack()) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
406 |
update_value(expressions, val->type(), val->index() - method()->max_locals(), val->value()); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
407 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
408 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
409 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
410 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
411 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
412 |
void jvmtiDeferredLocalVariableSet::update_monitors(GrowableArray<MonitorInfo*>* monitors) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
413 |
for (int l = 0; l < _locals->length(); l ++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
414 |
jvmtiDeferredLocalVariable* val = _locals->at(l); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
415 |
if (val->index() >= method()->max_locals() + method()->max_stack()) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
416 |
int lock_index = val->index() - (method()->max_locals() + method()->max_stack()); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
417 |
MonitorInfo* info = monitors->at(lock_index); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
418 |
MonitorInfo* new_info = new MonitorInfo((oopDesc*)val->value().l, info->lock(), info->eliminated(), info->owner_is_scalar_replaced()); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
419 |
monitors->at_put(lock_index, new_info); |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
420 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
421 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
422 |
} |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
423 |
|
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
424 |
|
1 | 425 |
void jvmtiDeferredLocalVariableSet::oops_do(OopClosure* f) { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
426 |
// The Method* is on the stack so a live activation keeps it alive |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13195
diff
changeset
|
427 |
// either by mirror in interpreter or code in compiled code. |
48792
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
428 |
for (int i = 0; i < _locals->length(); i++) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
429 |
if (_locals->at(i)->type() == T_OBJECT) { |
d2920683b2ea
8192004: InspectedFrame.materializeVirtualObjects only updates locals with new objects
never
parents:
47216
diff
changeset
|
430 |
f->do_oop(_locals->at(i)->oop_addr()); |
1 | 431 |
} |
432 |
} |
|
433 |
} |
|
434 |
||
435 |
jvmtiDeferredLocalVariable::jvmtiDeferredLocalVariable(int index, BasicType type, jvalue value) { |
|
436 |
_index = index; |
|
437 |
_type = type; |
|
438 |
_value = value; |
|
439 |
} |
|
440 |
||
441 |
||
442 |
#ifndef PRODUCT |
|
443 |
void compiledVFrame::verify() const { |
|
444 |
Unimplemented(); |
|
445 |
} |
|
446 |
#endif // PRODUCT |