Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-30 22:40:28 +0000
committerJeff Johnston2018-08-31 18:55:07 +0000
commita9943d213852c87a6bb5cd34e47d84f5295a7392 (patch)
treeeffa89f6f8197330ed6e167801b0a3fcdf791968
parentb9a552276d2eb7c58915b89c3126415c3502e65c (diff)
downloadorg.eclipse.linuxtools-a9943d213852c87a6bb5cd34e47d84f5295a7392.tar.gz
org.eclipse.linuxtools-a9943d213852c87a6bb5cd34e47d84f5295a7392.tar.xz
org.eclipse.linuxtools-a9943d213852c87a6bb5cd34e47d84f5295a7392.zip
Bug 538432 - NoStackTrace in PerfCore.getPerfVersion
- expose getProject() method in PerfCore - change getPerfVersion() in PerfCore to issue warning instead of error when perf is missing - add check in initializeFrom() method in PerfOptionsTab to set the error message for the option page if perf is missing Change-Id: Id920b9cf0e938a0ceef518ebc2f873fb8f2c36c2 Reviewed-on: https://git.eclipse.org/r/128400 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> (cherry picked from commit d3b17fe579879895200a3beef65abdee04a7378b) Reviewed-on: https://git.eclipse.org/r/128469
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java8
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java7
2 files changed, 13 insertions, 2 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
index 5f21f87659..bc3e529af2 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
@@ -121,7 +121,7 @@ public class PerfCore {
}
- private static IProject getProject(ILaunchConfiguration config){
+ public static IProject getProject(ILaunchConfiguration config){
if(config == null){
return null;
} else {
@@ -217,8 +217,12 @@ public class PerfCore {
try {
p = RuntimeProcessFactory.getFactory().exec(new String [] {PerfPlugin.PERF_COMMAND, "--version"}, project); //$NON-NLS-1$
} catch (IOException e) {
- logException(e);
+ // Issue warning to avoid AERI reports whenever user is missing perf
+ Status status = new Status(IStatus.WARNING, PerfPlugin.PLUGIN_ID,
+ e.getMessage());
+ PerfPlugin.getDefault().getLog().log(status);
}
+
if (p == null) {
return null;
}
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
index 64483958fb..40f1d7ba1a 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOptionsTab.java
@@ -284,8 +284,15 @@ public class PerfOptionsTab extends AbstractLaunchConfigurationTab {
// Keep track of the last configuration loaded
lastConfig = config;
+
PerfVersion perfVersion = PerfCore.getPerfVersion(config);
+ if (perfVersion == null) {
+ setErrorMessage(Messages.PerfLaunchConfigDelegate_perf_not_found);
+ } else {
+ setErrorMessage(null);
+ }
+
try {
if (perfVersion != null && multiplexEventsVersion.isNewer(perfVersion)) {

Back to the top