DESCRIPTION

TMF: [WIP] Add analysis requirement to generate traces from an analysis

Change-Id: I764291e0ca5281550a16d61a9aa8dbf5ca05d390
Signed-off-by: Keshawn Lopez xxx@xxx.xxx
Signed-off-by: Bailey Galloway xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-02-21 20:41:44.000000000

Patch Set 1: Code-Review-1

(9 comments)

That's a very good start! I'm looking forward to seeing it in action with real analyses. More comments will come as we see how to actually use it.

Line:44, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/IAnalysisModule.java -> I'm not sure we want to foce all analysis modules to implement IAnalysisRequirementProvider. Each analysis module should decide whether or not they have requirement and implement this interface only if they do.

Line:110, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> You could replace those 4 lines with

AnalysisRequirementValueLevel subRequirementValueLevel = Math.max(subRequirement.getValueLevel(value), maxSubRequirementValueLevel.ordinal());

Line:120, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Here, a Math.max(requirementValueLevel.ordinal(), subRequirementValueLevel.ordinal()) is clearer

Line:155, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> I don't think we need both addValue and modifyValue, just use addValue and overwrite the level (or take the maximum?). That will avoid callers having to do an if (hasValue) modify else add

Line:181, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Define here what an information is.

Line:190, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Missing description

Line:35, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> wow unit tests! That's great!

Line:37, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> Convention is to start field names with an f, so fRequirement, fSubRequirement.

And why static fields?

Line:48, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisRequirementTest.java -> To avoid typo errors, strings should only be defined once, either as class constants (static final String in the class) or only for a given test (final String in the method). This comment applies to all methods.

-------------------------------------
author: Brenden Conley
date: 2014-02-21 20:48:36.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-02-21 21:03:18.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/5622/ : FAILURE

-------------------------------------
author: Bailey Galloway
date: 2014-02-23 15:01:48.000000000

Patch Set 1:

(5 comments)

Line:44, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/IAnalysisModule.java -> Since all analyses extend from TmfAbstractAnalysisModule, we figured that it would implement the basic behavior. For instance, the getAnalysisRequirements will send an empty container meaning there is no requirement. If a module wants to specify his requirements, it has to override the getAnalysisRequirements.

Line:110, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Done

Line:120, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Done

Line:181, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> The idea behind the information was the LD_PRELOAD before starting a trace session that you'd mentioned and it could have extended to other such informations, but it seems as though the getHelpText method that already exists in the analysis modules might be what we had in mind. What do you think?

Line:190, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/analysis/TmfAnalysisRequirement.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2014-04-15 22:10:24.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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