changeset 1192:971a0c94beba

7901379: -prof perfasm should parse "StubRoutines::*" entries properly
author shade
date Wed, 08 Apr 2015 12:40:52 +0300
parents 1898f77c754c
children dbe93cfb9e06
files jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Tue Apr 07 13:13:18 2015 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/AbstractPerfAsmProfiler.java	Wed Apr 08 12:40:52 2015 +0300
@@ -755,6 +755,9 @@
                         // Handle the VM stub/interpreter line.
                         method = "<stub: " + line.substring(0, line.indexOf("[")).trim() + ">";
                     }
+                } else if (line.contains("StubRoutines::")) {
+                    // Handle the VM stub/interpreter line (another format)
+                    method = elements[0];
                 }
                 lines.add(asmLine);
 
@@ -902,6 +905,9 @@
         }
 
         public String getMethod(long addr) {
+            if (methodMap.containsKey(addr)) {
+                return methodMap.get(addr);
+            }
             SortedMap<Long, String> head = methodMap.headMap(addr);
             if (head.isEmpty()) {
                 return "<unresolved>";