changeset 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 3395128f3aef
children 940b668f0809
files src/share/vm/jvmci/jvmciRuntime.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
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;
+        }
       }
     }
   }