DESCRIPTION

perf: Reduce usage of OSGi Version.

Create new class PerfVersion and use it instead of OSGi Version one as
"perf --version" output doesn't adhere to rules for OSGi qualifier (no
dot allowed in it).

Change-Id: I02b9afe2b81fba4c5d7c7ded00446ea12bebee8c
Signed-off-by: Erick Ross xxx@xxx.xxx


COMMENTS

author: Erick Ross
date: 2015-10-13 15:53:14.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2015-10-13 15:53:20.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9945/

-------------------------------------
author: Brenden Conley
date: 2015-10-13 16:14:20.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9945/ : SUCCESS

-------------------------------------
author: Logan Yoder
date: 2015-10-13 17:46:00.000000000

Patch Set 2: Code-Review-1

Bad news... this time I tried to profile with perf but it failed to parse the version.

Please, take a look at PerfCore#getPerfVersion(). That method has processed the results of perf --version before of instantiate PerfVersion. In this case, PerfVersion receives a version string without qualifier (e.g. "4.0.8") and then it fails to parse.

-------------------------------------
author: Logan Yoder
date: 2015-10-13 17:47:14.000000000

Patch Set 2: Verified-1

(1 comment)

Line:232, perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java -> Fails at this point.

-------------------------------------
author: Erick Ross
date: 2015-10-14 06:09:22.000000000

Patch Set 2:

(2 comments)

Line:232, perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java -> Any details for the failure ?

Line:232, perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java -> Som

-------------------------------------
author: Logan Yoder
date: 2015-10-14 18:36:47.000000000

Patch Set 2:

(1 comment)

Line:232, perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java -> Here is the stack trace:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 3
	at org.eclipse.linuxtools.internal.perf.PerfVersion.<init>(PerfVersion.java:33)
	at org.eclipse.linuxtools.internal.perf.PerfCore.getPerfVersion(PerfCore.java:232)
	at org.eclipse.linuxtools.internal.perf.launch.PerfOptionsTab.initializeFrom(PerfOptionsTab.java:330)
	at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:90)

-----------------------------------------------------

You can reproduce that with code:

PerfVersion version = new PerfVersion("4.0.8");

PerfVersion fails to parse a version string which haven't the qualifier.

-------------------------------------
author: Gerrit Code Review
date: 2015-10-14 18:58:52.000000000

Change has been successfully cherry-picked as 1a1555db9491cc2632d8ef51d24480c327acc23f by Logan Yoder

-------------------------------------
