changeset 927:1a1afdd2d036

profilers: perfasm, old perfs may skip unresolved symbol names, breaking the parser.
author shade
date Wed, 23 Jul 2014 16:22:10 +0400
parents f60971abb85c
children 0e44461d621b
files jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Tue Jul 22 22:47:23 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Wed Jul 23 16:22:10 2014 +0400
@@ -665,6 +665,9 @@
             //
             // Sample input string:
             //    java   598 11937.621044:  cycles:      7f7318c26a10 StringTable::intern(Symbol*, Thread*) (.../libjvm.so)
+            //
+            // Old perfs skip the unresolved symbol names:
+            //    java  6118 171515.765683: instructions:          b4a84c58  (/tmp/perf-6108.map)
 
             String line;
             while ((line = reader.readLine()) != null) {
@@ -672,7 +675,7 @@
 
                 String[] elems = line.trim().split("[ ]+");
 
-                if (elems.length < 7) continue;
+                if (elems.length < 6) continue;
 
                 String process = elems[0];
                 String strTime = elems[2].replace(":", "");