aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch')
-rw-r--r--hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch b/hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch
new file mode 100644
index 00000000..cde459da
--- /dev/null
+++ b/hotspot/.hg/patches/jvmti-getLoadedClasses-java8.patch
@@ -0,0 +1,19 @@
+diff --git a/src/share/vm/prims/jvmtiGetLoadedClasses.cpp b/src/share/vm/prims/jvmtiGetLoadedClasses.cpp
+index 70aede5..381868b 100644
+--- a/src/share/vm/prims/jvmtiGetLoadedClasses.cpp
++++ b/src/share/vm/prims/jvmtiGetLoadedClasses.cpp
+@@ -42,7 +42,13 @@
+
+ void do_klass(Klass* k) {
+ // Collect all jclasses
+- _classStack.push((jclass) _env->jni_reference(k->java_mirror()));
++ // DCEVM : LoadedClassesClosure in dcevm7 iterates over classes from SystemDictionary therefore the class "k" is always
++ // the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
++ // changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
++ // must use new versions only.
++ if (k->new_version()==NULL) {
++ _classStack.push((jclass) _env->jni_reference(k->java_mirror()));
++ }
+ }
+
+ int extract(jclass* result_list) {