DESCRIPTION

TMF:  Tcp packet matching on lttng2 traces

Introducing new classes to match events from tmf traces and state the dependency between two events.  Implemented actual event matching for Tcp packets on lttng2 traces.  These functionnalities are available through unit tests.

Change-Id: I91a94d384b8733e601d24b718ff396748efccdf1


COMMENTS

author: Brenden Conley
date: 2013-01-16 15:44:52.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/1032/ 

-------------------------------------
author: Brenden Conley
date: 2013-01-16 15:58:41.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/1032/ : SUCCESS

-------------------------------------
author: Ivy Mitchell
date: 2013-01-16 18:35:57.000000000

Patch Set 1: (1 inline comment)



Line:107, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/event/matching/TcpEventMatching.java -> tabs!

-------------------------------------
author: Braxton Mccarthy
date: 2013-01-16 18:41:25.000000000

Patch Set 1: (12 inline comments)



Line:9, /COMMIT_MSG -> Please reflow your description text to ~80 columns manually. Git isn't like a mail client ;)

Line:23, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/event/matching/TcpEventStrings.java -> you can use {@link} in comments, for example: xxx@xxx.xxx org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings}

This will keep the comment updated if the target file is ever moved or renamed :)

Line:31, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/event/matching/TcpEventStrings.java -> Shouldn't this file go in the internal package?

Line:24, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/AllTests.java -> TestSuite is JUnit3 API. JUnit4 xxx@xxx.xxx See example at http://stackoverflow.com/questions/457276/junit4-test-suites

Line:41, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/event/matching/TcpEventMatching.java -> Please write a short description of the methods, like you did with countEvents(). It can be short, like "Constructor with one trace", "Constructor with many traces". This will show up on the generated HTML Javadoc (and in the Eclipse tooltips!)

You can also highlight the comments and hit Ctrl+Shift+F to reflow them automatically.

Line:107, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/event/matching/TcpEventMatching.java -> ewww tabs :P

Please use spaces only for indentation.

Line:17, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventDependency.java -> Classes should have a small description too. It can be short.

Line:8, lttng/org.eclipse.linuxtools.ctf.core.tests/traces/get-traces.sh -> The previous line had a && at the end, not sure if this matters.

Line:1, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/MatchAndSyncTest.java -> Missing copyright header

Line:23, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/MatchAndSyncTest.java -> You should use either "extends TestCase" (JUnit 3 API) xxx@xxx.xxx annotations (JUnit 4), not both. For new tests I think we should converge to JUnit 4.

Line:51, lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/MatchAndSyncTest.java -> If you use the SuppressWarnings("nls") you don't need the NON-NLS annotation. Sometimes in tests it can be worth using SupressWarnings("nls") at the class level.

Line:108, lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/matching/TmfEventMatching.java -> Instead of using String += otherString, it's more efficient to use a StringBuilder and .append() (especially when in a loop), then return sb.toString() at the end.

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