hotspot/src/share/vm/prims/jvm.cpp
changeset 46271 979ebd346ecf
parent 43605 07baf498d588
child 46289 1904e7ec236e
equal deleted inserted replaced
46270:2e7898927798 46271:979ebd346ecf
   547   int limit = start_index + frame_count;
   547   int limit = start_index + frame_count;
   548   if (frames_array_h->length() < limit) {
   548   if (frames_array_h->length() < limit) {
   549     THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), "not enough space in buffers", NULL);
   549     THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), "not enough space in buffers", NULL);
   550   }
   550   }
   551 
   551 
   552   Handle result = StackWalk::walk(stackStream_h, mode, skip_frames, frame_count,
   552   oop result = StackWalk::walk(stackStream_h, mode, skip_frames, frame_count,
   553                                   start_index, frames_array_h, CHECK_NULL);
   553                                start_index, frames_array_h, CHECK_NULL);
   554   return JNIHandles::make_local(env, result());
   554   return JNIHandles::make_local(env, result);
   555 JVM_END
   555 JVM_END
   556 
   556 
   557 
   557 
   558 JVM_ENTRY(jint, JVM_MoreStackWalk(JNIEnv *env, jobject stackStream, jlong mode, jlong anchor,
   558 JVM_ENTRY(jint, JVM_MoreStackWalk(JNIEnv *env, jobject stackStream, jlong mode, jlong anchor,
   559                                   jint frame_count, jint start_index,
   559                                   jint frame_count, jint start_index,
   682     if (method != NULL) {
   682     if (method != NULL) {
   683       methodHandle m(THREAD, method);
   683       methodHandle m(THREAD, method);
   684       // This can safepoint and redefine method, so need both new_obj and method
   684       // This can safepoint and redefine method, so need both new_obj and method
   685       // in a handle, for two different reasons.  new_obj can move, method can be
   685       // in a handle, for two different reasons.  new_obj can move, method can be
   686       // deleted if nothing is using it on the stack.
   686       // deleted if nothing is using it on the stack.
   687       m->method_holder()->add_member_name(new_obj());
   687       m->method_holder()->add_member_name(new_obj);
   688     }
   688     }
   689   }
   689   }
   690 
   690 
   691   // Caution: this involves a java upcall, so the clone should be
   691   // Caution: this involves a java upcall, so the clone should be
   692   // "gc-robust" by this stage.
   692   // "gc-robust" by this stage.