hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 38059 86ab3f0a9f87
parent 37248 11a660dbbb8e
child 38094 46977cd73d86
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Thu Apr 21 20:11:40 2016 +0000
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Thu Apr 21 20:49:11 2016 -0700
@@ -2032,10 +2032,11 @@
   return (old_state != is_in_error_state());
 }
 
+#if INCLUDE_JVMTI
 static void clear_all_breakpoints(Method* m) {
   m->clear_all_breakpoints();
 }
-
+#endif
 
 void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
   // notify the debugger
@@ -2097,6 +2098,7 @@
   // DC::remove_all_dependents() when it touches unloaded nmethod.
   dependencies().wipe();
 
+#if INCLUDE_JVMTI
   // Deallocate breakpoint records
   if (breakpoints() != 0x0) {
     methods_do(clear_all_breakpoints);
@@ -2108,6 +2110,7 @@
     os::free(_cached_class_file);
     _cached_class_file = NULL;
   }
+#endif
 
   // Decrement symbol reference counts associated with the unloaded class.
   if (_name != NULL) _name->decrement_refcount();
@@ -2841,7 +2844,7 @@
   {
     bool have_pv = false;
     // previous versions are linked together through the InstanceKlass
-    for (InstanceKlass* pv_node = _previous_versions;
+    for (InstanceKlass* pv_node = previous_versions();
          pv_node != NULL;
          pv_node = pv_node->previous_versions()) {
       if (!have_pv)
@@ -3334,7 +3337,7 @@
 }
 #endif
 
-
+#if INCLUDE_JVMTI
 
 // RedefineClasses() support for previous versions:
 int InstanceKlass::_previous_version_count = 0;
@@ -3549,6 +3552,7 @@
   _previous_version_count++;
 } // end add_previous_version()
 
+#endif // INCLUDE_JVMTI
 
 Method* InstanceKlass::method_with_idnum(int idnum) {
   Method* m = NULL;
@@ -3598,7 +3602,7 @@
   return method;
 }
 
-
+#if INCLUDE_JVMTI
 jint InstanceKlass::get_cached_class_file_len() {
   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
 }
@@ -3606,3 +3610,4 @@
 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
   return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
 }
+#endif