changeset 944:e739c4bf5798

profilers: perfasm, remove the redundant check for "java". Additionally fixes the platforms where "java" gets symlinked in the weird ways.
author shade
date Tue, 12 Aug 2014 03:03:51 +0400
parents 22d06efe91cb
children 60e8aae7ac7d
files jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java
diffstat 1 files changed, 21 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Tue Aug 12 02:24:43 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Tue Aug 12 03:03:51 2014 +0400
@@ -724,32 +724,30 @@
                 String lib = elems[elems.length - 1];
                 lib = lib.substring(lib.lastIndexOf("/") + 1, lib.length()).replace("(", "").replace(")", "");
 
-                if (process.equalsIgnoreCase("java")) {
-                    try {
-                        Double time = Double.valueOf(strTime);
-                        if (startTime == null) {
-                            startTime = time;
-                        } else {
-                            if (time - startTime < skipSec) {
-                                continue;
-                            }
+                try {
+                    Double time = Double.valueOf(strTime);
+                    if (startTime == null) {
+                        startTime = time;
+                    } else {
+                        if (time - startTime < skipSec) {
+                            continue;
                         }
-                    } catch (NumberFormatException e) {
-                        // misformatted line, no timestamp
-                        continue;
                     }
+                } catch (NumberFormatException e) {
+                    // misformatted line, no timestamp
+                    continue;
+                }
 
-                    Multiset<Long> evs = events.get(evName);
-                    try {
-                        Long addr = Long.valueOf(strAddr, 16);
-                        evs.add(addr);
-                        methods.put(addr, dedup.dedup(symbol));
-                        libs.put(addr, dedup.dedup(lib));
-                    } catch (NumberFormatException e) {
-                        // kernel addresses like "ffffffff810c1b00" overflow signed long,
-                        // record them as dummy address
-                        evs.add(0L);
-                    }
+                Multiset<Long> evs = events.get(evName);
+                try {
+                    Long addr = Long.valueOf(strAddr, 16);
+                    evs.add(addr);
+                    methods.put(addr, dedup.dedup(symbol));
+                    libs.put(addr, dedup.dedup(lib));
+                } catch (NumberFormatException e) {
+                    // kernel addresses like "ffffffff810c1b00" overflow signed long,
+                    // record them as dummy address
+                    evs.add(0L);
                 }
             }