< prev index next >

src/hotspot/share/prims/jvmtiEnv.cpp

Print this page




 452 // class_count - pre-checked to be greater than or equal to 0
 453 // class_definitions - pre-checked for NULL
 454 jvmtiError
 455 JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
 456 //TODO: add locking
 457   VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
 458   VMThread::execute(&op);
 459   return (op.check_error());
 460 } /* end RedefineClasses */
 461 
 462 
 463   //
 464   // Object functions
 465   //
 466 
 467 // size_ptr - pre-checked for NULL
 468 jvmtiError
 469 JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) {
 470   oop mirror = JNIHandles::resolve_external_guard(object);
 471   NULL_CHECK(mirror, JVMTI_ERROR_INVALID_OBJECT);
 472   *size_ptr = (jlong)mirror->size() * wordSize;
 473   return JVMTI_ERROR_NONE;
 474 } /* end GetObjectSize */
 475 
 476   //
 477   // Method functions
 478   //
 479 
 480 // prefix - NULL is a valid value, must be checked
 481 jvmtiError
 482 JvmtiEnv::SetNativeMethodPrefix(const char* prefix) {
 483   return prefix == NULL?
 484               SetNativeMethodPrefixes(0, NULL) :
 485               SetNativeMethodPrefixes(1, (char**)&prefix);
 486 } /* end SetNativeMethodPrefix */
 487 
 488 
 489 // prefix_count - pre-checked to be greater than or equal to 0
 490 // prefixes - pre-checked for NULL
 491 jvmtiError
 492 JvmtiEnv::SetNativeMethodPrefixes(jint prefix_count, char** prefixes) {




 452 // class_count - pre-checked to be greater than or equal to 0
 453 // class_definitions - pre-checked for NULL
 454 jvmtiError
 455 JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
 456 //TODO: add locking
 457   VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
 458   VMThread::execute(&op);
 459   return (op.check_error());
 460 } /* end RedefineClasses */
 461 
 462 
 463   //
 464   // Object functions
 465   //
 466 
 467 // size_ptr - pre-checked for NULL
 468 jvmtiError
 469 JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) {
 470   oop mirror = JNIHandles::resolve_external_guard(object);
 471   NULL_CHECK(mirror, JVMTI_ERROR_INVALID_OBJECT);
 472   *size_ptr = (jlong)(mirror->size() + Universe::heap()->oop_extra_words()) * wordSize;
 473   return JVMTI_ERROR_NONE;
 474 } /* end GetObjectSize */
 475 
 476   //
 477   // Method functions
 478   //
 479 
 480 // prefix - NULL is a valid value, must be checked
 481 jvmtiError
 482 JvmtiEnv::SetNativeMethodPrefix(const char* prefix) {
 483   return prefix == NULL?
 484               SetNativeMethodPrefixes(0, NULL) :
 485               SetNativeMethodPrefixes(1, (char**)&prefix);
 486 } /* end SetNativeMethodPrefix */
 487 
 488 
 489 // prefix_count - pre-checked to be greater than or equal to 0
 490 // prefixes - pre-checked for NULL
 491 jvmtiError
 492 JvmtiEnv::SetNativeMethodPrefixes(jint prefix_count, char** prefixes) {


< prev index next >