--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Jun 12 11:17:39 2013 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Jul 17 18:06:29 2013 -0400
@@ -48,6 +48,7 @@
#include "oops/symbol.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiRedefineClassesTrace.hpp"
+#include "prims/jvmtiRedefineClasses.hpp"
#include "prims/methodComparator.hpp"
#include "runtime/fieldDescriptor.hpp"
#include "runtime/handles.inline.hpp"
@@ -291,7 +292,7 @@
set_initial_method_idnum(0);
_dependencies = NULL;
set_jvmti_cached_class_field_map(NULL);
- set_cached_class_file(NULL, 0);
+ set_cached_class_file(NULL);
set_initial_method_idnum(0);
set_minor_version(0);
set_major_version(0);
@@ -2357,10 +2358,9 @@
}
// deallocate the cached class file
- if (_cached_class_file_bytes != NULL) {
- os::free(_cached_class_file_bytes, mtClass);
- _cached_class_file_bytes = NULL;
- _cached_class_file_len = 0;
+ if (_cached_class_file != NULL) {
+ os::free(_cached_class_file, mtClass);
+ _cached_class_file = NULL;
}
// Decrement symbol reference counts associated with the unloaded class.
@@ -3530,6 +3530,14 @@
return m;
}
+jint InstanceKlass::get_cached_class_file_len() {
+ return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
+}
+
+unsigned char * InstanceKlass::get_cached_class_file_bytes() {
+ return VM_RedefineClasses::get_cached_class_file_bytes(_cached_class_file);
+}
+
// Construct a PreviousVersionNode entry for the array hung off
// the InstanceKlass.