changeset 2580:5f2695feaa06

Fix loading profiling results for offline JVMs. Reviewed-by: aazores Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-February/022121.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Fri, 03 Feb 2017 15:49:50 +0100
parents 4823a5a908d7
children f08b3097e2a4
files vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/VmProfileController.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/VmProfileController.java	Mon Jan 30 18:53:09 2017 +0100
+++ b/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/VmProfileController.java	Fri Feb 03 15:49:50 2017 +0100
@@ -178,7 +178,15 @@
                         break;
                     case VISIBLE:
                         restoreState();
-                        view.setViewControlsEnabled(isAlive());
+                        boolean isAlive = isAlive();
+                        view.setViewControlsEnabled(isAlive);
+                        // When the VM we've selected is dead then the overlay would
+                        // be empty and the table wouldn't show past results 
+                        // if we didn't load latest profiling data. For live
+                        // JVMs we load them after each stopped profiling event.
+                        if (!isAlive) {
+                            loadLatestProfileData();
+                        }
                         updater.start();
                         break;
                     default: