diff src/share/vm/jvmci/jvmciRuntime.cpp @ 22609:c42b12eb270a

trivial prefixes shoudl only apply to the compiler itself
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 23 Sep 2015 19:31:54 -0700
parents d3930fdd1eb3
children 0851eafff5c9
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciRuntime.cpp	Wed Sep 23 19:16:55 2015 -0700
+++ b/src/share/vm/jvmci/jvmciRuntime.cpp	Wed Sep 23 19:31:54 2015 -0700
@@ -1001,9 +1001,12 @@
 
 bool JVMCIRuntime::treat_as_trivial(Method* method) {
   if (_HotSpotJVMCIRuntime_initialized) {
-    for (int i = 0; i < _trivial_prefixes_count; i++) {
-      if (method->method_holder()->name()->starts_with(_trivial_prefixes[i])) {
-        return true;
+    oop loader = method->method_holder()->class_loader();
+    if (loader == NULL || loader == SystemDictionary::jvmci_loader()) {
+      for (int i = 0; i < _trivial_prefixes_count; i++) {
+        if (method->method_holder()->name()->starts_with(_trivial_prefixes[i])) {
+          return true;
+        }
       }
     }
   }