222 VMThread::execute(&op);
223 } else if (DeoptimizeRandom && (value & 0x1F) == (os::random() & 0x1F)) {
224 VM_DeoptimizeAll op;
225 VMThread::execute(&op);
226 }
227 }
228 deoptimizeAllCounter++;
229 }
230
231
232 void InterfaceSupport::stress_derived_pointers() {
233 #ifdef COMPILER2
234 JavaThread *thread = JavaThread::current();
235 if (!is_init_completed()) return;
236 ResourceMark rm(thread);
237 bool found = false;
238 for (StackFrameStream sfs(thread); !sfs.is_done() && !found; sfs.next()) {
239 CodeBlob* cb = sfs.current()->cb();
240 if (cb != NULL && cb->oop_maps() ) {
241 // Find oopmap for current method
242 OopMap* map = cb->oop_map_for_return_address(sfs.current()->pc());
243 assert(map != NULL, "no oopmap found for pc");
244 found = map->has_derived_pointer();
245 }
246 }
247 if (found) {
248 // $$$ Not sure what to do here.
249 /*
250 Scavenge::invoke(0);
251 */
252 }
253 #endif
254 }
255
256
257 void InterfaceSupport::verify_stack() {
258 JavaThread* thread = JavaThread::current();
259 ResourceMark rm(thread);
260 // disabled because it throws warnings that oop maps should only be accessed
261 // in VM thread or during debugging
262
|
222 VMThread::execute(&op);
223 } else if (DeoptimizeRandom && (value & 0x1F) == (os::random() & 0x1F)) {
224 VM_DeoptimizeAll op;
225 VMThread::execute(&op);
226 }
227 }
228 deoptimizeAllCounter++;
229 }
230
231
232 void InterfaceSupport::stress_derived_pointers() {
233 #ifdef COMPILER2
234 JavaThread *thread = JavaThread::current();
235 if (!is_init_completed()) return;
236 ResourceMark rm(thread);
237 bool found = false;
238 for (StackFrameStream sfs(thread); !sfs.is_done() && !found; sfs.next()) {
239 CodeBlob* cb = sfs.current()->cb();
240 if (cb != NULL && cb->oop_maps() ) {
241 // Find oopmap for current method
242 const ImmutableOopMap* map = cb->oop_map_for_return_address(sfs.current()->pc());
243 assert(map != NULL, "no oopmap found for pc");
244 found = map->has_derived_pointer();
245 }
246 }
247 if (found) {
248 // $$$ Not sure what to do here.
249 /*
250 Scavenge::invoke(0);
251 */
252 }
253 #endif
254 }
255
256
257 void InterfaceSupport::verify_stack() {
258 JavaThread* thread = JavaThread::current();
259 ResourceMark rm(thread);
260 // disabled because it throws warnings that oop maps should only be accessed
261 // in VM thread or during debugging
262
|