DESCRIPTION

TMF: Implementation of UstMemoryAnalysisModule requirements

The events needed by the analysis are added as requirements. We also add the
information that the libc with probes should be loaded prior to start the trace
session. The lttng2.core bundle is imported to make use of the session
configuration strings.

Change-Id: Idcfb13d7ae43bb73f6631c12f4eeb52fe74976d5
Signed-off-by: Bailey Galloway xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-04-25 18:19:54.000000000

Uploaded patch set 11.

-------------------------------------
author: Brenden Conley
date: 2014-04-25 20:17:55.000000000

Patch Set 11:

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

-------------------------------------
author: Brenden Conley
date: 2014-04-25 21:06:50.000000000

Patch Set 11: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-04-29 22:01:22.000000000

Patch Set 11: Code-Review+1

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-30 00:02:34.000000000

Patch Set 11: Code-Review-1

(13 comments)

Sorry, I happened to stumble on this ;)

Line:10, /COMMIT_MSG -> prior to starting

Line:11, /COMMIT_MSG -> make sure to update this too if you rebase

Line:20, lttng/org.eclipse.linuxtools.lttng2.ust.core/META-INF/MANIFEST.MF -> make sure to update this if you rebase on the rename patch

Line:22, lttng/org.eclipse.linuxtools.lttng2.ust.core/META-INF/MANIFEST.MF -> This should not go in Required-Bundle, but in Import-Package. (Geneviève, Matthew, plz make sure you check for this!)

This is to allow users to use the package from another source than Eclipse, for example distro packages.

Line:37, lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/analysis/memory/UstMemoryAnalysisModuleTest.java -> There is only one test now, but if we add more, each test should have their instance of the fixture.

The field should not be final, and set in xxx@xxx.xxx method:

 xxx@xxx.xxx
  public void setup() {
    fUstAnalysisModule = something;
  }

and if you need to dipose() or close() it, you can do so in xxx@xxx.xxx method.

Line:45, lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/analysis/memory/UstMemoryAnalysisModuleTest.java -> Iterable doesn't give us a .size() method, but you could check assertTrue(requirements.hasNext()), since (I assume) there should be actual requirements being sent?

Line:73, lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/analysis/memory/UstMemoryAnalysisModuleTest.java -> style comment, put the first element on its own line

Line:79, lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/analysis/memory/UstMemoryAnalysisModuleTest.java -> You can use List.add() manually, or even better, ImmutableList.of(elem1, elem2, elem3,...)

Line:27, lttng/org.eclipse.linuxtools.lttng2.ust.core/src/org/eclipse/linuxtools/lttng2/ust/core/analysis/memory/Messages.java -> add some empty lines in between everything

Line:45, lttng/org.eclipse.linuxtools.lttng2.ust.core/src/org/eclipse/linuxtools/lttng2/ust/core/analysis/memory/UstMemoryAnalysisModule.java -> Is there a reason for this to be a List? Wouldn't a Set or Collection suffice?

(List if the order AND the index of each element is important. Set if only the order is needed. Collection if it doesn't matter).

Line:47, lttng/org.eclipse.linuxtools.lttng2.ust.core/src/org/eclipse/linuxtools/lttng2/ust/core/analysis/memory/UstMemoryAnalysisModule.java -> first entry on its own line

Put the static fields before the instance ones, in general.

Line:52, lttng/org.eclipse.linuxtools.lttng2.ust.core/src/org/eclipse/linuxtools/lttng2/ust/core/analysis/memory/UstMemoryAnalysisModule.java -> put ); on its own line, Ctrl+Shift+F will align it nicely

Line:18, lttng/org.eclipse.linuxtools.lttng2.ust.core.tests/META-INF/MANIFEST.MF -> might want to rebase this on top of https://git.eclipse.org/r/#/c/25525/ first, it will be MUCH easier than the other way around.

-------------------------------------
author: Braxton Mccarthy
date: 2014-04-30 03:34:53.000000000

Patch Set 11:

(1 comment)

Line:45, lttng/org.eclipse.linuxtools.lttng2.ust.core/src/org/eclipse/linuxtools/lttng2/ust/core/analysis/memory/UstMemoryAnalysisModule.java -> Hmm that's not entirely correct. I assumed ImmutableSet was like ImmutableMap, but nowhere it's specified that the iteration order will follow the insertion order...

So if ordering is important, you're safe with with ImmutableList.

x.contains() will be faster on a Set though.

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