< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page




1732 };
1733 
1734 
1735 WB_ENTRY(jobjectArray, WB_getObjectsViaOopIterator(JNIEnv* env, jobject wb, jobject thing))
1736   ResourceMark rm(THREAD);
1737   GrowableArray<Handle>* array = new GrowableArray<Handle>(128);
1738   CollectOops collectOops;
1739   collectOops.array = array;
1740 
1741   JNIHandles::resolve(thing)->oop_iterate(&collectOops);
1742 
1743   return collectOops.create_jni_result(env, THREAD);
1744 WB_END
1745 
1746 WB_ENTRY(jobjectArray, WB_getObjectsViaFrameOopIterator(JNIEnv* env, jobject wb, jint depth))
1747   ResourceMark rm(THREAD);
1748   GrowableArray<Handle>* array = new GrowableArray<Handle>(128);
1749   CollectOops collectOops;
1750   collectOops.array = array;
1751   StackFrameStream sfs(thread);
1752   BufferedValuesDealiaser dealiaser(thread);
1753   while (depth > 0) { // Skip the native WB API frame
1754     sfs.next();
1755     frame* f = sfs.current();
1756     f->oops_do(&collectOops, NULL, sfs.register_map());
1757     depth--;
1758   }
1759   return collectOops.create_jni_result(env, THREAD);
1760 WB_END
1761 
1762 
1763 WB_ENTRY(void, WB_ClearInlineCaches(JNIEnv* env, jobject wb, jboolean preserve_static_stubs))
1764   VM_ClearICs clear_ics(preserve_static_stubs == JNI_TRUE);
1765   VMThread::execute(&clear_ics);
1766 WB_END
1767 
1768 template <typename T>
1769 static bool GetMethodOption(JavaThread* thread, JNIEnv* env, jobject method, jstring name, T* value) {
1770   assert(value != NULL, "sanity");
1771   if (method == NULL || name == NULL) {
1772     return false;




1732 };
1733 
1734 
1735 WB_ENTRY(jobjectArray, WB_getObjectsViaOopIterator(JNIEnv* env, jobject wb, jobject thing))
1736   ResourceMark rm(THREAD);
1737   GrowableArray<Handle>* array = new GrowableArray<Handle>(128);
1738   CollectOops collectOops;
1739   collectOops.array = array;
1740 
1741   JNIHandles::resolve(thing)->oop_iterate(&collectOops);
1742 
1743   return collectOops.create_jni_result(env, THREAD);
1744 WB_END
1745 
1746 WB_ENTRY(jobjectArray, WB_getObjectsViaFrameOopIterator(JNIEnv* env, jobject wb, jint depth))
1747   ResourceMark rm(THREAD);
1748   GrowableArray<Handle>* array = new GrowableArray<Handle>(128);
1749   CollectOops collectOops;
1750   collectOops.array = array;
1751   StackFrameStream sfs(thread);

1752   while (depth > 0) { // Skip the native WB API frame
1753     sfs.next();
1754     frame* f = sfs.current();
1755     f->oops_do(&collectOops, NULL, sfs.register_map());
1756     depth--;
1757   }
1758   return collectOops.create_jni_result(env, THREAD);
1759 WB_END
1760 
1761 
1762 WB_ENTRY(void, WB_ClearInlineCaches(JNIEnv* env, jobject wb, jboolean preserve_static_stubs))
1763   VM_ClearICs clear_ics(preserve_static_stubs == JNI_TRUE);
1764   VMThread::execute(&clear_ics);
1765 WB_END
1766 
1767 template <typename T>
1768 static bool GetMethodOption(JavaThread* thread, JNIEnv* env, jobject method, jstring name, T* value) {
1769   assert(value != NULL, "sanity");
1770   if (method == NULL || name == NULL) {
1771     return false;


< prev index next >